Java 类org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto 实例源码

项目:hadoop    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, int[] replies,
                   long downstreamAckTimeNanos) {
  ArrayList<Status> statusList = Lists.newArrayList();
  ArrayList<Integer> flagList = Lists.newArrayList();
  for (int r : replies) {
    statusList.add(StatusFormat.getStatus(r));
    flagList.add(r);
  }
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllReply(statusList)
    .addAllFlag(flagList)
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:aliyun-oss-hadoop-fs    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, int[] replies,
                   long downstreamAckTimeNanos) {
  ArrayList<Status> statusList = Lists.newArrayList();
  ArrayList<Integer> flagList = Lists.newArrayList();
  for (int r : replies) {
    statusList.add(StatusFormat.getStatus(r));
    flagList.add(r);
  }
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllReply(statusList)
    .addAllFlag(flagList)
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:big-c    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, int[] replies,
                   long downstreamAckTimeNanos) {
  ArrayList<Status> statusList = Lists.newArrayList();
  ArrayList<Integer> flagList = Lists.newArrayList();
  for (int r : replies) {
    statusList.add(StatusFormat.getStatus(r));
    flagList.add(r);
  }
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllReply(statusList)
    .addAllFlag(flagList)
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutput.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, PipelineAckProto ack) throws Exception {
  Status reply = getStatus(ack);
  if (reply != Status.SUCCESS) {
    failed(ctx.channel(), () -> new IOException("Bad response " + reply + " for block " +
      block + " from datanode " + ctx.channel().remoteAddress()));
    return;
  }
  if (PipelineAck.isRestartOOBStatus(reply)) {
    failed(ctx.channel(), () -> new IOException("Restart response " + reply + " for block " +
      block + " from datanode " + ctx.channel().remoteAddress()));
    return;
  }
  if (ack.getSeqno() == HEART_BEAT_SEQNO) {
    return;
  }
  completed(ctx.channel());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hadoop-plus    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:FlexMap    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutputHelper.java   
private static PipelineAckStatusGetter createPipelineAckStatusGetter26()
    throws NoSuchMethodException {
  Method getStatusMethod = PipelineAckProto.class.getMethod("getStatus", int.class);
  return new PipelineAckStatusGetter() {

    @Override
    public Status get(PipelineAckProto ack) {
      try {
        return (Status) getStatusMethod.invoke(ack, 0);
      } catch (IllegalAccessException | InvocationTargetException e) {
        throw new RuntimeException(e);
      }
    }
  };
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutput.java   
private void setupReceiver(int timeoutMs) {
  AckHandler ackHandler = new AckHandler(timeoutMs);
  for (Channel ch : datanodeList) {
    ch.pipeline().addLast(
      new IdleStateHandler(timeoutMs, timeoutMs / 2, 0, TimeUnit.MILLISECONDS),
      new ProtobufVarint32FrameDecoder(),
      new ProtobufDecoder(PipelineAckProto.getDefaultInstance()), ackHandler);
    ch.config().setAutoRead(true);
  }
}
项目:hadoop-TCP    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hardfs    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hadoop-on-lustre2    文件:PipelineAck.java   
/**
 * Constructor
 * @param seqno sequence number
 * @param replies an array of replies
 * @param downstreamAckTimeNanos ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies, long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder()
    .setSeqno(seqno)
    .addAllStatus(Arrays.asList(replies))
    .setDownstreamAckTimeNanos(downstreamAckTimeNanos)
    .build();
}
项目:hadoop    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:aliyun-oss-hadoop-fs    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:big-c    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hadoop-plus    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:FlexMap    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hops    文件:PipelineAck.java   
/**
 * * Writable interface ***
 */
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutputHelper.java   
static Status getStatus(PipelineAckProto ack) {
  return PIPELINE_ACK_STATUS_GETTER.get(ack);
}
项目:hadoop-TCP    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hardfs    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hadoop-on-lustre2    文件:PipelineAck.java   
/**** Writable interface ****/
public void readFields(InputStream in) throws IOException {
  proto = PipelineAckProto.parseFrom(vintPrefixed(in));
}
项目:hops    文件:PipelineAck.java   
/**
 * Constructor
 *
 * @param seqno
 *     sequence number
 * @param replies
 *     an array of replies
 * @param downstreamAckTimeNanos
 *     ack RTT in nanoseconds, 0 if no next DN in pipeline
 */
public PipelineAck(long seqno, Status[] replies,
    long downstreamAckTimeNanos) {
  proto = PipelineAckProto.newBuilder().setSeqno(seqno)
      .addAllStatus(Arrays.asList(replies))
      .setDownstreamAckTimeNanos(downstreamAckTimeNanos).build();
}
项目:hbase    文件:FanOutOneBlockAsyncDFSOutputHelper.java   
Status get(PipelineAckProto ack);