Search in sources :

Example 1 with RollingUpgradeResponseProto

use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RollingUpgradeResponseProto in project hadoop by apache.

the class ClientNamenodeProtocolServerSideTranslatorPB method rollingUpgrade.

@Override
public RollingUpgradeResponseProto rollingUpgrade(RpcController controller, RollingUpgradeRequestProto req) throws ServiceException {
    try {
        final RollingUpgradeInfo info = server.rollingUpgrade(PBHelperClient.convert(req.getAction()));
        final RollingUpgradeResponseProto.Builder b = RollingUpgradeResponseProto.newBuilder();
        if (info != null) {
            b.setRollingUpgradeInfo(PBHelperClient.convert(info));
        }
        return b.build();
    } catch (IOException e) {
        throw new ServiceException(e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) RollingUpgradeInfo(org.apache.hadoop.hdfs.protocol.RollingUpgradeInfo) RollingUpgradeResponseProto(org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RollingUpgradeResponseProto) IOException(java.io.IOException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 IOException (java.io.IOException)1 RollingUpgradeInfo (org.apache.hadoop.hdfs.protocol.RollingUpgradeInfo)1 RollingUpgradeResponseProto (org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RollingUpgradeResponseProto)1