Java 类org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtocol 实例源码

项目:hadoop    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], StorageType[] targetStorageTypes,
    ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targets=" + Arrays.asList(targets)
        + ", target storage types=" + (targetStorageTypes == null ? "[]" :
        Arrays.asList(targetStorageTypes)));
  }
  this.targets = targets;
  this.targetStorageTypes = targetStorageTypes;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
  this.cachingStrategy =
      new CachingStrategy(true, getDnConf().readaheadLength);
}
项目:aliyun-oss-hadoop-fs    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], StorageType[] targetStorageTypes,
    ExtendedBlock b, BlockConstructionStage stage,
    final String clientname) {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targets=" + Arrays.asList(targets)
        + ", target storage types=" + (targetStorageTypes == null ? "[]" :
        Arrays.asList(targetStorageTypes)));
  }
  this.targets = targets;
  this.targetStorageTypes = targetStorageTypes;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
  this.cachingStrategy =
      new CachingStrategy(true, getDnConf().readaheadLength);
}
项目:big-c    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], StorageType[] targetStorageTypes,
    ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targets=" + Arrays.asList(targets)
        + ", target storage types=" + (targetStorageTypes == null ? "[]" :
        Arrays.asList(targetStorageTypes)));
  }
  this.targets = targets;
  this.targetStorageTypes = targetStorageTypes;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
  this.cachingStrategy =
      new CachingStrategy(true, getDnConf().readaheadLength);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], StorageType[] targetStorageTypes,
    ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targets=" + Arrays.asList(targets)
        + ", target storage types=" + (targetStorageTypes == null ? "[]" :
        Arrays.asList(targetStorageTypes)));
  }
  this.targets = targets;
  this.targetStorageTypes = targetStorageTypes;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
  this.cachingStrategy =
      new CachingStrategy(true, getDnConf().readaheadLength);
}
项目:hadoop-plus    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targests=" + Arrays.asList(targets));
  }
  this.targets = targets;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
}
项目:PDHC    文件:CheckerNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targests=" + Arrays.asList(targets));
  }
  this.targets = targets;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
}
项目:FlexMap    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the 
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], StorageType[] targetStorageTypes,
    ExtendedBlock b, BlockConstructionStage stage,
    final String clientname)  {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(getClass().getSimpleName() + ": "
        + b + " (numBytes=" + b.getNumBytes() + ")"
        + ", stage=" + stage
        + ", clientname=" + clientname
        + ", targets=" + Arrays.asList(targets)
        + ", target storage types=" + (targetStorageTypes == null ? "[]" :
        Arrays.asList(targetStorageTypes)));
  }
  this.targets = targets;
  this.targetStorageTypes = targetStorageTypes;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
  this.cachingStrategy =
      new CachingStrategy(true, getDnConf().readaheadLength);
}
项目:hops    文件:DataNode.java   
/**
 * Connect to the first item in the target list.  Pass along the
 * entire target list, the block, and the data.
 */
DataTransfer(DatanodeInfo targets[], ExtendedBlock b,
    BlockConstructionStage stage, final String clientname) {
  if (DataTransferProtocol.LOG.isDebugEnabled()) {
    DataTransferProtocol.LOG.debug(
        getClass().getSimpleName() + ": " + b + " (numBytes=" +
            b.getNumBytes() + ")" + ", stage=" + stage + ", clientname=" +
            clientname + ", targests=" + Arrays.asList(targets));
  }
  this.targets = targets;
  this.b = b;
  this.stage = stage;
  BPOfferService bpos = blockPoolManager.get(b.getBlockPoolId());
  bpReg = bpos.bpRegistration;
  this.clientname = clientname;
}
项目:hadoop    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:aliyun-oss-hadoop-fs    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  GenericTestUtils.setLogLevel(DataTransferProtocol.LOG, Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:big-c    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:FlexMap    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutputHelper.java   
private static void requestWriteBlock(Channel channel, Enum<?> storageType,
    OpWriteBlockProto.Builder writeBlockProtoBuilder) throws IOException {
  OpWriteBlockProto proto = STORAGE_TYPE_SETTER.set(writeBlockProtoBuilder, storageType).build();
  int protoLen = proto.getSerializedSize();
  ByteBuf buffer =
      channel.alloc().buffer(3 + CodedOutputStream.computeRawVarint32Size(protoLen) + protoLen);
  buffer.writeShort(DataTransferProtocol.DATA_TRANSFER_VERSION);
  buffer.writeByte(Op.WRITE_BLOCK.code);
  proto.writeDelimitedTo(new ByteBufOutputStream(buffer));
  channel.writeAndFlush(buffer);
}
项目:hadoop-on-lustre2    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  Configuration conf = new Configuration();
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(conf, false, false);
  dfsPreadTest(conf, true, false);
}
项目:hadoop-plus    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(false, false);
  dfsPreadTest(true, false);
}
项目:hops    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  ((Log4JLogger) DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(false, false);
  dfsPreadTest(true, false);
}
项目:hadoop-TCP    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(false, false);
  dfsPreadTest(true, false);
}
项目:hardfs    文件:TestPread.java   
@Test
public void testPreadDFSNoChecksum() throws IOException {
  ((Log4JLogger)DataTransferProtocol.LOG).getLogger().setLevel(Level.ALL);
  dfsPreadTest(false, false);
  dfsPreadTest(true, false);
}