Example usage for org.apache.hadoop.hdfs.protocol.datatransfer BlockConstructionStage TRANSFER_FINALIZED

List of usage examples for org.apache.hadoop.hdfs.protocol.datatransfer BlockConstructionStage TRANSFER_FINALIZED

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.protocol.datatransfer BlockConstructionStage TRANSFER_FINALIZED.

Prototype

BlockConstructionStage TRANSFER_FINALIZED

To view the source code for org.apache.hadoop.hdfs.protocol.datatransfer BlockConstructionStage TRANSFER_FINALIZED.

Click Source Link

Usage

From source file:com.mellanox.r4h.WriteOprHeader.java

License:Apache License

public WriteOprHeader(ExtendedBlock blk, Token<BlockTokenIdentifier> blockToken, String clientName,
        DatanodeInfo[] targets, DatanodeInfo source, BlockConstructionStage stage, int pipelineSize,
        long minBytesRcvd, long maxBytesRcvd, long latestGenerationStamp, DataChecksum requestedChecksum,
        CachingStrategy cachingStrategy) {
    this.blk = blk;
    this.blockToken = blockToken;
    this.clientName = clientName;
    this.targets = targets;
    this.source = source;
    this.stage = stage;
    this.pipelineSize = pipelineSize;
    this.minBytesRcvd = minBytesRcvd;
    this.maxBytesRcvd = maxBytesRcvd;
    this.latestGenerationStamp = latestGenerationStamp;
    this.requestedChecksum = requestedChecksum;
    this.cachingStrategy = cachingStrategy;

    isDatanode = clientName.length() == 0;
    isClient = !isDatanode;// w  w  w  . j  ava 2 s .co  m
    isTransfer = stage == BlockConstructionStage.TRANSFER_RBW
            || stage == BlockConstructionStage.TRANSFER_FINALIZED;

}

From source file:com.mellanox.r4h.WriteOprHeader.java

License:Apache License

public boolean isTransfer() {
    return (stage == BlockConstructionStage.TRANSFER_RBW || stage == BlockConstructionStage.TRANSFER_FINALIZED);
}