Java 类org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto 实例源码

项目:hadoop    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hadoop    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hadoop    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:big-c    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:big-c    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:big-c    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hadoop-plus    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:FlexMap    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hadoop-TCP    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hardfs    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  if (cmd instanceof CheckpointCommand) {
    return NamenodeCommandProto.newBuilder().setAction(cmd.getAction())
        .setType(NamenodeCommandProto.Type.CheckPointCommand)
        .setCheckpointCmd(convert((CheckpointCommand) cmd)).build();
  }
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) return null;
  switch (cmd.getType()) {
  case CheckPointCommand:
    CheckpointCommandProto chkPt = cmd.getCheckpointCmd();
    return new CheckpointCommand(PBHelper.convert(chkPt.getSignature()),
        chkPt.getNeedToReturnImage());
  default:
    return new NamenodeCommand(cmd.getAction());
  }
}
项目:hadoop-on-lustre2    文件:NamenodeProtocolTranslatorPB.java   
@Override
public NamenodeCommand startCheckpoint(NamenodeRegistration registration)
    throws IOException {
  StartCheckpointRequestProto req = StartCheckpointRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration)).build();
  NamenodeCommandProto cmd;
  try {
    cmd = rpcProxy.startCheckpoint(NULL_CONTROLLER, req).getCommand();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
  return PBHelper.convert(cmd);
}
项目:hops    文件:PBHelper.java   
public static NamenodeCommandProto convert(NamenodeCommand cmd) {
  return NamenodeCommandProto.newBuilder()
      .setType(NamenodeCommandProto.Type.NamenodeCommand)
      .setAction(cmd.getAction()).build();
}
项目:hops    文件:PBHelper.java   
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
  if (cmd == null) {
    return null;
  }
  return new NamenodeCommand(cmd.getAction());
}