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:
parent
2a868f161e
commit
51e1cdd07d
|
@ -28,6 +28,8 @@ Release 0.23-PB - Unreleased
|
|||
HDFS-2647. Used protobuf based RPC for InterDatanodeProtocol,
|
||||
ClientDatanodeProtocol, JournalProtocol, NamenodeProtocol. (suresh)
|
||||
|
||||
HDFS-2666. Fix TestBackupNode failure. (suresh)
|
||||
|
||||
IMPROVEMENTS
|
||||
|
||||
HDFS-2018. Move all journal stream management code into one place.
|
||||
|
|
|
@ -339,16 +339,19 @@ public class PBHelper {
|
|||
|
||||
public static CheckpointCommandProto convert(CheckpointCommand cmd) {
|
||||
return CheckpointCommandProto.newBuilder()
|
||||
.setSignature(convert(cmd.getSignature())).build();
|
||||
.setSignature(convert(cmd.getSignature()))
|
||||
.setNeedToReturnImage(cmd.needToReturnImage()).build();
|
||||
}
|
||||
|
||||
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
|
||||
if (cmd instanceof CheckpointCommand) {
|
||||
return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
|
||||
.setType(NamenodeCommandProto.Type.NamenodeCommand)
|
||||
.setType(NamenodeCommandProto.Type.CheckPointCommand)
|
||||
.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) {
|
||||
|
|
Loading…
Reference in New Issue