From eec064dcd198f0fffd94ad3274e785d3e6d5ee32 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 27 Feb 2017 19:58:37 +0000 Subject: [PATCH] Add section to shell tricks on how to set and query shell configuration --- src/main/asciidoc/_chapters/shell.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/asciidoc/_chapters/shell.adoc b/src/main/asciidoc/_chapters/shell.adoc index 8f1f59b5dbd..1e51a20fceb 100644 --- a/src/main/asciidoc/_chapters/shell.adoc +++ b/src/main/asciidoc/_chapters/shell.adoc @@ -352,6 +352,19 @@ hbase(main):022:0> Date.new(1218920189000).toString() => "Sat Aug 16 20:56:29 UT To output in a format that is exactly like that of the HBase log format will take a little messing with link:http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html[SimpleDateFormat]. +=== Query Shell Configuration +---- +hbase(main):001:0> @shell.hbase.configuration.get("hbase.rpc.timeout") +=> "60000" +---- +To set a config in the shell: +---- +hbase(main):005:0> @shell.hbase.configuration.setInt("hbase.rpc.timeout", 61010) +hbase(main):006:0> @shell.hbase.configuration.get("hbase.rpc.timeout") +=> "61010" +---- + + [[tricks.pre-split]] === Pre-splitting tables with the HBase Shell You can use a variety of options to pre-split tables when creating them via the HBase Shell `create` command.