Add section to shell tricks on how to set and query shell configuration

This commit is contained in:
Michael Stack 2017-02-27 19:58:37 +00:00
parent e8f9de7851
commit eec064dcd1
1 changed files with 13 additions and 0 deletions

View File

@ -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]. 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]] [[tricks.pre-split]]
=== Pre-splitting tables with the HBase Shell === 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. You can use a variety of options to pre-split tables when creating them via the HBase Shell `create` command.