Examples of OffsetParam


Examples of org.apache.hadoop.fs.http.server.HttpFSParams.OffsetParam

  public Response root(@Context Principal user,
                       @QueryParam(GetOpParam.NAME) GetOpParam op,
                       @QueryParam(FilterParam.NAME) @DefaultValue(FilterParam.DEFAULT) FilterParam filter,
                       @QueryParam(DoAsParam.NAME) @DefaultValue(DoAsParam.DEFAULT) DoAsParam doAs)
    throws IOException, FileSystemAccessException {
    return get(user, new FsPathParam(""), op, new OffsetParam(OffsetParam.DEFAULT),
               new LenParam(LenParam.DEFAULT), filter, doAs,
               new OverwriteParam(OverwriteParam.DEFAULT),
               new BlockSizeParam(BlockSizeParam.DEFAULT),
               new PermissionParam(PermissionParam.DEFAULT),
               new ReplicationParam(ReplicationParam.DEFAULT));
View Full Code Here

Examples of org.apache.hadoop.fs.http.server.HttpFSParams.OffsetParam

  public Response root(@Context Principal user,
                       @QueryParam(GetOpParam.NAME) GetOpParam op,
                       @QueryParam(FilterParam.NAME) @DefaultValue(FilterParam.DEFAULT) FilterParam filter,
                       @QueryParam(DoAsParam.NAME) @DefaultValue(DoAsParam.DEFAULT) DoAsParam doAs)
    throws IOException, FileSystemAccessException {
    return get(user, new FsPathParam(""), op, new OffsetParam(OffsetParam.DEFAULT),
               new LenParam(LenParam.DEFAULT), filter, doAs,
               new OverwriteParam(OverwriteParam.DEFAULT),
               new BlockSizeParam(BlockSizeParam.DEFAULT),
               new PermissionParam(PermissionParam.DEFAULT),
               new ReplicationParam(ReplicationParam.DEFAULT));
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

  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;
    final Map<?, ?> m = run(op, p, new OffsetParam(offset),
        new LengthParam(length));
    return DFSUtil.locatedBlocks2Locations(JsonUtil.toLocatedBlocks(m));
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

    /** Setup offset url and connect. */
    @Override
    protected HttpURLConnection connect(final long offset,
        final boolean resolved) throws IOException {
      final URL offsetUrl = offset == 0L? url
          : new URL(url + "&" + new OffsetParam(offset));
      return new Runner(GetOpParam.Op.OPEN, offsetUrl, resolved).run().conn;
   
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

  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;
    final Map<?, ?> m = run(op, p, new OffsetParam(offset),
        new LengthParam(length));
    return DFSUtil.locatedBlocks2Locations(JsonUtil.toLocatedBlocks(m));
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

    /** Setup offset url and connect. */
    @Override
    protected HttpURLConnection connect(final long offset,
        final boolean resolved) throws IOException {
      final URL offsetUrl = offset == 0L? url
          : new URL(url + "&" + new OffsetParam(offset));
      return new Runner(GetOpParam.Op.OPEN, offsetUrl, resolved).run().conn;
   
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

    // Open the file, but request offset starting at 1 and length equal to file
    // length.  Considering the offset, this is longer than the actual content.
    HttpOpParam.Op op = GetOpParam.Op.OPEN;
    URL url = webhdfs.toUrl(op, testFile, new LengthParam(Long.valueOf(
      content.length())), new OffsetParam(1L));
    HttpURLConnection conn = null;
    InputStream is = null;
    try {
      conn = (HttpURLConnection)url.openConnection();
      conn.setRequestMethod(op.getType().toString());
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

  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;
    final Map<?, ?> m = run(op, p, new OffsetParam(offset),
        new LengthParam(length));
    return DFSUtil.locatedBlocks2Locations(JsonUtil.toLocatedBlocks(m));
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

    /** Setup offset url and connect. */
    @Override
    protected HttpURLConnection connect(final long offset,
        final boolean resolved) throws IOException {
      final URL offsetUrl = offset == 0L? url
          : new URL(url + "&" + new OffsetParam(offset));
      return new Runner(GetOpParam.Op.OPEN, offsetUrl, resolved).run().conn;
   
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.OffsetParam

    }

    /** Setup offset url before open connection. */
    @Override
    protected HttpURLConnection openConnection(final long offset) throws IOException {
      offsetUrl = offset == 0L? url: new URL(url + "&" + new OffsetParam(offset));
      final HttpURLConnection conn = openConnection();
      conn.setRequestMethod("GET");
      return conn;
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.