Commit Graph

520 Commits

Author SHA1 Message Date
Wellington Ramos Chevreuil 7adc00044c HBASE-25548 Optionally allow snapshots to preserve cluster's max file… (#2923)
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
(cherry picked from commit 373dc7788d)
2021-03-10 10:35:58 +00:00
申胜利 e81ef34c68 HBASE-25609 There is a problem with the SPLITS_FILE in the HBase shell statement(#2992)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2021-03-07 22:05:44 +08:00
Baiqiang Zhao 9a6bd5b6f1
HBASE-25519 BLOCKSIZE needs to support pretty print (#2944) 2021-02-09 07:27:27 -08:00
Laxman Goswami 1c64049158 HBASE-24772 Use GetoptLong or OptionParser in hbase-shell (#2918)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: stack <stack@apache.org>
2021-02-08 21:15:04 -08:00
Baiqiang Zhao 3b43df68e6
HBASE-25533 The metadata of the table and family should not be an empty string (#2914) (#2906)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Geoffrey Jacoby <gjacoby@apache.org>
2021-01-29 21:00:30 +05:30
xijiawen c95c09064c
HBASE-25496 add get_namespace_rsgroup command (#2874)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2021-01-19 14:52:09 +05:30
xijiawen 86cc7e5a85 HBASE-25497 move_namespaces_rsgroup should change hbase.rsgroup.name … (#2875)
* HBASE-25497 move_namespaces_rsgroup should change hbase.rsgroup.name config in NamespaceDescriptor

Signed-off-by: Zheng Wang <wangzheng@apache.org>
(cherry picked from commit 9e9bec24d2)
2021-01-18 19:22:34 +08:00
Baiqiang Zhao c5674e21dd
HBASE-25439 Add BYTE unit in PrettyPrinter.Unit (#2840)
Signed-off-by: stack <stack@apache.org>
2021-01-14 21:47:01 -08:00
Viraj Jasani 0788547fea
HBASE-25474 : Bump HBase version on branch-2 (#2871)
Signed-off-by: stack <stack@apache.org>
2021-01-12 10:20:22 +05:30
Gary Wang cec9f18737
HBASE-25463 fix comment error of append.rb (#2845)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2021-01-05 20:10:50 +05:30
Mate Szalay-Beko 1dbfe96d69 HBASE-25263 Various improvements of column family encryption
This PR is a follow-up of HBASE-25181 (#2539), where several issues were
discussed on the PR:

1. Currently we use PBKDF2WithHmacSHA1 key generation algorithm to generate a
secret key for HFile / WalFile encryption, when the user is defining a string
encryption key in the hbase shell. This algorithm is not secure enough and
not allowed in certain environments (e.g. on FIPS compliant clusters). We are
changing it to PBKDF2WithHmacSHA384. It will not break backward-compatibility,
as even the tables created by the shell using the new algorithm will be able
to load (e.g. during bulkload / replication) the HFiles serialized with the
key generated by an old algorithm, as the HFiles themselves already contain
the key necessary for their decryption.

Smaller issues fixed by this commit:

2. Improve the documentation e.g. with the changes introduced by HBASE-25181
and also by some points discussed on the Jira ticket of HBASE-25263.

3. In EncryptionUtil.createEncryptionContext the various encryption config
checks should throw IllegalStateExceptions instead of RuntimeExceptions.

4. Test cases in TestEncryptionTest.java should be broken down into smaller
tests.

5. TestEncryptionDisabled.java should use ExpectedException JUnit rule to
validate exceptions.

closes #2676

Signed-off-by: Peter Somogyi <psomogyi@apache.org>
2020-11-26 16:57:12 +01:00
Josh Elser 31917b0a8a HBASE-25278 Add CACHE_BLOCKS option to count shell command
Expose an argument on the `count` command which is passed to the
`setCacheBlocks` method on the Scan which the count command uses.

This is a quick and dirty approach to read all of the blocks for a table
into the block cache.

* Raise an error when the value isn't a boolean or the expected string

Closes #2650

Signed-off-by: Zach York <zyork@apache.org>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
2020-11-24 10:05:54 -05:00
XinSun 9769e3fe7b HBASE-25300 'Unknown table hbase:quota' happens when desc table in shell if quota disabled (#2673)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Pankaj Kumar<pankajkumar@apache.org>
2020-11-19 09:20:34 +08:00
XinSun d9b175cbb6
HBASE-25289 [testing] Clean up resources after tests in rsgroup_shell_test.rb (#2672)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
2020-11-18 14:29:02 +08:00
Norbert Kalmar ec3f843b23
HBASE-20598 Upgrade to JRuby 9.2
- upgrade our default jruby to 9.2.13.0
- this major JRuby version update changes the Ruby compatibility from Ruby 2.3 to Ruby 2.5
- use a custom IRB prompt to convey similar information to before
- update the joni and jcoding dependencies to match this version of jruby-complete

closes #2308

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit f0c430aed2)
2020-11-09 16:50:34 -06:00
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
bsglz dd6974fda8
HBASE-24875 Remove the force param for unassign since it dose not take effect any more (#2254)
Modified compared to main branch to deprecate obviated MasterObserver interface methods instead of remove them.

Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit c5ca191921)

 Conflicts:
	hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
	hbase-server/src/test/java/org/apache/hadoop/hbase/rsgroup/VerifyingRSGroupAdmin.java
	hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestWithDisabledAuthorization.java
2020-10-13 16:29:03 -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
Viraj Jasani 4316dc738c
HBASE-24528 : BalancerDecision queue implementation in HMaster with Admin API (#2411)
* Admin API getLogEntries() for ring buffer use-cases: so far, provides balancerDecision and slowLogResponse
* Refactor RPC call for similar use-cases
* Single RPC API getLogEntries() for both Master.proto and Admin.proto

Closes #2261

Signed-off-by: Andrew Purtell <apurtell@apache.org>
2020-09-17 18:51:42 +05:30
Bo Cui 261405ec6d HBASE-24937 table.rb use LocalDateTime to replace Instant (#2351)
Signed-off-by: Pankaj Kumar<pankajkumar@apache.org>
(cherry picked from commit 1e8db480b3)
2020-09-04 23:43:15 +05:30
Guanghao Zhang 4667a971b1 HBASE-24912 Enlarge MemstoreFlusherChore/CompactionChecker period for unit test (#2285)
Signed-off-by: stack <stack@apache.org>
2020-08-21 12:42:11 +08:00
Nick Dimiduk acfa08cd87 HBASE-24627 Normalize one table at a time
Introduce an additional method to our Admin interface that allow an
operator to selectivly run the normalizer. The IPC protocol supports
general table name select via compound filter.

Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-08-19 09:22:21 -07:00
Zheng Wang 7335dbc834
HBASE-24854 Correct the help content of assign and unassign commands in hbase shell
Closes #2241

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
2020-08-13 15:39:55 +05:30
Nick Dimiduk 8737afb01e HBASE-24843 Sort the constants in `hbase_constants.rb`
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Mingliang Liu <liuml07@apache.org>
2020-08-11 16:13:42 -07:00
bsglz ebf493f075
HBASE-24694 Support flush a single column family of table (#2218)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
2020-08-10 10:36:13 +01:00
bsglz cb3dd990f7 HBASE-24826 Add some comments for processlist in hbase shell (#2207)
Signed-off-by: Elliot Miller <elliot_miller@apple.com>
Signed-off-by: stack <stack@apple.com>
2020-08-06 19:29:33 -07:00
Elliot 271a3cbf13 HBASE-24803 Unify hbase-shell ::Shell::Commands::Command#help behavior (#2178)
- Update all hbase-shell commands to return help text implicitly
- Add hbase-shell test to ensure all help methods return unindented text
- Set the outermost indentation to zero for the help text of all hbase-shell
  commands by using the squiggly heredoc added in Ruby 2.3.0.
- Document return value of hbck_chore_run and add usage examples to truncate commands
- Update docs to reflect current return value of list command

Signed-off-by: stack <stack@apache.org>
2020-07-31 07:42:54 -07:00
bsglz 1c45c8c7db
HBASE-24404 Support flush a single column family of region (#2098)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
2020-07-31 09:31:14 +01:00
Elliot 568d73d7db HBASE-11676 Scan FORMATTER is not applied for columns using non-printable name in shell (#2161)
- In HBase::Table, the instance variable @converters is used to map column
  names to converters. This patch fixes how HBase::Table#_get_internal and
  HBase::Table#_scan_internal generate the column name key used to access
  @converters.
- Refactor parsing of family:qualifier:converter specifications so that the
  code is more readable and reusable. As part of this change, I added two
  private methods and marked HBase::Table#set_converter as deprecated for
  removal in HBase 4.0.0.
- Add unit testing for the fixed bug

Signed-off-by: stack <stack@apache.org>
2020-07-28 20:44:35 -07:00
Pankaj 6ded070f82 HBASE-24738 [Shell] processlist command fails with ERROR: Unexpected end of file from server when SSL enabled (#2123)
Signed-off-by: Elliot Miller <elliot_miller@apple.com>
2020-07-28 09:11:57 -07:00
Guanghao Zhang 70ab0dc324
HBASE-24743 Reject to add a peer which replicate to itself earlier (#2124)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
2020-07-24 08:09:02 +08:00
Viraj Jasani ce4e692699
HBASE-24718 : Generic NamedQueue framework for multiple use-cases (Refactor SlowLog responses) (#2110)
Closes #2052

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
2020-07-22 11:36:19 +05:30
Elliot be946b0f48 HBASE-24722 Update commands with unintentional return values (#2058)
- Prior to this commit, there were 13 commands that unintentionally return the
  number of lines they print (usually one). This commit ensures that they
  return the value documented by the help text, or nil if there is not a simple
  logical value to return.
- Fixes 6 hbase-shell commands that return String rather than TrueClass or
  FalseClass
- Use double-bang to cast truthy values to TrueClass and FalseClass so that
  ruby's to_s can reliably print true or false without using ternary operators
- Updates tests for is_disabled, is_enabled, disable_rpc_throttle,
  enable_rpc_throttle, disable_exceed_throttle_quota,
  enable_exceed_throttle_quota, clear_deadservers, snapshot_cleanup_switch,
  snapshot_cleanup_enabled, and balancer to check return values
- Adds new tests for balance_switch, balancer_enabled, normalizer_switch,
  normalizer_enabled, catalog_janitor_switch, catalogjanitor_enabled,
  cleaner_chore_switch, cleaner_chore_enabled, splitormerge_switch, and
  splitormerge_enabled

signed-off-by: stack <stack@apache.org>
2020-07-17 11:47:29 -07:00
XinSun 5fcffae5db
HBASE-24431 RSGroupInfo add configuration map to store something extra (#2031)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
2020-07-08 14:39:41 +08:00
Wellington Ramos Chevreuil 11d093bc39 HBASE-21406 "status 'replication'" should not show SINK if the cluste… (#1761)
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>

(Cherry picked from commit e5345b3a7c)
2020-06-03 09:33:36 +01:00
Viraj Jasani b2d24a1812
HBASE-23941 : FilterBy operator support in get_slowlog_responses API (#1793)
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
2020-05-30 13:57:32 +05:30
Duo Zhang dc2146069c
HBASE-24309 Avoid introducing log4j and slf4j-log4j dependencies for … (#1697)
Signed-off-by: stack <stack@apache.org>
2020-05-13 17:59:21 +08:00
bsglz f98c0fc4ec HBASE-24335 Support deleteall with ts but without column in shell mode (#1668)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from commit 2cafe81e9c)
2020-05-07 18:24:08 +01:00
Michael Stack 80561504d2
HBASE-24284 [h3/jdk11] REST server won't start Exclude transitive includes of jax-rs 1.x and then explicitly include jax-rs 2.x glassfish impl for REST context when hadoop3. (#1625) 2020-05-05 15:27:11 -07:00
Duo Zhang 1f556b3ad9 HBASE-24281 Remove some stale hadoop.version properties in the pom for sub modules (#1602)
Signed-off-by: Lijin Bin <binlijin@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
2020-04-29 18:25:41 +08:00
Duo Zhang 379b48bb5d Revert "HBASE-24181 Remove some stale hadoop.version properties in the pom for sub modules (#1602)"
This reverts commit dc9608ec0b.
2020-04-29 18:25:23 +08:00
Duo Zhang dc9608ec0b HBASE-24181 Remove some stale hadoop.version properties in the pom for sub modules (#1602)
Signed-off-by: Lijin Bin <binlijin@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
2020-04-29 18:08:33 +08:00
Reid Chan 5086bf1a3e
HBASE-24196 [Shell] Add rename rsgroup command in hbase shell (#1554)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
2020-04-21 12:56:44 +08:00
EEPROM a66bd7a769 HBASE-24176 user_permission '.*' command failed to show all table permissions (#1499)
* user_permission failed when show table permissions with '.*' argument

Signed-off-by: Guangxu Cheng <gxcheng@apache.org>
2020-04-14 10:37:34 +08:00
Viraj Jasani 3433c7a2db
HBASE-23937 : Support Online LargeLogs similar to SlowLogs APIs (#1346)
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
2020-04-01 19:56:42 +05:30
Nick Dimiduk ffb2359146
HBASE-24013 Bump branch-2 version to 2.4.0-SNAPSHOT (#1309)
Increment version in poms with

```
$ mvn org.codehaus.mojo:versions-maven-plugin:2.7:set -DnewVersion=2.4.0-SNAPSHOT -DgenerateBackupPoms=false
```

Verified no dangling references with

```
$ find . -iname '*pom.xml' -exec grep -n '2.3.0-SNAPSHOT' {} +
```

Verified build with

```
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home mvn clean package -DskipTests
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home mvn clean package -DskipTests -Dhadoop.profile=3.0
```

Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
2020-03-19 08:01:43 -07:00
Michael Stack ebd37a314c
HBASE-23993 Use loopback for zk standalone server in minizkcluster (#1291)
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
 Have client and server use loopback instead of 'localhost'

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Jan Hentschel <janh@apache.org>
2020-03-17 20:14:24 -07:00
stack bb8e13fc6e HBASE-23992 Fix TestAdminShell and TestQuotasShell mistakenly broken by parent commit 2020-03-14 15:17:20 -07:00
Duo Zhang 7eeb6a0815 HBASE-23077 move entirely to spotbugs (#1265)
Signed-off-by: Sean Busbey <busbey@apache.org>
2020-03-12 11:42:23 +08:00