Search in sources :

Example 1 with MajorCompactionTimestampResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse in project hbase by apache.

the class MasterRpcServices method getLastMajorCompactionTimestampForRegion.

@Override
public MajorCompactionTimestampResponse getLastMajorCompactionTimestampForRegion(RpcController controller, MajorCompactionTimestampForRegionRequest request) throws ServiceException {
    MajorCompactionTimestampResponse.Builder response = MajorCompactionTimestampResponse.newBuilder();
    try {
        master.checkInitialized();
        response.setCompactionTimestamp(master.getLastMajorCompactionTimestampForRegion(request.getRegion().getValue().toByteArray()));
    } catch (IOException e) {
        throw new ServiceException(e);
    }
    return response.build();
}
Also used : MajorCompactionTimestampResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse) ServiceException(org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Example 2 with MajorCompactionTimestampResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse in project hbase by apache.

the class MasterRpcServices method getLastMajorCompactionTimestamp.

@Override
public MajorCompactionTimestampResponse getLastMajorCompactionTimestamp(RpcController controller, MajorCompactionTimestampRequest request) throws ServiceException {
    MajorCompactionTimestampResponse.Builder response = MajorCompactionTimestampResponse.newBuilder();
    try {
        master.checkInitialized();
        response.setCompactionTimestamp(master.getLastMajorCompactionTimestamp(ProtobufUtil.toTableName(request.getTableName())));
    } catch (IOException e) {
        throw new ServiceException(e);
    }
    return response.build();
}
Also used : MajorCompactionTimestampResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse) ServiceException(org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

IOException (java.io.IOException)2 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)2 ServiceException (org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException)2 MajorCompactionTimestampResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse)2