Search in sources :

Example 1 with GetSpaceQuotaSnapshotsResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.GetSpaceQuotaSnapshotsResponse in project hbase by apache.

the class RSRpcServices method getSpaceQuotaSnapshots.

@Override
public GetSpaceQuotaSnapshotsResponse getSpaceQuotaSnapshots(RpcController controller, GetSpaceQuotaSnapshotsRequest request) throws ServiceException {
    try {
        final RegionServerSpaceQuotaManager manager = server.getRegionServerSpaceQuotaManager();
        final GetSpaceQuotaSnapshotsResponse.Builder builder = GetSpaceQuotaSnapshotsResponse.newBuilder();
        if (manager != null) {
            final Map<TableName, SpaceQuotaSnapshot> snapshots = manager.copyQuotaSnapshots();
            for (Entry<TableName, SpaceQuotaSnapshot> snapshot : snapshots.entrySet()) {
                builder.addSnapshots(TableQuotaSnapshot.newBuilder().setTableName(ProtobufUtil.toProtoTableName(snapshot.getKey())).setSnapshot(SpaceQuotaSnapshot.toProtoSnapshot(snapshot.getValue())).build());
            }
        }
        return builder.build();
    } catch (Exception e) {
        throw new ServiceException(e);
    }
}
Also used : SpaceQuotaSnapshot(org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot) TableName(org.apache.hadoop.hbase.TableName) RegionServerSpaceQuotaManager(org.apache.hadoop.hbase.quotas.RegionServerSpaceQuotaManager) ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) FailedSanityCheckException(org.apache.hadoop.hbase.exceptions.FailedSanityCheckException) ResultOrException(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ResultOrException) ScannerResetException(org.apache.hadoop.hbase.exceptions.ScannerResetException) OutOfOrderScannerNextException(org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException) RegionTooBusyException(org.apache.hadoop.hbase.RegionTooBusyException) IOException(java.io.IOException) LeaseStillHeldException(org.apache.hadoop.hbase.regionserver.LeaseManager.LeaseStillHeldException) NotServingRegionException(org.apache.hadoop.hbase.NotServingRegionException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException) HBaseIOException(org.apache.hadoop.hbase.HBaseIOException) ServerNotRunningYetException(org.apache.hadoop.hbase.ipc.ServerNotRunningYetException) UnknownProtocolException(org.apache.hadoop.hbase.exceptions.UnknownProtocolException) ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) UncheckedIOException(java.io.UncheckedIOException) UnknownScannerException(org.apache.hadoop.hbase.UnknownScannerException) FileNotFoundException(java.io.FileNotFoundException) BindException(java.net.BindException) DroppedSnapshotException(org.apache.hadoop.hbase.DroppedSnapshotException) GetSpaceQuotaSnapshotsResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.GetSpaceQuotaSnapshotsResponse)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 UncheckedIOException (java.io.UncheckedIOException)1 BindException (java.net.BindException)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 DroppedSnapshotException (org.apache.hadoop.hbase.DroppedSnapshotException)1 HBaseIOException (org.apache.hadoop.hbase.HBaseIOException)1 NotServingRegionException (org.apache.hadoop.hbase.NotServingRegionException)1 RegionTooBusyException (org.apache.hadoop.hbase.RegionTooBusyException)1 TableName (org.apache.hadoop.hbase.TableName)1 UnknownScannerException (org.apache.hadoop.hbase.UnknownScannerException)1 FailedSanityCheckException (org.apache.hadoop.hbase.exceptions.FailedSanityCheckException)1 OutOfOrderScannerNextException (org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException)1 ScannerResetException (org.apache.hadoop.hbase.exceptions.ScannerResetException)1 UnknownProtocolException (org.apache.hadoop.hbase.exceptions.UnknownProtocolException)1 ServerNotRunningYetException (org.apache.hadoop.hbase.ipc.ServerNotRunningYetException)1 RegionServerSpaceQuotaManager (org.apache.hadoop.hbase.quotas.RegionServerSpaceQuotaManager)1 SpaceQuotaSnapshot (org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot)1 LeaseStillHeldException (org.apache.hadoop.hbase.regionserver.LeaseManager.LeaseStillHeldException)1 ResultOrException (org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ResultOrException)1