Examples of BlockAccessToken


Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

      final long blockId = in.readLong();         
      final long blockGs = in.readLong();
      final long offset = in.readLong();
      final long length = in.readLong();
      final String client = Text.readString(in);
      final BlockAccessToken accesstoken = readAccessToken(in);

      opReadBlock(in, blockId, blockGs, offset, length, client, accesstoken);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

      }
      final DatanodeInfo targets[] = new DatanodeInfo[nTargets];
      for (int i = 0; i < targets.length; i++) {
        targets[i] = DatanodeInfo.read(in);
      }
      final BlockAccessToken accesstoken = readAccessToken(in);

      opWriteBlock(in, blockId, blockGs, pipelineSize, stage,
          newGs, minBytesRcvd, maxBytesRcvd, client, src, targets, accesstoken);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

    private void opReplaceBlock(DataInputStream in) throws IOException {
      final long blockId = in.readLong();         
      final long blockGs = in.readLong();
      final String sourceId = Text.readString(in); // read del hint
      final DatanodeInfo src = DatanodeInfo.read(in); // read proxy source
      final BlockAccessToken accesstoken = readAccessToken(in);

      opReplaceBlock(in, blockId, blockGs, sourceId, src, accesstoken);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

    /** Receive OP_COPY_BLOCK */
    private void opCopyBlock(DataInputStream in) throws IOException {
      final long blockId = in.readLong();         
      final long blockGs = in.readLong();
      final BlockAccessToken accesstoken = readAccessToken(in);

      opCopyBlock(in, blockId, blockGs, accesstoken);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

    /** Receive OP_BLOCK_CHECKSUM */
    private void opBlockChecksum(DataInputStream in) throws IOException {
      final long blockId = in.readLong();         
      final long blockGs = in.readLong();
      final BlockAccessToken accesstoken = readAccessToken(in);

      opBlockChecksum(in, blockId, blockGs, accesstoken);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

        long blockId, long blockGs, BlockAccessToken accesstoken) throws IOException;

    /** Read an AccessToken */
    static private BlockAccessToken readAccessToken(DataInputStream in
        ) throws IOException {
      final BlockAccessToken t = new BlockAccessToken();
      t.readFields(in);
      return t;
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

      try {
        s = dfsClient.socketFactory.createSocket();
        NetUtils.connect(s, targetAddr, dfsClient.socketTimeout);
        s.setSoTimeout(dfsClient.socketTimeout);
        Block blk = targetBlock.getBlock();
        BlockAccessToken accessToken = targetBlock.getAccessToken();
       
        blockReader = BlockReader.newBlockReader(s, src, blk.getBlockId(),
            accessToken,
            blk.getGenerationStamp(),
            offsetIntoBlock, blk.getNumBytes() - offsetIntoBlock,
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

         
      try {
        dn = dfsClient.socketFactory.createSocket();
        NetUtils.connect(dn, targetAddr, dfsClient.socketTimeout);
        dn.setSoTimeout(dfsClient.socketTimeout);
        BlockAccessToken accessToken = block.getAccessToken();
           
        int len = (int) (end - start + 1);
           
        reader = BlockReader.newBlockReader(dn, src,
                                            block.getBlock().getBlockId(),
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

      return;
    }

    final DFSClient dfs = getDFSClient(ugi, datanode.getNameNodeAddr(), conf);

    BlockAccessToken accessToken = BlockAccessToken.DUMMY_TOKEN;
    if (conf.getBoolean(
        DFSConfigKeys.DFS_BLOCK_ACCESS_TOKEN_ENABLE_KEY,
        DFSConfigKeys.DFS_BLOCK_ACCESS_TOKEN_ENABLE_DEFAULT)) {
      List<LocatedBlock> blks = dfs.getNamenode().getBlockLocations(filename, 0,
          Long.MAX_VALUE).getLocatedBlocks();
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.BlockAccessToken

      return;
    }
    LocatedBlock lastBlk = blocks.get(blocks.size() - 1);
    long blockSize = lastBlk.getBlock().getNumBytes();
    long blockId = lastBlk.getBlock().getBlockId();
    BlockAccessToken accessToken = lastBlk.getAccessToken();
    long genStamp = lastBlk.getBlock().getGenerationStamp();
    DatanodeInfo chosenNode;
    try {
      chosenNode = JspHelper.bestNode(lastBlk);
    } catch (IOException e) {
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.