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:
Suresh Srinivas 2012-10-12 14:34:42 +00:00
parent bc42561787
commit 5f571ab869
3 changed files with 6 additions and 8 deletions

View File

@ -97,6 +97,9 @@ Release 2.0.3-alpha - Unreleased
HDFS-4021. Misleading error message when resources are low on the NameNode. HDFS-4021. Misleading error message when resources are low on the NameNode.
(Christopher Conner via atm) (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 Release 2.0.2-alpha - 2012-09-07
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -24,9 +24,9 @@ import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.protocol.HdfsProtoUtil; import org.apache.hadoop.hdfs.protocol.HdfsProtoUtil;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BaseHeaderProto; 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;
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.ClientOperationHeaderProto;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.OpWriteBlockProto; 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.hdfs.security.token.block.BlockTokenIdentifier;
import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.util.DataChecksum; import org.apache.hadoop.util.DataChecksum;
@ -52,7 +52,7 @@ public abstract class DataTransferProtoUtil {
} }
public static ChecksumProto toProto(DataChecksum checksum) { public static ChecksumProto toProto(DataChecksum checksum) {
ChecksumType type = ChecksumType.valueOf(checksum.getChecksumType().name()); ChecksumTypeProto type = ChecksumTypeProto.valueOf(checksum.getChecksumType().name());
if (type == null) { if (type == null) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Can't convert checksum to protobuf: " + checksum); "Can't convert checksum to protobuf: " + checksum);

View File

@ -54,12 +54,7 @@ message OpReadBlockProto {
message ChecksumProto { message ChecksumProto {
enum ChecksumType { required ChecksumTypeProto type = 1;
NULL = 0;
CRC32 = 1;
CRC32C = 2;
}
required ChecksumType type = 1;
required uint32 bytesPerChecksum = 2; required uint32 bytesPerChecksum = 2;
} }