Java 类org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.NNHAStatusHeartbeatProto 实例源码

项目:hadoop    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(HAServiceProtocolProtos.HAServiceStateProto.ACTIVE);
      break;
    case STANDBY:
      builder.setState(HAServiceProtocolProtos.HAServiceStateProto.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:big-c    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hadoop-plus    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:FlexMap    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hardfs    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) {
  if (hb == null) return null;
  NNHAStatusHeartbeatProto.Builder builder =
    NNHAStatusHeartbeatProto.newBuilder();
  switch (hb.getState()) {
    case ACTIVE:
      builder.setState(NNHAStatusHeartbeatProto.State.ACTIVE);
      break;
    case STANDBY:
      builder.setState(NNHAStatusHeartbeatProto.State.STANDBY);
      break;
    default:
      throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" +
          hb.getState());
  }
  builder.setTxid(hb.getTxId());
  return builder.build();
}
项目:hadoop    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:aliyun-oss-hadoop-fs    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:big-c    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:hadoop-plus    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:FlexMap    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:hardfs    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s) {
  if (s == null) return null;
  switch (s.getState()) {
  case ACTIVE:
    return new NNHAStatusHeartbeat(HAServiceState.ACTIVE, s.getTxid());
  case STANDBY:
    return new NNHAStatusHeartbeat(HAServiceState.STANDBY, s.getTxid());
  default:
    throw new IllegalArgumentException("Unexpected NNHAStatusHeartbeat.State:" + s.getState());
  }
}