You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ra...@apache.org on 2020/09/14 05:41:11 UTC

[hbase] branch HBASE-25002 created (now 3e713f7)

This is an automated email from the ASF dual-hosted git repository.

ramkrishna pushed a change to branch HBASE-25002
in repository https://gitbox.apache.org/repos/asf/hbase.git.


      at 3e713f7  Address checkstyle comments

This branch includes the following new commits:

     new 3e713f7  Address checkstyle comments

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[hbase] 01/01: Address checkstyle comments

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ramkrishna pushed a commit to branch HBASE-25002
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 3e713f7ee526c87cb127cc50a48c21335bf96e30
Author: Ramkrishna <ra...@hotmail.com>
AuthorDate: Mon Sep 14 11:04:05 2020 +0530

    Address checkstyle comments
---
 .../src/main/java/org/apache/hadoop/hbase/util/JSONBean.java | 12 +++++-------
 .../org/apache/hadoop/hbase/http/jmx/TestJMXJsonServlet.java |  3 ++-
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java
index 7c79300..0dbe0fd 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java
@@ -25,7 +25,6 @@ import java.lang.reflect.Array;
 import java.nio.charset.StandardCharsets;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import javax.management.AttributeNotFoundException;
@@ -43,13 +42,12 @@ import javax.management.RuntimeMBeanException;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.TabularData;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 
 import org.apache.hbase.thirdparty.com.google.gson.Gson;
 import org.apache.hbase.thirdparty.com.google.gson.stream.JsonWriter;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Utility for doing JSON and MBeans.
@@ -239,7 +237,7 @@ public class JSONBean {
       } else {
         MBeanAttributeInfo[] attrs = minfo.getAttributes();
         for (int i = 0; i < attrs.length; i++) {
-          writeAttribute(writer, mBeanServer, oname, description, attrs[i], matchingPattern);
+          writeAttribute(writer, mBeanServer, oname, description, matchingPattern, attrs[i]);
         }
       }
       writer.endObject();
@@ -249,7 +247,7 @@ public class JSONBean {
   }
 
   private static void writeAttribute(JsonWriter writer, MBeanServer mBeanServer, ObjectName oname,
-      boolean description, MBeanAttributeInfo attr, Pattern pattern[]) throws IOException {
+      boolean description, Pattern pattern[], MBeanAttributeInfo attr) throws IOException {
     if (!attr.isReadable()) {
       return;
     }
diff --git a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/jmx/TestJMXJsonServlet.java b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/jmx/TestJMXJsonServlet.java
index 31f9566..e907a32 100644
--- a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/jmx/TestJMXJsonServlet.java
+++ b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/jmx/TestJMXJsonServlet.java
@@ -152,7 +152,8 @@ public class TestJMXJsonServlet extends HttpServerFunctionalTest {
 
   @Test
   public void testPatternMatching() throws Exception {
-    assertReFind("[a-zA-z_]*Table1[a-zA-z_]*memStoreSize", "Namespace_default_table_Table1_metric_memStoreSize");
+    assertReFind("[a-zA-z_]*Table1[a-zA-z_]*memStoreSize",
+      "Namespace_default_table_Table1_metric_memStoreSize");
     assertReFind("[a-zA-z_]*memStoreSize", "Namespace_default_table_Table1_metric_memStoreSize");
   }