Search in sources :

Example 1 with GetReplicationPeerConfigResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos.GetReplicationPeerConfigResponse in project hbase by apache.

the class MasterRpcServices method getReplicationPeerConfig.

@Override
public GetReplicationPeerConfigResponse getReplicationPeerConfig(RpcController controller, GetReplicationPeerConfigRequest request) throws ServiceException {
    GetReplicationPeerConfigResponse.Builder response = GetReplicationPeerConfigResponse.newBuilder();
    try {
        String peerId = request.getPeerId();
        ReplicationPeerConfig peerConfig = master.getReplicationPeerConfig(peerId);
        response.setPeerId(peerId);
        response.setPeerConfig(ReplicationSerDeHelper.convert(peerConfig));
    } catch (ReplicationException | IOException e) {
        throw new ServiceException(e);
    }
    return response.build();
}
Also used : ReplicationPeerConfig(org.apache.hadoop.hbase.replication.ReplicationPeerConfig) ServiceException(org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException) GetReplicationPeerConfigResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos.GetReplicationPeerConfigResponse) ReplicationException(org.apache.hadoop.hbase.replication.ReplicationException) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

IOException (java.io.IOException)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 ReplicationException (org.apache.hadoop.hbase.replication.ReplicationException)1 ReplicationPeerConfig (org.apache.hadoop.hbase.replication.ReplicationPeerConfig)1 ServiceException (org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException)1 GetReplicationPeerConfigResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.ReplicationProtos.GetReplicationPeerConfigResponse)1