You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by el...@apache.org on 2017/05/19 17:13:09 UTC
[09/50] [abbrv] hbase git commit: HBASE-16995 Build client Java API
and client protobuf messages - addendum fixes line lengths (Josh Elser)
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/78130847
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/78130847
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/78130847
Branch: refs/heads/HBASE-16961
Commit: 78130847bd53579ef76476aafc160ad8ca28ee4d
Parents: c0bc6df
Author: tedyu <yu...@gmail.com>
Authored: Mon Nov 21 13:00:27 2016 -0800
Committer: Josh Elser <el...@apache.org>
Committed: Fri May 19 11:56:05 2017 -0400
----------------------------------------------------------------------
.../hbase/quotas/QuotaSettingsFactory.java | 20 ++++++++++++--------
.../hadoop/hbase/quotas/SpaceLimitSettings.java | 8 ++++----
.../hbase/shaded/protobuf/ProtobufUtil.java | 7 ++++---
3 files changed, 20 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/78130847/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 8512e39..7f1c180 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
@@ -128,7 +128,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);
@@ -300,29 +301,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/78130847/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/78130847/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 fe264e8..108646a 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
@@ -2587,7 +2587,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;
@@ -2638,8 +2639,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))