[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-12-05 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r354632592
 
 

 ##
 File path: bin/hbase
 ##
 @@ -656,6 +657,24 @@ elif [ "$COMMAND" = "pre-upgrade" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 elif [ "$COMMAND" = "completebulkload" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
+elif [ "$COMMAND" = "hbtop" ] ; then
+  CLASS='org.apache.hadoop.hbase.hbtop.HBTop'
 
 Review comment:
   Any command that needs something beyond our basics (either client or normal 
service process) has to whitelist the extras it needs.
   
   hbtop largely just needs the shaded client jar, but it has some third-party 
stuff it uses directly, hence the extra add on.
   
   I think this is the best of not great options given how we currently do 
packaging.
   
   If you want to discuss improvements to how we do command packaging it's 
something I'm interested in. A DISCUSS thread or an umbrella jira would 
probably be a better venue for that 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-09-03 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r320290819
 
 

 ##
 File path: bin/hbase
 ##
 @@ -656,6 +657,24 @@ elif [ "$COMMAND" = "pre-upgrade" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 elif [ "$COMMAND" = "completebulkload" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
+elif [ "$COMMAND" = "hbtop" ] ; then
+  CLASS='org.apache.hadoop.hbase.hbtop.HBTop'
+  if [ -n "${shaded_jar}" ] ; then
+for f in "${HBASE_HOME}"/lib/hbase-hbtop*.jar; do
+  if [ -f "${f}" ]; then
+CLASSPATH="${CLASSPATH}:${f}"
+break
+  fi
+done
+for f in "${HBASE_HOME}"/lib/commons-lang3*.jar; do
+  if [ -f "${f}" ]; then
+CLASSPATH="${CLASSPATH}:${f}"
+break
+  fi
+done
+  fi
+
+  HBASE_OPTS="${HBASE_OPTS} 
-Dlog4j.configuration=file:${HBASE_HOME}/conf/log4j-hbtop.properties"
 
 Review comment:
   this is excellent.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-28 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r318574493
 
 

 ##
 File path: hbase-hbtop/src/main/resources/log4j-hbtop.properties
 ##
 @@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=WARN,console
 
 Review comment:
   the ability for someone who uses the tool to pass in their own 
log4j.properties file is a feature. we should avoid breaking it. If we really 
need to override it, then we should change `bin/hbase` to set 
`-Dlog4j.configuration=log4j-hbtop.properties` for this command. that way 
someone could still override it if needed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-28 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r318574493
 
 

 ##
 File path: hbase-hbtop/src/main/resources/log4j-hbtop.properties
 ##
 @@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=WARN,console
 
 Review comment:
   the ability for someone who uses the tool to pass in their own 
log4j.properties file is a feature. we should avoid breaking it. If we really 
need to override it, then we should change {{bin/hbase}} to set 
{{-Dlog4j.configuration=log4j-hbtop.properties}} for this command. that way 
someone could still override it if needed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-28 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r318573086
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.PropertyConfigurator;
 
 Review comment:
   but can't we suppress this in an included log4j.properties file? or even 
change the runtime classpath for the command to leave out the slf4j-log4j 
bridge?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-28 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r318572405
 
 

 ##
 File path: hbase-hbtop/README.md
 ##
 @@ -0,0 +1,246 @@
+
+
+# hbtop
+
+## Overview
+
+`hbtop` is a real-time monitoring tool for HBase like Unix's top command.
+It can display summary information as well as metrics per 
Region/Namespace/Table/RegionServer.
+In this tool, you can see the metrics sorted by a selected field and filter 
the metrics to see only metrics you really want to see.
+Also, with the drill-down feature, you can find hot regions easily in a 
top-down manner.
+
+## Usage
+
+You can run hbtop with the following command:
+
+```
+$ hbase top
+```
+
+Also, you can specify your own zookeeper quorum and znode parent as follows:
 
 Review comment:
   yep. should note it here though.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317649134
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
 
 Review comment:
   need to add an appropriate dependency for this in the pom for the module, 
instead of getting it by accident through hbase-server. `mvn 
dependency:analyze` should show all such instances.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317661619
 
 

 ##
 File path: 
hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java
 ##
 @@ -0,0 +1,402 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.time.FastDateFormat;
 
 Review comment:
   need a dependency declared in the pom for this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317649042
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.PropertyConfigurator;
 
 Review comment:
   please avoid references to log4j directly. what are we gaining here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317648522
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
 
 Review comment:
   need to add an appropriate dependency for this in the pom for the module, 
instead of getting it by accident through hbase-server. `mvn 
dependency:analyze` should show all such instances.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317648607
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
 
 Review comment:
   need to add an appropriate dependency for this in the pom for the module, 
instead of getting it by accident through hbase-server. `mvn 
dependency:analyze` should show all such instances.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317661965
 
 

 ##
 File path: 
hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java
 ##
 @@ -0,0 +1,402 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import static org.hamcrest.CoreMatchers.is;
 
 Review comment:
   need a dependency declared in the pom for this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317641297
 
 

 ##
 File path: hbase-hbtop/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+  
+  4.0.0
+  
+hbase
 
 Review comment:
   in the main hbase repo the parent should be `hbase-build-configuration`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317644998
 
 

 ##
 File path: hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java
 ##
 @@ -0,0 +1,141 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.hbtop;
+
+import java.io.InputStream;
+import java.util.Objects;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.hbtop.mode.Mode;
+import org.apache.hadoop.hbase.hbtop.screen.Screen;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.PropertyConfigurator;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+import org.apache.hbase.thirdparty.org.apache.commons.cli.DefaultParser;
+import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
+import org.apache.hbase.thirdparty.org.apache.commons.cli.Options;
+
+
+/**
+ * A real-time monitoring tool for HBase like Unix top command.
+ */
+@InterfaceAudience.Private
 
 Review comment:
   Should be LimitedPrivate(Tools) I think?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317643220
 
 

 ##
 File path: bin/hbase
 ##
 @@ -656,6 +656,8 @@ elif [ "$COMMAND" = "pre-upgrade" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 elif [ "$COMMAND" = "completebulkload" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
+elif [ "$COMMAND" = "top" ] ; then
 
 Review comment:
   can this command use either the `hbase-shaded-client` or 
`hbase-shaded-mapreduce` instead of the internal calsspath? see the logic 
starting around line 225 in the as-of-now version of your fork. starts with `# 
If command can use our shaded client, use it` followed by the section `# If 
command needs our shaded mapreduce, use it`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317638535
 
 

 ##
 File path: bin/hbase
 ##
 @@ -656,6 +656,8 @@ elif [ "$COMMAND" = "pre-upgrade" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 elif [ "$COMMAND" = "completebulkload" ] ; then
   CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
+elif [ "$COMMAND" = "top" ] ; then
 
 Review comment:
   consistently refer to the tool. should be "hbtop" and not "top"


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317661038
 
 

 ##
 File path: hbase-hbtop/src/main/resources/log4j-hbtop.properties
 ##
 @@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=WARN,console
 
 Review comment:
   If we want to have a default log4j configuration, why can't this just be a 
`log4j.properties` file included in the hbase-hbtop jar?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317638964
 
 

 ##
 File path: hbase-hbtop/README.md
 ##
 @@ -0,0 +1,246 @@
+
+
+# hbtop
+
+## Overview
+
+`hbtop` is a real-time monitoring tool for HBase like Unix's top command.
+It can display summary information as well as metrics per 
Region/Namespace/Table/RegionServer.
+In this tool, you can see the metrics sorted by a selected field and filter 
the metrics to see only metrics you really want to see.
+Also, with the drill-down feature, you can find hot regions easily in a 
top-down manner.
+
+## Usage
+
+You can run hbtop with the following command:
+
+```
+$ hbase top
+```
+
+Also, you can specify your own zookeeper quorum and znode parent as follows:
 
 Review comment:
   If I don't specify them, where does the tool pick them up?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317638761
 
 

 ##
 File path: hbase-hbtop/README.md
 ##
 @@ -0,0 +1,246 @@
+
+
+# hbtop
+
+## Overview
+
+`hbtop` is a real-time monitoring tool for HBase like Unix's top command.
+It can display summary information as well as metrics per 
Region/Namespace/Table/RegionServer.
+In this tool, you can see the metrics sorted by a selected field and filter 
the metrics to see only metrics you really want to see.
+Also, with the drill-down feature, you can find hot regions easily in a 
top-down manner.
+
+## Usage
+
+You can run hbtop with the following command:
+
+```
+$ hbase top
 
 Review comment:
   `hbase hbtop`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [hbase] busbey commented on a change in pull request #476: HBASE-11062 hbtop

2019-08-26 Thread GitBox
busbey commented on a change in pull request #476: HBASE-11062 hbtop
URL: https://github.com/apache/hbase/pull/476#discussion_r317640203
 
 

 ##
 File path: hbase-hbtop/README.md
 ##
 @@ -0,0 +1,246 @@
+
+
+# hbtop
+
+## Overview
+
+`hbtop` is a real-time monitoring tool for HBase like Unix's top command.
+It can display summary information as well as metrics per 
Region/Namespace/Table/RegionServer.
+In this tool, you can see the metrics sorted by a selected field and filter 
the metrics to see only metrics you really want to see.
+Also, with the drill-down feature, you can find hot regions easily in a 
top-down manner.
+
+## Usage
+
+You can run hbtop with the following command:
+
+```
+$ hbase top
+```
+
+Also, you can specify your own zookeeper quorum and znode parent as follows:
+
+```
+$ hbase top -Dhbase.client.zookeeper.quorum= 
-Dzookeeper.znode.parent=
+```
+
+![Top screen](img/top_screen.gif "Top screen")
+
+The top screen consists of a summary part and of a metrics part.
+In the summary part, you can see `HBase Version`, `Cluster ID`, `The number of 
region servers`, `Region count`, `Average Cluster Load` and `Aggregated 
Request/s`.
+In the metrics part, you can see metrics per 
Region/Namespace/Table/RegionServer depending on the selected mode.
+The top screen is refreshed in a certain period – 3 seconds by default.
+
+### Scrolling metric records
+
+You can scroll the metric records in the metrics part.
+
+![Scrolling metric records](img/scrolling_metric_records.gif "Scrolling metric 
records")
+
+### Command line arguments
+
+| Argument | Description |
+|---|---|
+| -delay arg | The refresh delay (in seconds); default is 3 seconds |
+| -help | Print usage; for help while the tool is running press `h` key |
+| -mode arg | The mode; `n` (Namespace)`t` (Table)r 
(Region)`s` (RegionServer), default is `r` (Region) |
+
+### Modes
+
+There are the following 4 modes in hbtop:
+
+| Mode | Description |
 
 Review comment:
   something for later: a mode to display the [metrics for Meta 
Load](http://hbase.apache.org/book.html#rs_meta_metrics) would be really nice.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services