Commit Graph

501 Commits

Author SHA1 Message Date
Javier 3135b7a42f HBASE-25594 graceful_stop.sh fails to unload regions when ran at localhost
Signed-off-by: stack <stack@apache.org>
2021-03-15 21:42:14 -07:00
stack 4b2cab3e5d Revert "HBASE-25663 Make graceful_stop localhostname compare match even if fqdn (#3048)"
This reverts commit f4e1ab7b1d.
2021-03-15 21:29:35 -07:00
Michael Stack 754300ac71 HBASE-25663 Make graceful_stop localhostname compare match even if fqdn (#3048) 2021-03-15 13:25:50 -07:00
Lokesh Khurana 6eee9b1049
HBASE-24620 : Add a ClusterManager which submits command to ZooKeeper and its Agent which picks and execute those Commands (#2299)
Signed-off-by: Aman Poonia <apoonia@salesforce.com>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-12-21 15:36:02 +05:30
Lokesh Khurana 8472c68720
HBASE-25237 : 'hbase master stop' shuts down the cluster, not the master only
Closes #2705

Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-11-27 16:05:07 +05:30
Sean Busbey b862c3e9c9
HBASE-14067 bundle ruby files for hbase shell into a jar.
* removes some cruft from the hbase-shell pom that appears to be from coping the hbase-server pom long ago
* puts the ruby scripts into the hbase-shell jar following the guide from jruby for packaging
* removes hard coding the location of the implementation scripts from our runtime
* removes hard coding the load path for the implementation from the test code (leaves hard coding the test code location)
* provides a work around for a name conflict between our shell and the ruby stdlib shell.

closes #2515

Signed-off-by: Michael Stack <stack@apache.org>
(cherry picked from commit fd0ecadbb9)
2020-10-13 16:29:55 -05:00
Elliot 29bbc7de45
HBASE-24806 Small Updates to Functionality of Shell IRB Workspace (#2232)
* HBASE-24806 Small Updates to Functionality of Shell IRB Workspace

- Move exception handler from Shell::Shell#eval_io to new method,
  Shell::Shell#exception_handler
- Add unit tests for Shell::Shell#exception_handler
- Change Shell::Shell#eval_io to no longer raise SystemExit when any error is
  seen and update unit test
- Update ruby test runner to catch SystemExit and fail to avoid tests that
  cause the test runner to incorrectly exit successfully
- Add Hbase::Loader module to find ruby scripts in the $LOAD_PATH and classpath
  using JRuby's loader.
- In hbase-shell, install IRB commands before exporting HBase commands. The
  HBase commands will override the IRB commands, and no warning will be
  printed.

* Remove unused variables from shell_test

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: stack <stack@apache.org>
(cherry picked from commit 98e35842eb)
2020-10-13 16:27:21 -05:00
Elliot 588e8d2263
HBASE-11686 Shell code should create a binding / irb workspace instead of polluting the root namespace (#2141)
* HBASE-11686 Shell code should create a binding / irb workspace instead of polluting the root namespace

- Refactor Shell.export_commands to define commands using ruby lambdas.
  Additionally, this change stores a reference to shell_inst in scope so that
  we no longer need to assume the existance of the variable @shell.
- Add logic to Shell class for constructing an IRB workspace with its own
  binding and non-global receiver. This workspace is loaded with all HBase and
  IRB commands.
- Create new method on Shell for evaluating input from an arbitrary IO instance
  within the created IRB workspace. This is based on work by Hsieh that was
  previously in bin/hirb.rb. This method is more generic and more testable.
  This single pattern can be used for both executing files and reading from
  stdin, therefore reducing complexity.
- Move special 'help' and 'tools' command definitions to shell.rb. These
  commands are tightly linked with an instance of the shell, so it is easiest
  to have them defined together.
- Remove all global includes of HBaseConstants from ruby test files. Before
  this change, tests were loading these constants into the top level, which
  could cause tests to pass that should really fail.
- Try to reduce the number of places that constants are included. I think it's
  best to reference each ruby constant's full name, but where that would cause
  a big diff I instead moved the include to the innermost Module or Class.
- Update docs and comments
- Remove unneccessary includes
- Add shell --top-level-cmds compatibility flag. Since this PR removes all the
  HBase symbols from the top-level receiver (ie. main Object), it is possible
  (albeit unlikely) that this will break operator scripts. This flag will
  export all the commands at the top-level like the shell previously did.

* HBASE-11686 Light refactoring with added unit tests

- Fixes some constants references by admin test 2
- Install HBase commands as singleton methods on recevier instances so that
  multiple receivers may exist.
- Rename new flag from --top-level-cmds to --top-level-defs to be more
  semantically accurate.
- Create new helper method Shell::Shell#export_all to install @hbase, @shell,
  constants, and all hbase commands to a target receiver. As a result, the
  HBaseReceiver became very simple and could be moved to shell.rb.
- Add unit tests for Shell::Shell#eval_io and Shell::Shell#export_all
- Add @hbase and @shell to hbase-shell IRB workspace
- Fix robocop issues within patch

* Typo s/is/if/

(cherry picked from commit 7eff07d6bf)
2020-10-13 16:27:03 -05:00
GeorryHuang 4b815d77d5 HBASE-24857 Fix several problems when starting webUI (#2344) 2020-09-09 21:47:51 -07:00
Baiqiang Zhao 0e74a8c86b
HBASE-24671 Add excludefile and designatedfile options to graceful_stop.sh
Closes #2013

Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-07-05 19:35:27 +05:30
WenFeiYi 30a6c63827
HBASE-24550 Passing '-h' or '--help' to bin/hbase doesn't do as expected (ADDENDUM)
Closes #1932

Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-06-19 22:53:28 +05:30
WenFeiYi 0250374aad
HBASE-24550 Passing '-h' or '--help' to bin/hbase doesn't do as expected
Closes #1914

Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-06-18 15:44:51 +05:30
Nick Dimiduk 318af8d6f8 HBASE-24143 [JDK11] Switch default garbage collector from CMS ; Addendum (#1594)
Signed-off-by: Sean Busbey <busbey@apache.org>
2020-04-27 09:36:35 -07:00
Nick Dimiduk a2c78e99cb HBASE-24143 [JDK11] Switch default garbage collector from CMS
Per comments in Jira, be explicit about what collector we
use. Existing code simply hard-codes HBASE_OPTS in
`conf/hbase-env.sh`. We now need to be a little more clever than this,
so moves the definition into `bin/hbase`. Also consolidates logic
around JVM version detection into a reusable function.

This change also changes how we set `HBASE_OPTS`. Before, we would
accept an operator's value, but always append our GC
prescription. After this change, we defer entirely to the operator's
choice, only applying our values when they've not specified their
intentions.

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Sean Busbey <busbey@apache.org>
2020-04-17 13:53:21 -07:00
Toshihiro Suzuki 1ad28a6f40 HBASE-23165 [hbtop] Some modifications from HBASE-22988 (#987)
Signed-off-by: stack <stack@apache.org>
2020-01-11 21:22:14 +09:00
Michael Stack ea20bb35be HBASE-21458 Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty
Signed-off-by: Sean Busbey <busbey@apache.org>
2019-11-05 22:55:13 -06:00
Rushabh b5a396749d HBASE-22874 Define a public API for Canary checking and a non-public tool implementation
Closes #580

* Canary is now an IA.Public interface
* CanaryTool is now the implementation

Signed-off-by: Sean Busbey <busbey@apache.org>
2019-10-03 14:34:15 -07:00
Toshihiro Suzuki 345455a3db HBASE-11062 hbtop (#476)
Signed-off-by: Stack <stack@apache.org>
Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
2019-09-07 14:17:59 +09:00
Sakthi 38f051b750 HBASE-22264 Separate out jars related to JDK 11 into a folder in /lib
Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit 0fead7ff1c)
2019-06-14 09:22:48 -05:00
Artem Ervits bbfb8ef80c HBASE-21536 Fix completebulkload usage instructions
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
2019-05-10 10:31:41 +02:00
Andrew Purtell ea653777e7
HBASE-21926 Profiler servlet 2019-03-17 18:48:16 -07:00
Sakthi 789d9df170 HBASE-21812 Address ruby static analysis for shell/bin modules [2nd pass]
Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit 65caa08edc)
2019-02-03 09:53:09 -06:00
Nihal Jain 7255a1c737 HBASE-21629 draining_servers.rb is broken 2018-12-23 20:48:23 -08:00
stack a226ceae3a HBASE-21567 Allow overriding configs starting up the shell
Adds support for -D as option to 'hbase shell'
2018-12-10 10:11:40 -08:00
Michael Stack 47c9879fad
HBASE-21215 Figure how to invoke hbck2; make it easy to find
Adds option parameter to the bin/hbase hbck command that allows
passing the hbck2 jar.

Signed-off-by: Sean Busbey <busbey@apache.org>
2018-10-24 20:46:05 -07:00
Sean Busbey 133892aae2 HBASE-20615 emphasize shaded artifacts in client tarball.
Conflicts:
	bin/hbase

Signed-off-by: Josh Elser <elserj@apache.org>
2018-06-18 14:03:28 -07:00
Peter Somogyi 53d29d53c4 HBASE-20592 Create a tool to verify tables do not have prefix tree encoding
Signed-off-by: Mike Drob <mdrob@apache.org>
2018-06-01 19:22:49 +02:00
Peter Somogyi e51ced4f17 HBASE-20376 RowCounter and CellCounter documentations are incorrect 2018-04-12 10:05:45 +02:00
Sean Busbey 4772a4ebdd HBASE-20276 restore original shell REPL functionality where commands can return results
* makes commands always pass any results back to hirb
* print warning if hirb is given the --return-values flag
* add some docs on how to avoid the console clutter that HBASE-15965 sought to address
* add an upgrade section note about this change.
* cleanup where the get_splits command does its printing so there's a building block that doesn't print
* some rubocop suggested tweaks and opt-out for classlength check on table and shell classes.

Signed-off-by: Mike Drob <mdrob@apache.org>

 Conflicts:
	src/main/asciidoc/_chapters/upgrading.adoc

* backport leaves off refguide change about upgrading.
2018-04-06 13:08:00 -05:00
Mike Drob 468d4fcd73 HBASE-20282 Clean up tooling docs/help 2018-03-30 09:00:46 -07:00
Umesh Agashe f4fe0521a9 HBASE-20130 (ADDENDUM) Use defaults (16020 & 16030) as base ports when the RS is bound to localhost
* fixed shellcheck errors
  * modified script to set environment variabless HBASE_RS_BASE_PORT, HBASE_RS_INFO_BASE_PORT to defaults only if its not already set
  * modified ref guide for default master ports and setting environment variables HBASE_RS_BASE_PORT, HBASE_RS_INFO_BASE_PORT for supporting more than 10 instances for region server on localhost.

Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
Signed-off-by: Sean Busbey <busbey@apache.org>
2018-03-27 21:25:42 -05:00
Umesh Agashe c39a048c6d HBASE-20130 Use defaults (16020 & 16030) as base ports when the RS is bound to localhost
Base ports are changed to defaults 16020 & 16030 when RS binds to localhost. This is mostly used in pseudo distributed mode.
2018-03-26 14:10:48 -07:00
Balazs Meszaros 8fdb61955f HBASE-20187 Shell startup fails with IncompatibleClassChangeError
Signed-off-by: Josh Elser <elserj@apache.org>
2018-03-14 15:55:22 -04:00
Josh Elser ac18ae2722 HBASE-20108 Remove jline exclusion from ZooKeeper
Signed-off-by: Mike Drob <mdrob@apache.org>
2018-03-07 14:36:46 -05:00
Csaba Skrabak 671d36097f HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and hbase-client. Ruby scripts also used ZooKeeperWatcher.
Signed-off-by: Apekshit Sharma <appy@apache.org>
2018-03-03 21:06:21 +05:30
Mike Drob 4476cc196c
HBASE-19784 bin/stop-hbase more friendly when hbase already stopped
Signed-off-by: Michael Stack <stack@apache.org>
2018-01-17 15:49:23 -08:00
Josh Elser b4f6ae86b6 HBASE-19770 Separate command return values from interactive shells
Uses a new option to the shell to specify that return values are
unwanted instead of overloading the interactive option. Enable
return_values when the shell is non-interactive.

Signed-off-by: Apekshit Sharma <appy@apache.org>
2018-01-17 13:13:46 -05:00
Mike Drob 968b938fde HBASE-19552 Update hbase-thirdparty version
Some manual cleanup of changing package names in pom files and getting
rid of the no-longer-needed netty system property.

This commit will break compilation, package renames in source code are
done in follow-on commits using straightforward find and replace.

's/org.apache.hadoop.hbase.shaded.com.google/org.apache.hbase.thirdparty.com.google/'
's/org.apache.hadoop.hbase.shaded.io.netty/org.apache.hbase.thirdparty.io.netty/'
2017-12-28 11:58:49 -06:00
Apekshit Sharma 313a65a13c HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts. 2017-12-21 19:26:19 -08:00
Michael Stack 79ac70ac86 HBASE-19407 [branch-2] Remove backup/restore 2017-12-01 17:22:37 -08:00
Apekshit Sharma e0c4f374b5 HBASE-19114 Split out o.a.h.h.zookeeper from hbase-server and hbase-client
- Moved DrainingServerTracker and RegionServerTracker to hbase-server:o.a.h.h.master.
- Moved SplitOrMergeTracker to oahh.master (because it depends on a PB)
- Moving hbase-client:oahh.zookeeper.*  to hbase-zookeeper module.  After HBASE-19200, hbase-client doesn't need them anymore (except 3 classes).
- Renamed some classes to use a consistent naming for classes - ZK instead of mix of ZK, Zk , ZooKeeper. Couldn't rename following public classes: MiniZooKeeperCluster, ZooKeeperConnectionException. Left RecoverableZooKeeper for lack of better name. (suggestions?)
- Sadly, can't move tests out because they depend on HBaseTestingUtility (which defeats part of the purpose - trimming down hbase-server tests. We need to promote more use of mocks in our tests)
2017-11-17 13:23:28 -08:00
Apekshit Sharma dd19fa25d5 HBASE-16459 Remove unused hbase shell --format option 2017-11-10 00:34:16 -08:00
Balazs Meszaros 28185c5171
HBASE-18705 bin/hbase does not find cached_classpath.txt
Signed-off-by: tedyu <yuzhihong@gmail.com>
Signed-off-by: Michael Stack <stack@apache.org>
2017-11-02 10:08:44 -07:00
Artem Ervits d407e37cf4 HBASE-19140 hbase-cleanup.sh uses deprecated call to remove files in hdfs
Signed-off-by: tedyu <yuzhihong@gmail.com>
2017-11-01 19:17:31 +01:00
Jerry He 75d2bba739 HBASE-10367 RegionServer graceful stop / decommissioning
Signed-off-by: Jerry He <jerryjch@apache.org>
2017-10-19 22:10:52 -07:00
Chia-Ping Tsai 84ec18eb45 HBASE-18780 Remove HLogPrettyPrinter
Signed-off-by: Michael Stack <stack@apache.org>
2017-09-08 10:22:18 -07:00
Tamas Penzes 5531be160b HBASE-18369 hbase thrift web-ui not available
classpath issue when running as a developer fixed
removed thrift webapp from server (it's not used at all, since moved to thrift webapp)

Signed-off-by: tedyu <yuzhihong@gmail.com>
2017-08-28 08:48:51 -07:00
Mike Drob 4e9961b4fc HBASE-18238 rubocop autocorrect for bin/ 2017-08-14 14:04:43 -05:00
Michael Stack b4d44467fb HBASE-18271 Shade netty Purge mention of netty-all.
Add in hbase-thirdparty hbase-shaded-netty instead.
s/io.netty/org.apache.hadoop.hbase.shaded.io.netty/ everywhere in hbase.

Also set a system property when running tests and when starting
hbase; required by netty so can find the relocation files in the
bundled .so.
2017-08-13 12:50:20 -07:00
Mike Drob d4438a48e4 HBASE-18393 Fix shell noninteractive launch
Signed-off-by: Sean Busbey <busbey@apache.org>
2017-07-19 14:30:31 -05:00