Search in sources :

Example 1 with UpgradeFinalizationStatus

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus in project ozone by apache.

the class StorageContainerLocationProtocolClientSideTranslatorPB method finalizeScmUpgrade.

@Override
public StatusAndMessages finalizeScmUpgrade(String upgradeClientID) throws IOException {
    FinalizeScmUpgradeRequestProto req = FinalizeScmUpgradeRequestProto.newBuilder().setUpgradeClientId(upgradeClientID).build();
    FinalizeScmUpgradeResponseProto response = submitRequest(Type.FinalizeScmUpgrade, builder -> builder.setFinalizeScmUpgradeRequest(req)).getFinalizeScmUpgradeResponse();
    UpgradeFinalizationStatus status = response.getStatus();
    return new StatusAndMessages(UpgradeFinalizer.Status.valueOf(status.getStatus().name()), status.getMessagesList());
}
Also used : DatanodeAdminErrorResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeAdminErrorResponseProto) GetContainerWithPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineRequestProto) HddsProtos(org.apache.hadoop.hdds.protocol.proto.HddsProtos) RecommissionNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.RecommissionNodesRequestProto) StartReplicationManagerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartReplicationManagerRequestProto) UpgradeFinalizer(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer) SCMContainerLocationFailoverProxyProvider(org.apache.hadoop.hdds.scm.proxy.SCMContainerLocationFailoverProxyProvider) ServiceException(com.google.protobuf.ServiceException) SCMListContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMListContainerRequestProto) StopContainerBalancerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StopContainerBalancerRequestProto) GetContainerWithPipelineBatchRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineBatchRequestProto) ScmContainerLocationResponse(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationResponse) Pair(org.apache.commons.lang3.tuple.Pair) ProtocolTranslator(org.apache.hadoop.ipc.ProtocolTranslator) ProtobufHelper(org.apache.hadoop.ipc.ProtobufHelper) StartMaintenanceNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartMaintenanceNodesRequestProto) Map(java.util.Map) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages) ScmInfo(org.apache.hadoop.hdds.scm.ScmInfo) RecommissionNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.RecommissionNodesResponseProto) SCMListContainerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMListContainerResponseProto) NodeQueryRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.NodeQueryRequestProto) ForceExitSafeModeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ForceExitSafeModeRequestProto) PipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.PipelineRequestProto) Builder(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationRequest.Builder) StartContainerBalancerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerRequestProto) ActivatePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ActivatePipelineRequestProto) RpcController(com.google.protobuf.RpcController) FinalizeScmUpgradeResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeResponseProto) SCMCloseContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMCloseContainerRequestProto) SCMDeleteContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto) Type(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.Type) ClosePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ClosePipelineRequestProto) ContainerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerResponseProto) DeactivatePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DeactivatePipelineRequestProto) List(java.util.List) GetContainerReplicasRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerReplicasRequestProto) ListPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ListPipelineRequestProto) QueryUpgradeFinalizationProgressRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressRequestProto) QueryUpgradeFinalizationProgressResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressResponseProto) ContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerRequestProto) ReplicationManagerReportResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerReportResponseProto) GetContainerCountResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerCountResponseProto) StopReplicationManagerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StopReplicationManagerRequestProto) RPC(org.apache.hadoop.ipc.RPC) Optional(java.util.Optional) ReplicationManagerReport(org.apache.hadoop.hdds.scm.container.ReplicationManagerReport) GetContainerCountRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerCountRequestProto) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) GetScmInfoResponseProto(org.apache.hadoop.hdds.protocol.proto.HddsProtos.GetScmInfoResponseProto) CURRENT_VERSION(org.apache.hadoop.ozone.ClientVersions.CURRENT_VERSION) StorageContainerLocationProtocolProtos(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos) InSafeModeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.InSafeModeRequestProto) HashMap(java.util.HashMap) GetSafeModeRuleStatusesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetSafeModeRuleStatusesRequestProto) UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) GetContainerTokenResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerTokenResponseProto) ArrayList(java.util.ArrayList) FinalizeScmUpgradeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeRequestProto) DatanodeUsageInfoRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeUsageInfoRequestProto) GetContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerRequestProto) ReplicationManagerStatusRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusRequestProto) NodeQueryResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.NodeQueryResponseProto) ScmContainerLocationRequest(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationRequest) GetPipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetPipelineResponseProto) DecommissionNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionNodesRequestProto) ContainerBalancerStatusRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerBalancerStatusRequestProto) ReplicationManagerStatusResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusResponseProto) GetExistContainerWithPipelinesInBatchRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetExistContainerWithPipelinesInBatchRequestProto) GetPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetPipelineRequestProto) DatanodeUsageInfoResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeUsageInfoResponseProto) StartMaintenanceNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartMaintenanceNodesResponseProto) DatanodeAdminError(org.apache.hadoop.hdds.scm.DatanodeAdminError) ForceExitSafeModeResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ForceExitSafeModeResponseProto) ContainerBalancerStatusResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerBalancerStatusResponseProto) ContainerWithPipeline(org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline) ContainerID(org.apache.hadoop.hdds.scm.container.ContainerID) Pipeline(org.apache.hadoop.hdds.scm.pipeline.Pipeline) IOException(java.io.IOException) Token(org.apache.hadoop.security.token.Token) PipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.PipelineResponseProto) Consumer(java.util.function.Consumer) GetSafeModeRuleStatusesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetSafeModeRuleStatusesResponseProto) DecommissionNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionNodesResponseProto) ListPipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ListPipelineResponseProto) InterfaceAudience(org.apache.hadoop.hdds.annotation.InterfaceAudience) SafeModeRuleStatusProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SafeModeRuleStatusProto) TracingUtil(org.apache.hadoop.hdds.tracing.TracingUtil) StorageContainerLocationProtocol(org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol) Closeable(java.io.Closeable) GetContainerTokenRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerTokenRequestProto) Preconditions(com.google.common.base.Preconditions) ReplicationManagerReportRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerReportRequestProto) RetryProxy(org.apache.hadoop.io.retry.RetryProxy) StartContainerBalancerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerResponseProto) FinalizeScmUpgradeResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeResponseProto) UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages) FinalizeScmUpgradeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeRequestProto)

Example 2 with UpgradeFinalizationStatus

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus in project ozone by apache.

the class StorageContainerLocationProtocolClientSideTranslatorPB method queryUpgradeFinalizationProgress.

@Override
public StatusAndMessages queryUpgradeFinalizationProgress(String upgradeClientID, boolean force, boolean readonly) throws IOException {
    QueryUpgradeFinalizationProgressRequestProto req = QueryUpgradeFinalizationProgressRequestProto.newBuilder().setUpgradeClientId(upgradeClientID).setTakeover(force).setReadonly(readonly).build();
    QueryUpgradeFinalizationProgressResponseProto response = submitRequest(Type.QueryUpgradeFinalizationProgress, builder -> builder.setQueryUpgradeFinalizationProgressRequest(req)).getQueryUpgradeFinalizationProgressResponse();
    UpgradeFinalizationStatus status = response.getStatus();
    return new StatusAndMessages(UpgradeFinalizer.Status.valueOf(status.getStatus().name()), status.getMessagesList());
}
Also used : DatanodeAdminErrorResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeAdminErrorResponseProto) GetContainerWithPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineRequestProto) HddsProtos(org.apache.hadoop.hdds.protocol.proto.HddsProtos) RecommissionNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.RecommissionNodesRequestProto) StartReplicationManagerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartReplicationManagerRequestProto) UpgradeFinalizer(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer) SCMContainerLocationFailoverProxyProvider(org.apache.hadoop.hdds.scm.proxy.SCMContainerLocationFailoverProxyProvider) ServiceException(com.google.protobuf.ServiceException) SCMListContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMListContainerRequestProto) StopContainerBalancerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StopContainerBalancerRequestProto) GetContainerWithPipelineBatchRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineBatchRequestProto) ScmContainerLocationResponse(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationResponse) Pair(org.apache.commons.lang3.tuple.Pair) ProtocolTranslator(org.apache.hadoop.ipc.ProtocolTranslator) ProtobufHelper(org.apache.hadoop.ipc.ProtobufHelper) StartMaintenanceNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartMaintenanceNodesRequestProto) Map(java.util.Map) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages) ScmInfo(org.apache.hadoop.hdds.scm.ScmInfo) RecommissionNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.RecommissionNodesResponseProto) SCMListContainerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMListContainerResponseProto) NodeQueryRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.NodeQueryRequestProto) ForceExitSafeModeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ForceExitSafeModeRequestProto) PipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.PipelineRequestProto) Builder(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationRequest.Builder) StartContainerBalancerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerRequestProto) ActivatePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ActivatePipelineRequestProto) RpcController(com.google.protobuf.RpcController) FinalizeScmUpgradeResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeResponseProto) SCMCloseContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMCloseContainerRequestProto) SCMDeleteContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto) Type(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.Type) ClosePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ClosePipelineRequestProto) ContainerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerResponseProto) DeactivatePipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DeactivatePipelineRequestProto) List(java.util.List) GetContainerReplicasRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerReplicasRequestProto) ListPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ListPipelineRequestProto) QueryUpgradeFinalizationProgressRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressRequestProto) QueryUpgradeFinalizationProgressResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressResponseProto) ContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerRequestProto) ReplicationManagerReportResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerReportResponseProto) GetContainerCountResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerCountResponseProto) StopReplicationManagerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StopReplicationManagerRequestProto) RPC(org.apache.hadoop.ipc.RPC) Optional(java.util.Optional) ReplicationManagerReport(org.apache.hadoop.hdds.scm.container.ReplicationManagerReport) GetContainerCountRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerCountRequestProto) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) GetScmInfoResponseProto(org.apache.hadoop.hdds.protocol.proto.HddsProtos.GetScmInfoResponseProto) CURRENT_VERSION(org.apache.hadoop.ozone.ClientVersions.CURRENT_VERSION) StorageContainerLocationProtocolProtos(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos) InSafeModeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.InSafeModeRequestProto) HashMap(java.util.HashMap) GetSafeModeRuleStatusesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetSafeModeRuleStatusesRequestProto) UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) GetContainerTokenResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerTokenResponseProto) ArrayList(java.util.ArrayList) FinalizeScmUpgradeRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.FinalizeScmUpgradeRequestProto) DatanodeUsageInfoRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeUsageInfoRequestProto) GetContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerRequestProto) ReplicationManagerStatusRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusRequestProto) NodeQueryResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.NodeQueryResponseProto) ScmContainerLocationRequest(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationRequest) GetPipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetPipelineResponseProto) DecommissionNodesRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionNodesRequestProto) ContainerBalancerStatusRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerBalancerStatusRequestProto) ReplicationManagerStatusResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusResponseProto) GetExistContainerWithPipelinesInBatchRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetExistContainerWithPipelinesInBatchRequestProto) GetPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetPipelineRequestProto) DatanodeUsageInfoResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DatanodeUsageInfoResponseProto) StartMaintenanceNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartMaintenanceNodesResponseProto) DatanodeAdminError(org.apache.hadoop.hdds.scm.DatanodeAdminError) ForceExitSafeModeResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ForceExitSafeModeResponseProto) ContainerBalancerStatusResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerBalancerStatusResponseProto) ContainerWithPipeline(org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline) ContainerID(org.apache.hadoop.hdds.scm.container.ContainerID) Pipeline(org.apache.hadoop.hdds.scm.pipeline.Pipeline) IOException(java.io.IOException) Token(org.apache.hadoop.security.token.Token) PipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.PipelineResponseProto) Consumer(java.util.function.Consumer) GetSafeModeRuleStatusesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetSafeModeRuleStatusesResponseProto) DecommissionNodesResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionNodesResponseProto) ListPipelineResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ListPipelineResponseProto) InterfaceAudience(org.apache.hadoop.hdds.annotation.InterfaceAudience) SafeModeRuleStatusProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SafeModeRuleStatusProto) TracingUtil(org.apache.hadoop.hdds.tracing.TracingUtil) StorageContainerLocationProtocol(org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol) Closeable(java.io.Closeable) GetContainerTokenRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerTokenRequestProto) Preconditions(com.google.common.base.Preconditions) ReplicationManagerReportRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerReportRequestProto) RetryProxy(org.apache.hadoop.io.retry.RetryProxy) StartContainerBalancerResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerResponseProto) QueryUpgradeFinalizationProgressRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressRequestProto) UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages) QueryUpgradeFinalizationProgressResponseProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.QueryUpgradeFinalizationProgressResponseProto)

Example 3 with UpgradeFinalizationStatus

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus in project ozone by apache.

the class StorageContainerLocationProtocolServerSideTranslatorPB method getFinalizeScmUpgrade.

public FinalizeScmUpgradeResponseProto getFinalizeScmUpgrade(FinalizeScmUpgradeRequestProto request) throws IOException {
    StatusAndMessages progress = impl.finalizeScmUpgrade(request.getUpgradeClientId());
    UpgradeFinalizationStatus.Status protoStatus = UpgradeFinalizationStatus.Status.valueOf(progress.status().name());
    UpgradeFinalizationStatus response = UpgradeFinalizationStatus.newBuilder().setStatus(protoStatus).addAllMessages(progress.msgs()).build();
    return FinalizeScmUpgradeResponseProto.newBuilder().setStatus(response).build();
}
Also used : UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages)

Example 4 with UpgradeFinalizationStatus

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus in project ozone by apache.

the class OzoneManagerProtocolClientSideTranslatorPB method queryUpgradeFinalizationProgress.

@Override
public StatusAndMessages queryUpgradeFinalizationProgress(String upgradeClientID, boolean takeover, boolean readonly) throws IOException {
    FinalizeUpgradeProgressRequest req = FinalizeUpgradeProgressRequest.newBuilder().setUpgradeClientId(upgradeClientID).setTakeover(takeover).setReadonly(readonly).build();
    OMRequest omRequest = createOMRequest(Type.FinalizeUpgradeProgress).setFinalizeUpgradeProgressRequest(req).build();
    FinalizeUpgradeProgressResponse response = handleError(submitRequest(omRequest)).getFinalizeUpgradeProgressResponse();
    UpgradeFinalizationStatus status = response.getStatus();
    return new StatusAndMessages(UpgradeFinalizer.Status.valueOf(status.getStatus().name()), status.getMessagesList());
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) FinalizeUpgradeProgressResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.FinalizeUpgradeProgressResponse) UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages) FinalizeUpgradeProgressRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.FinalizeUpgradeProgressRequest)

Example 5 with UpgradeFinalizationStatus

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus in project ozone by apache.

the class OzoneManagerRequestHandler method reportUpgradeProgress.

private FinalizeUpgradeProgressResponse reportUpgradeProgress(FinalizeUpgradeProgressRequest request) throws IOException {
    String upgradeClientId = request.getUpgradeClientId();
    boolean takeover = request.getTakeover();
    boolean readonly = request.getReadonly();
    StatusAndMessages progress = impl.queryUpgradeFinalizationProgress(upgradeClientId, takeover, readonly);
    UpgradeFinalizationStatus.Status protoStatus = UpgradeFinalizationStatus.Status.valueOf(progress.status().name());
    UpgradeFinalizationStatus response = UpgradeFinalizationStatus.newBuilder().setStatus(protoStatus).addAllMessages(progress.msgs()).build();
    return FinalizeUpgradeProgressResponse.newBuilder().setStatus(response).build();
}
Also used : UpgradeFinalizationStatus(org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus) StatusAndMessages(org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages)

Aggregations

UpgradeFinalizationStatus (org.apache.hadoop.hdds.protocol.proto.HddsProtos.UpgradeFinalizationStatus)8 StatusAndMessages (org.apache.hadoop.ozone.upgrade.UpgradeFinalizer.StatusAndMessages)8 IOException (java.io.IOException)3 Preconditions (com.google.common.base.Preconditions)2 RpcController (com.google.protobuf.RpcController)2 ServiceException (com.google.protobuf.ServiceException)2 Closeable (java.io.Closeable)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Optional (java.util.Optional)2 Consumer (java.util.function.Consumer)2 Pair (org.apache.commons.lang3.tuple.Pair)2 InterfaceAudience (org.apache.hadoop.hdds.annotation.InterfaceAudience)2 HddsProtos (org.apache.hadoop.hdds.protocol.proto.HddsProtos)2 GetScmInfoResponseProto (org.apache.hadoop.hdds.protocol.proto.HddsProtos.GetScmInfoResponseProto)2 StorageContainerLocationProtocolProtos (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos)2 ActivatePipelineRequestProto (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ActivatePipelineRequestProto)2 ClosePipelineRequestProto (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ClosePipelineRequestProto)2