本文整理汇总了Java中org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader.getDataLen方法的典型用法代码示例。如果您正苦于以下问题:Java PacketHeader.getDataLen方法的具体用法?Java PacketHeader.getDataLen怎么用?Java PacketHeader.getDataLen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader
的用法示例。
在下文中一共展示了PacketHeader.getDataLen方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readTrailingEmptyPacket
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader; //导入方法依赖的package包/类
private void readTrailingEmptyPacket() throws IOException {
if (LOG.isTraceEnabled()) {
LOG.trace("Reading empty packet at end of read");
}
packetReceiver.receiveNextPacket(in);
PacketHeader trailer = packetReceiver.getHeader();
if (!trailer.isLastPacketInBlock() ||
trailer.getDataLen() != 0) {
throw new IOException("Expected empty end-of-read packet! Header: " +
trailer);
}
}
示例2: readTrailingEmptyPacket
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader; //导入方法依赖的package包/类
private void readTrailingEmptyPacket() throws IOException {
LOG.trace("Reading empty packet at end of read");
packetReceiver.receiveNextPacket(in);
PacketHeader trailer = packetReceiver.getHeader();
if (!trailer.isLastPacketInBlock() ||
trailer.getDataLen() != 0) {
throw new IOException("Expected empty end-of-read packet! Header: " +
trailer);
}
}
示例3: readTrailingEmptyPacket
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader; //导入方法依赖的package包/类
private void readTrailingEmptyPacket() throws IOException {
if (LOG.isTraceEnabled()) {
LOG.trace("Reading empty packet at end of read");
}
packetReceiver.receiveNextPacket(in);
PacketHeader trailer = packetReceiver.getHeader();
if (!trailer.isLastPacketInBlock() || trailer.getDataLen() != 0) {
throw new IOException(
"Expected empty end-of-read packet! Header: " + trailer);
}
}