hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [42/50] [abbrv] hbase git commit: HBASE-16995 Build client Java API and client protobuf messages - addendum fixes line lengths (Josh Elser)
Date Mon, 23 Jan 2017 23:02:15 GMT
HBASE-16995 Build client Java API and client protobuf messages - addendum fixes line lengths
(Josh Elser)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/41d73bd2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/41d73bd2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/41d73bd2

Branch: refs/heads/HBASE-16961
Commit: 41d73bd2b7919210ec032343bed30428913f83db
Parents: 26a643d
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Nov 21 13:00:27 2016 -0800
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Jan 23 17:48:59 2017 -0500

----------------------------------------------------------------------
 .../hbase/quotas/QuotaSettingsFactory.java      | 20 ++++++++++++--------
 .../hadoop/hbase/quotas/SpaceLimitSettings.java |  8 ++++----
 .../hbase/shaded/protobuf/ProtobufUtil.java     |  9 +++++----
 3 files changed, 21 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/41d73bd2/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java
index b8e99b8..f436cf2 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java
@@ -130,7 +130,8 @@ public class QuotaSettingsFactory {
 
   static QuotaSettings fromSpace(TableName table, String namespace, SpaceQuota protoQuota)
{
     if ((null == table && null == namespace) || (null != table && null !=
namespace)) {
-      throw new IllegalArgumentException("Can only construct SpaceLimitSettings for a table
or namespace.");
+      throw new IllegalArgumentException(
+          "Can only construct SpaceLimitSettings for a table or namespace.");
     }
     if (null != table) {
       return SpaceLimitSettings.fromSpaceQuota(table, protoQuota);
@@ -302,29 +303,32 @@ public class QuotaSettingsFactory {
    */
 
   /**
-   * Creates a {@link QuotaSettings} object to limit the FileSystem space usage for the given
table to the given size in bytes.
-   * When the space usage is exceeded by the table, the provided {@link SpaceViolationPolicy}
is enacted on the table.
+   * Creates a {@link QuotaSettings} object to limit the FileSystem space usage for the given
table
+   * to the given size in bytes. When the space usage is exceeded by the table, the provided
+   * {@link SpaceViolationPolicy} is enacted on the table.
    *
    * @param tableName The name of the table on which the quota should be applied.
    * @param sizeLimit The limit of a table's size in bytes.
    * @param violationPolicy The action to take when the quota is exceeded.
    * @return An {@link QuotaSettings} object.
    */
-  public static QuotaSettings limitTableSpace(final TableName tableName, long sizeLimit,
final SpaceViolationPolicy violationPolicy) {
+  public static QuotaSettings limitTableSpace(
+      final TableName tableName, long sizeLimit, final SpaceViolationPolicy violationPolicy)
{
     return new SpaceLimitSettings(tableName, sizeLimit, violationPolicy);
   }
 
   /**
-   * Creates a {@link QuotaSettings} object to limit the FileSystem space usage for the given
namespace to the given size in bytes.
-   * When the space usage is exceeded by all tables in the namespace, the provided {@link
SpaceViolationPolicy} is enacted on
-   * all tables in the namespace.
+   * Creates a {@link QuotaSettings} object to limit the FileSystem space usage for the given
+   * namespace to the given size in bytes. When the space usage is exceeded by all tables
in the
+   * namespace, the provided {@link SpaceViolationPolicy} is enacted on all tables in the
namespace.
    *
    * @param namespace The namespace on which the quota should be applied.
    * @param sizeLimit The limit of the namespace's size in bytes.
    * @param violationPolicy The action to take when the the quota is exceeded.
    * @return An {@link QuotaSettings} object.
    */
-  public static QuotaSettings limitNamespaceSpace(final String namespace, long sizeLimit,
final SpaceViolationPolicy violationPolicy) {
+  public static QuotaSettings limitNamespaceSpace(
+      final String namespace, long sizeLimit, final SpaceViolationPolicy violationPolicy)
{
     return new SpaceLimitSettings(namespace, sizeLimit, violationPolicy);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/41d73bd2/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitSettings.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitSettings.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitSettings.java
index dded9b5..e54882e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitSettings.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceLimitSettings.java
@@ -93,8 +93,8 @@ class SpaceLimitSettings extends QuotaSettings {
    * @param proto The protobuf representation.
    * @return A QuotaSettings.
    */
-  static SpaceLimitSettings fromSpaceQuota(final TableName tableName,
-      final QuotaProtos.SpaceQuota proto) {
+  static SpaceLimitSettings fromSpaceQuota(
+      final TableName tableName, final QuotaProtos.SpaceQuota proto) {
     validateProtoArguments(proto);
     return new SpaceLimitSettings(tableName, proto.getSoftLimit(),
         ProtobufUtil.toViolationPolicy(proto.getViolationPolicy()));
@@ -107,8 +107,8 @@ class SpaceLimitSettings extends QuotaSettings {
    * @param proto The protobuf representation.
    * @return A QuotaSettings.
    */
-  static SpaceLimitSettings fromSpaceQuota(final String namespace,
-      final QuotaProtos.SpaceQuota proto) {
+  static SpaceLimitSettings fromSpaceQuota(
+      final String namespace, final QuotaProtos.SpaceQuota proto) {
     validateProtoArguments(proto);
     return new SpaceLimitSettings(namespace, proto.getSoftLimit(),
         ProtobufUtil.toViolationPolicy(proto.getViolationPolicy()));

http://git-wip-us.apache.org/repos/asf/hbase/blob/41d73bd2/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
index 4f18138..d5dfeee 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
@@ -2523,7 +2523,8 @@ public final class ProtobufUtil {
    * @param proto The protocol buffer space violation policy.
    * @return The corresponding client SpaceViolationPolicy.
    */
-  public static SpaceViolationPolicy toViolationPolicy(final QuotaProtos.SpaceViolationPolicy
proto) {
+  public static SpaceViolationPolicy toViolationPolicy(
+      final QuotaProtos.SpaceViolationPolicy proto) {
     switch (proto) {
       case DISABLE: return SpaceViolationPolicy.DISABLE;
       case NO_WRITES_COMPACTIONS: return SpaceViolationPolicy.NO_WRITES_COMPACTIONS;
@@ -2574,8 +2575,8 @@ public final class ProtobufUtil {
    * @param violationPolicy The policy to apply when the quota is violated.
    * @return The protocol buffer SpaceQuota.
    */
-  public static QuotaProtos.SpaceQuota toProtoSpaceQuota(final long limit,
-      final SpaceViolationPolicy violationPolicy) {
+  public static QuotaProtos.SpaceQuota toProtoSpaceQuota(
+      final long limit, final SpaceViolationPolicy violationPolicy) {
     return QuotaProtos.SpaceQuota.newBuilder()
         .setSoftLimit(limit)
         .setViolationPolicy(toProtoViolationPolicy(violationPolicy))
@@ -3277,4 +3278,4 @@ public final class ProtobufUtil {
     int port = Addressing.parsePort(str);
     return ServerName.valueOf(hostname, port, -1L);
   }
-}
\ No newline at end of file
+}


Mime
View raw message