Examples of DFSReadProfilingData


Examples of org.apache.hadoop.hdfs.profiling.DFSReadProfilingData

    ByteBuffer bb = null;

    int len = (int) (end - start + 1);
    BlockSeekContext seekContext = new BlockSeekContext(getBlockAt(
        block.getStartOffset(), false, true));
    DFSReadProfilingData pData = DFSClient.getDFSReadProfilingData();
   
    while (true) {
      FSClientReadProfilingData cliData = null;
      if (pData != null) {
        cliData = new FSClientReadProfilingData();
        pData.addDFSClientReadProfilingData(cliData);
        cliData.startRead();
      }
     
      DNAddrPair retval = chooseDataNode(seekContext, ignored);
      DatanodeInfo chosenNode = retval.info;
View Full Code Here

Examples of org.apache.hadoop.hdfs.profiling.DFSReadProfilingData

    int realLen = length;
    if ((position + length) > filelen) {
      realLen = (int)(filelen - position);
    }
   
    DFSReadProfilingData pData = DFSClient.getDFSReadProfilingData();

    // determine the block and byte range within the block
    // corresponding to position and realLen
    List<LocatedBlock> blockRange = getBlockRange(position, realLen);
   
    if (!tryPreadFromLocal(blockRange, position, buffer, offset, length,
        realLen, start)) {
      // non-local or multiple block read.
      int remaining = realLen;
      for (LocatedBlock blk : blockRange) {
        long targetStart = position - blk.getStartOffset();
        long bytesToRead = Math.min(remaining, blk.getBlockSize() - targetStart);
        if (dfsClient.allowParallelReads && dfsClient.parallelReadsThreadPool != null) {
          fetchBlockByteRangeSpeculative(blk, targetStart,
                              targetStart + bytesToRead - 1, buffer, offset,
                              options);
        } else {
          if (pData != null) {
            cliData = new FSClientReadProfilingData();
            pData.addDFSClientReadProfilingData(cliData);
            cliData.startRead();
          }
         
          fetchBlockByteRange(blk, targetStart,
                              targetStart + bytesToRead - 1, buffer, offset,
View Full Code Here

Examples of org.apache.hadoop.hdfs.profiling.DFSReadProfilingData

      this.parallelReadsThreadPool.setMaximumPoolSize(num);
    }
  }
 
  public static void startReadProfiling() {
    dfsReadContext.set(new DFSReadProfilingData());
  }
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.