svn merge -c 1213808 from trunk for HDFS-2666.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23-PB@1230869 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2012-01-13 02:47:53 +00:00
parent 2a868f161e
commit 51e1cdd07d
2 changed files with 8 additions and 3 deletions

View File

@ -28,6 +28,8 @@ Release 0.23-PB - Unreleased
HDFS-2647. Used protobuf based RPC for InterDatanodeProtocol, HDFS-2647. Used protobuf based RPC for InterDatanodeProtocol,
ClientDatanodeProtocol, JournalProtocol, NamenodeProtocol. (suresh) ClientDatanodeProtocol, JournalProtocol, NamenodeProtocol. (suresh)
HDFS-2666. Fix TestBackupNode failure. (suresh)
IMPROVEMENTS IMPROVEMENTS
HDFS-2018. Move all journal stream management code into one place. HDFS-2018. Move all journal stream management code into one place.

View File

@ -339,16 +339,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) {