hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [3/4] hbase git commit: HBASE-15216 Canary does not accept config params from command line (Vishal Khandelwal)
Date Wed, 10 Feb 2016 06:56:50 GMT
HBASE-15216 Canary does not accept config params from command line (Vishal Khandelwal)

Conflicts:
	hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java


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

Branch: refs/heads/branch-1.2
Commit: 7643509b039f1021db35932a20e6a76c6b6d704c
Parents: d5fd993
Author: Andrew Purtell <apurtell@apache.org>
Authored: Tue Feb 9 22:45:37 2016 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Feb 9 22:48:26 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/tool/Canary.java  | 9 +++++++++
 src/main/asciidoc/_chapters/ops_mgt.adoc                    | 1 +
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7643509b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 802d30c..cbc2f55 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -74,6 +74,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.ReflectionUtils;
 import org.apache.hadoop.hbase.util.RegionSplitter;
+import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
@@ -618,6 +619,8 @@ public final class Canary implements Tool {
     System.err.println("   -writeSniffing enable the write sniffing in canary");
     System.err.println("   -writeTable    The table used for write sniffing."
         + " Default is hbase:canary");
+    System.err
+        .println("   -D<configProperty>=<value> assigning or override the configuration
params");
     System.exit(USAGE_EXIT_CODE);
   }
 
@@ -1206,7 +1209,13 @@ public final class Canary implements Tool {
     if (authChore != null) {
       choreService.scheduleChore(authChore);
     }
+
+    // loading the generic options to conf
+    new GenericOptionsParser(conf, args);
+
     int numThreads = conf.getInt("hbase.canary.threads.num", MAX_THREADS_NUM);
+    LOG.info("Number of exection threads " + numThreads);
+
     ExecutorService executor = new ScheduledThreadPoolExecutor(numThreads);
 
     Class<? extends Sink> sinkClass =

http://git-wip-us.apache.org/repos/asf/hbase/blob/7643509b/src/main/asciidoc/_chapters/ops_mgt.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/ops_mgt.adoc b/src/main/asciidoc/_chapters/ops_mgt.adoc
index e8d44eb..e3a8cc0 100644
--- a/src/main/asciidoc/_chapters/ops_mgt.adoc
+++ b/src/main/asciidoc/_chapters/ops_mgt.adoc
@@ -94,6 +94,7 @@ Usage: bin/hbase org.apache.hadoop.hbase.tool.Canary [opts] [table1 [table2]...]
    -t <N>         timeout for a check, default is 600000 (milliseconds)
    -writeSniffing enable the write sniffing in canary
    -writeTable    The table used for write sniffing. Default is hbase:canary
+   -D<configProperty>=<value> assigning or override the configuration params
 ----
 
 This tool will return non zero error codes to user for collaborating with other monitoring
tools, such as Nagios.


Mime
View raw message