HDFS-2666. Fix TestBackupNode failure. Contributed by Suresh Srinivas.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1213808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eae3a91b19
commit
4ec8424e5d
|
@ -34,6 +34,8 @@ Trunk (unreleased changes)
|
||||||
|
|
||||||
HDFS-2663. Handle protobuf optional parameters correctly. (suresh)
|
HDFS-2663. Handle protobuf optional parameters correctly. (suresh)
|
||||||
|
|
||||||
|
HDFS-2666. Fix TestBackupNode failure. (suresh)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
HADOOP-7524 Change RPC to allow multiple protocols including multuple
|
HADOOP-7524 Change RPC to allow multiple protocols including multuple
|
||||||
|
|
|
@ -343,16 +343,19 @@ public class PBHelper {
|
||||||
|
|
||||||
public static CheckpointCommandProto convert(CheckpointCommand cmd) {
|
public static CheckpointCommandProto convert(CheckpointCommand cmd) {
|
||||||
return CheckpointCommandProto.newBuilder()
|
return CheckpointCommandProto.newBuilder()
|
||||||
.setSignature(convert(cmd.getSignature())).build();
|
.setSignature(convert(cmd.getSignature()))
|
||||||
|
.setNeedToReturnImage(cmd.needToReturnImage()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
|
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
|
||||||
if (cmd instanceof CheckpointCommand) {
|
if (cmd instanceof CheckpointCommand) {
|
||||||
return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
|
return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
|
||||||
.setType(NamenodeCommandProto.Type.NamenodeCommand)
|
.setType(NamenodeCommandProto.Type.CheckPointCommand)
|
||||||
.setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
|
.setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
|
||||||
}
|
}
|
||||||
return NamenodeCommandProto.newBuilder().setAction(cmd.getAction()).build();
|
return NamenodeCommandProto.newBuilder()
|
||||||
|
.setType(NamenodeCommandProto.Type.NamenodeCommand)
|
||||||
|
.setAction(cmd.getAction()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BlockKey[] convertBlockKeys(List<BlockKeyProto> list) {
|
public static BlockKey[] convertBlockKeys(List<BlockKeyProto> list) {
|
||||||
|
|
Loading…
Reference in New Issue