HDFS-4044. Merging change 1397580 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1397584 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc42561787
commit
5f571ab869
|
@ -97,6 +97,9 @@ Release 2.0.3-alpha - Unreleased
|
|||
HDFS-4021. Misleading error message when resources are low on the NameNode.
|
||||
(Christopher Conner via atm)
|
||||
|
||||
HDFS-4044. Duplicate ChecksumType definition in HDFS .proto files.
|
||||
(Binglin Chang via suresh)
|
||||
|
||||
Release 2.0.2-alpha - 2012-09-07
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -24,9 +24,9 @@ import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
|||
import org.apache.hadoop.hdfs.protocol.HdfsProtoUtil;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BaseHeaderProto;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ChecksumProto;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ChecksumProto.ChecksumType;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpWriteBlockProto;
|
||||
import org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ChecksumTypeProto;
|
||||
import org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier;
|
||||
import org.apache.hadoop.security.token.Token;
|
||||
import org.apache.hadoop.util.DataChecksum;
|
||||
|
@ -52,7 +52,7 @@ public abstract class DataTransferProtoUtil {
|
|||
}
|
||||
|
||||
public static ChecksumProto toProto(DataChecksum checksum) {
|
||||
ChecksumType type = ChecksumType.valueOf(checksum.getChecksumType().name());
|
||||
ChecksumTypeProto type = ChecksumTypeProto.valueOf(checksum.getChecksumType().name());
|
||||
if (type == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"Can't convert checksum to protobuf: " + checksum);
|
||||
|
|
|
@ -54,12 +54,7 @@ message OpReadBlockProto {
|
|||
|
||||
|
||||
message ChecksumProto {
|
||||
enum ChecksumType {
|
||||
NULL = 0;
|
||||
CRC32 = 1;
|
||||
CRC32C = 2;
|
||||
}
|
||||
required ChecksumType type = 1;
|
||||
required ChecksumTypeProto type = 1;
|
||||
required uint32 bytesPerChecksum = 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue