Class SpaceLimitSettings

java.lang.Object
org.apache.hadoop.hbase.quotas.QuotaSettings
org.apache.hadoop.hbase.quotas.SpaceLimitSettings

@Private @Evolving class SpaceLimitSettings extends QuotaSettings
A QuotaSettings implementation for configuring filesystem-use quotas.
  • Field Details

    • proto

      private final org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest proto
  • Constructor Details

  • Method Details

    • buildProtoFromQuota

      private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoFromQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota protoQuota)
      Build a QuotaProtos.SpaceLimitRequest protobuf object from the given QuotaProtos.SpaceQuota.
      Parameters:
      protoQuota - The preconstructed SpaceQuota protobuf
      Returns:
      A protobuf request to change a space limit quota
    • buildProtoAddQuota

      private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoAddQuota(long sizeLimit, SpaceViolationPolicy violationPolicy)
      Builds a QuotaProtos.SpaceQuota protobuf object given the arguments.
      Parameters:
      sizeLimit - The size limit of the quota.
      violationPolicy - The action to take when the quota is exceeded.
      Returns:
      The protobuf SpaceQuota representation.
    • buildProtoRemoveQuota

      private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoRemoveQuota()
      Builds a QuotaProtos.SpaceQuota protobuf object to remove a quota.
      Returns:
      The protobuf SpaceQuota representation.
    • getProto

      org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest getProto()
      Returns a copy of the internal state of this
    • getQuotaType

      Specified by:
      getQuotaType in class QuotaSettings
    • setupSetQuotaRequest

      protected void setupSetQuotaRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder builder)
      Description copied from class: QuotaSettings
      Called by toSetQuotaRequestProto() the subclass should implement this method to set the specific SetQuotaRequest properties.
      Specified by:
      setupSetQuotaRequest in class QuotaSettings
    • fromSpaceQuota

      static SpaceLimitSettings fromSpaceQuota(TableName tableName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
      Constructs a SpaceLimitSettings from the provided protobuf message and tablename.
      Parameters:
      tableName - The target tablename for the limit.
      proto - The protobuf representation.
      Returns:
      A QuotaSettings.
    • fromSpaceQuota

      static SpaceLimitSettings fromSpaceQuota(String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
      Constructs a SpaceLimitSettings from the provided protobuf message and namespace.
      Parameters:
      namespace - The target namespace for the limit.
      proto - The protobuf representation.
      Returns:
      A QuotaSettings.
    • validateProtoArguments

      static void validateProtoArguments(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
      Validates that the provided protobuf SpaceQuota has the necessary information to construct a SpaceLimitSettings.
      Parameters:
      proto - The protobuf message to validate.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • merge

      protected QuotaSettings merge(QuotaSettings newSettings)
      Description copied from class: QuotaSettings
      Merges the provided settings with this and returns a new settings object to the caller if the merged settings differ from the original.
      Specified by:
      merge in class QuotaSettings
      Parameters:
      newSettings - The new settings to merge in.
      Returns:
      The merged QuotaSettings object or null if the quota should be deleted.
    • validateSizeLimit

      private void validateSizeLimit(long sizeLimit)