@Private
@Evolving
public class PipelineAck
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
PipelineAck.ECN |
|
static class |
PipelineAck.SLOW |
| Modifier and Type | Field | Description |
|---|---|---|
static long |
UNKOWN_SEQNO |
| Constructor | Description |
|---|---|
PipelineAck() |
default constructor
|
PipelineAck(long seqno,
int[] replies) |
Constructor assuming no next DN in pipeline
|
PipelineAck(long seqno,
int[] replies,
long downstreamAckTimeNanos) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
static int |
combineHeader(PipelineAck.ECN ecn,
org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status) |
|
static int |
combineHeader(PipelineAck.ECN ecn,
org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status,
PipelineAck.SLOW slow) |
|
long |
getDownstreamAckTimeNanos() |
Get the time elapsed for downstream ack RTT in nanoseconds
|
static PipelineAck.ECN |
getECNFromHeader(int header) |
|
int |
getFlag(int i) |
|
int |
getHeaderFlag(int i) |
get the header flag of ith reply
|
short |
getNumOfReplies() |
Get the number of replies
|
org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status |
getOOBStatus() |
Returns the OOB status if this ack contains one.
|
static org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status |
getRestartOOBStatus() |
Get the Restart OOB ack status
|
long |
getSeqno() |
Get the sequence number
|
static PipelineAck.SLOW |
getSLOWFromHeader(int header) |
|
static org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status |
getStatusFromHeader(int header) |
|
static boolean |
isRestartOOBStatus(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status st) |
return true if it is the restart OOB status code
|
boolean |
isSuccess() |
Check if this ack contains error status
|
void |
readFields(java.io.InputStream in) |
Writable interface
|
static int |
setSLOWForHeader(int old,
PipelineAck.SLOW slow) |
|
static int |
setStatusForHeader(int old,
org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status) |
|
java.lang.String |
toString() |
|
void |
write(java.io.OutputStream out) |
public static final long UNKOWN_SEQNO
public PipelineAck()
public PipelineAck(long seqno,
int[] replies)
seqno - sequence numberreplies - an array of repliespublic PipelineAck(long seqno,
int[] replies,
long downstreamAckTimeNanos)
seqno - sequence numberreplies - an array of repliesdownstreamAckTimeNanos - ack RTT in nanoseconds, 0 if no next DN in pipelinepublic long getSeqno()
public short getNumOfReplies()
public int getHeaderFlag(int i)
public int getFlag(int i)
public long getDownstreamAckTimeNanos()
public boolean isSuccess()
public org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status getOOBStatus()
public static org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status getRestartOOBStatus()
public static boolean isRestartOOBStatus(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status st)
public void readFields(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic void write(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status getStatusFromHeader(int header)
public static PipelineAck.ECN getECNFromHeader(int header)
public static PipelineAck.SLOW getSLOWFromHeader(int header)
public static int setStatusForHeader(int old,
org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status)
@VisibleForTesting
public static int setSLOWForHeader(int old,
PipelineAck.SLOW slow)
public static int combineHeader(PipelineAck.ECN ecn, org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status)
public static int combineHeader(PipelineAck.ECN ecn, org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status status, PipelineAck.SLOW slow)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.