long length() { return new LengthParam(param(LengthParam.NAME)).getLength(); }
public long getLength() { Long v = getValue(); return v == null ? -1 : v; } }
@Override public BlockLocation[] getFileBlockLocations(final Path p, final long offset, final long length) throws IOException { statistics.incrementReadOps(1); final HttpOpParam.Op op = GetOpParam.Op.GET_BLOCK_LOCATIONS; return new FsPathResponseRunner<BlockLocation[]>(op, p, new OffsetParam(offset), new LengthParam(length)) { @Override BlockLocation[] decodeResponse(Map<?,?> json) throws IOException { return DFSUtil.locatedBlocks2Locations( JsonUtil.toLocatedBlocks(json)); } }.run(); }
@Override public BlockLocation[] getFileBlockLocations(final Path p, final long offset, final long length) throws IOException { statistics.incrementReadOps(1); final HttpOpParam.Op op = GetOpParam.Op.GET_BLOCK_LOCATIONS; return new FsPathResponseRunner<BlockLocation[]>(op, p, new OffsetParam(offset), new LengthParam(length)) { @Override BlockLocation[] decodeResponse(Map<?,?> json) throws IOException { return DFSUtil.locatedBlocks2Locations( JsonUtil.toLocatedBlocks(json)); } }.run(); }
long length() { return new LengthParam(param(LengthParam.NAME)).getLength(); }
@Override public BlockLocation[] getFileBlockLocations(final Path p, final long offset, final long length) throws IOException { statistics.incrementReadOps(1); storageStatistics.incrementOpCounter(OpType.GET_FILE_BLOCK_LOCATIONS); final HttpOpParam.Op op = GetOpParam.Op.GET_BLOCK_LOCATIONS; return new FsPathResponseRunner<BlockLocation[]>(op, p, new OffsetParam(offset), new LengthParam(length)) { @Override BlockLocation[] decodeResponse(Map<?,?> json) throws IOException { return DFSUtilClient.locatedBlocks2Locations( JsonUtilClient.toLocatedBlocks(json)); } }.run(); }
public long getLength() { Long v = getValue(); return v == null ? -1 : v; } }
long length() { return new LengthParam(param(LengthParam.NAME)).getLength(); }
URL url = webhdfs.toUrl(op, testFile, new LengthParam(Long.valueOf( content.length())), new OffsetParam(1L)); HttpURLConnection conn = null;
public long getLength() { Long v = getValue(); return v == null ? -1 : v; } }
URL url = webhdfs.toUrl(op, testFile, new LengthParam((long) (content .length() + 1))); HttpURLConnection conn = null;
final Long lengthValue = length.getValue(); LocatedBlocks locatedBlocks = getRpcClientProtocol() .getBlockLocations(fullpath, offsetValue, lengthValue != null ? final Long lengthValue = length.getValue(); final LocatedBlocks locatedblocks = cp.getBlockLocations(fullpath, offsetValue, lengthValue != null? lengthValue: Long.MAX_VALUE);
.getPort(), WebHdfsFileSystem.PATH_PREFIX + PATH + "?op=OPEN" + Param.toSortedString("&", new OffsetParam((long) OFFSET), new LengthParam((long) LENGTH)) ); HttpURLConnection conn = (HttpURLConnection) url.openConnection();
final Long lengthValue = length.getValue(); final LocatedBlocks locatedblocks = np.getBlockLocations(fullpath, offsetValue, lengthValue != null? lengthValue: Long.MAX_VALUE);
final Long lengthValue = length.getValue(); final LocatedBlocks locatedblocks = np.getBlockLocations(fullpath, offsetValue, lengthValue != null? lengthValue: Long.MAX_VALUE);