HDFS-5079. Cleaning up NNHAStatusHeartbeat.State from DatanodeProtocolProtos. Contributed by Tao Luo.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1514118 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9cf82b6a7b
commit
4c8db60092
@ -6,6 +6,9 @@ Trunk (Unreleased)
|
||||
|
||||
HDFS-3034. Remove the deprecated DFSOutputStream.sync() method. (szetszwo)
|
||||
|
||||
HDFS-5079. Cleaning up NNHAStatusHeartbeat.State from
|
||||
DatanodeProtocolProtos. (Tao Luo via shv)
|
||||
|
||||
NEW FEATURES
|
||||
|
||||
HDFS-3125. Add JournalService to enable Journal Daemon. (suresh)
|
||||
|
@ -30,6 +30,7 @@
|
||||
import org.apache.hadoop.fs.FsServerDefaults;
|
||||
import org.apache.hadoop.fs.permission.FsPermission;
|
||||
import org.apache.hadoop.ha.HAServiceProtocol.HAServiceState;
|
||||
import org.apache.hadoop.ha.proto.HAServiceProtocolProtos;
|
||||
import org.apache.hadoop.hdfs.DFSUtil;
|
||||
import org.apache.hadoop.hdfs.protocol.Block;
|
||||
import org.apache.hadoop.hdfs.protocol.ClientProtocol;
|
||||
@ -1311,10 +1312,10 @@ public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
|
||||
NNHAStatusHeartbeatProto.newBuilder();
|
||||
switch (hb.getState()) {
|
||||
case ACTIVE:
|
||||
builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
|
||||
builder.setState(HAServiceProtocolProtos.HAServiceStateProto.ACTIVE);
|
||||
break;
|
||||
case STANDBY:
|
||||
builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
|
||||
builder.setState(HAServiceProtocolProtos.HAServiceStateProto.STANDBY);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
|
||||
|
@ -31,6 +31,7 @@ option java_generic_services = true;
|
||||
option java_generate_equals_and_hash = true;
|
||||
package hadoop.hdfs;
|
||||
|
||||
import "HAServiceProtocol.proto";
|
||||
import "hdfs.proto";
|
||||
|
||||
/**
|
||||
@ -185,11 +186,7 @@ message StorageReportProto {
|
||||
* txid - Highest transaction ID this NN has seen
|
||||
*/
|
||||
message NNHAStatusHeartbeatProto {
|
||||
enum State {
|
||||
ACTIVE = 0;
|
||||
STANDBY = 1;
|
||||
}
|
||||
required State state = 1;
|
||||
required hadoop.common.HAServiceStateProto state = 1;
|
||||
required uint64 txid = 2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user