Commit Graph

129 Commits

Author SHA1 Message Date
Andor Molnár a6e89bf624
HBASE-27810. Check if the executor has already been shut down before submitting new job (#5207)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2023-04-28 16:46:22 +02:00
Duo Zhang dcfde79f7e
HBASE-27514 Move some persistent states from zookeeper to master region (#4925)
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
2022-12-22 12:04:24 +08:00
Duo Zhang 2fc879e863
HBASE-27434 Use ${revision} as placeholder for maven version to make it easier to control the version from command line (#4836)
Signed-off-by: GeorryHuang <huangzhuoyue@apache.org>
2022-10-24 11:50:48 +08:00
Victor 77a21b93c5
HBASE-27426 - Fix ZKWatcher shutdown seqence to avoid InterruptExcept… (#4829)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Co-authored-by: Victor Li <victor.li@salesforce.com>
2022-10-17 13:26:09 -07:00
sanjeet006py b656456e20
HBASE-27420 Allow non-loopback for zk standalone server in minizkcluster (#4819)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Co-authored-by: Sanjeet Malhotra <sanjeetmalhotra@salesforce.com>
2022-10-11 10:35:57 -07:00
Duo Zhang 63cdd026f0
HBASE-27401 Clean up current broken 'n's in our javadoc (#4812)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
2022-10-06 18:17:34 +08:00
Duo Zhang 8b091c4061
HBASE-27222 Purge FutureReturnValueIgnored warnings from error prone (#4634)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
2022-07-26 23:42:37 +08:00
Duo Zhang acf144717b HBASE-27220 Apply the spotless format change in HBASE-27208 to our code base
Signed-off-by: Andrew Purtell <apurtell@apache.org>
2022-07-19 10:00:43 +08:00
Duo Zhang 9bcb7493e0
HBASE-27165 Set version as 3.0.0-alpha-4-SNAPSHOT in master (#4582)
Signed-off-by: Xin Sun <ddupgs@gmail.com>
2022-06-29 11:04:21 +08:00
Duo Zhang 02990894ab
HBASE-27121 Set version as 3.0.0-alpha-3 in master in prep for first RC of 3.0.0-alpha-3 (#4535)
Signed-off-by: Xin Sun <ddupgs@gmail.com>
2022-06-15 10:51:31 +08:00
Nick Dimiduk ed7e15dc91
HBASE-26366 Provide meaningful parent spans to ZK interactions
Signed-off-by: Andrew Purtell <apurtell@apache.org>
2022-06-10 16:25:55 +02:00
Duo Zhang 9c8c9e7fbf HBASE-26899 Run spotless:apply
Closes #4312
2022-05-01 22:15:09 +08:00
Duo Zhang 3ae0d9012c
HBASE-26922 Fix LineLength warnings as much as possible if it can not be fixed by spotless (#4324)
Signed-off-by: Yulin Niu <niuyulin@apache.org
2022-04-09 21:38:41 +08:00
Andrew Purtell 10471944bd
HBASE-26582 Prune use of Random and SecureRandom objects (#4118)
Avoid the pattern where a Random object is allocated, used once or twice, and
then left for GC. This pattern triggers warnings from some static analysis tools
because this pattern leads to poor effective randomness. In a few cases we were
legitimately suffering from this issue; in others a change is still good to
reduce noise in analysis results.

Use ThreadLocalRandom where there is no requirement to set the seed to gain
good reuse.

Where useful relax use of SecureRandom to simply Random or ThreadLocalRandom,
which are unlikely to block if the system entropy pool is low, if we don't need
crypographically strong randomness for the use case. The exception to this is
normalization of use of Bytes#random to fill byte arrays with randomness.
Because Bytes#random may be used to generate key material it must be backed by
SecureRandom.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
2022-03-08 13:49:02 -08:00
Nick Dimiduk 625d610bcc
HBASE-26614 Refactor code related to "dump"ing ZK nodes (#3969)
The code starting at `ZKUtil.dump(ZKWatcher)` is a small mess – it has cyclic dependencies woven
through itself, `ZKWatcher` and `RecoverableZooKeeper`. It also initializes a static variable in
`ZKUtil` through the factory for `RecoverableZooKeeper` instances. Let's decouple and clean it
up.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
2022-01-24 11:33:18 -08:00
Nick Dimiduk 5e263dac38
HBASE-26616 Refactor code related to ZooKeeper authentication (#3973)
This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2022-01-06 17:04:15 -08:00
Duo Zhang 3f59f21be0
HBASE-26621 Set version as 3.0.0-alpha-3-SNAPSHOT in master (#3978)
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
2021-12-24 14:20:32 +08:00
Duo Zhang 8bca21b47d
HBASE-26558 Set version as 3.0.0-alpha-2 in master in prep for first RC of 3.0.0-alpha-2 (#3935)
Signed-off-by: Geoffrey Jacoby <gjacoby@apache.org>
2021-12-11 20:52:35 +08:00
Duo Zhang 1152a61b5b
HBASE-26220 Use P2P communicate between region servers to sync the list for bootstrap node (#3697)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2021-09-29 21:12:58 +08:00
Duo Zhang 4ea23c3baf
HBASE-26285 Remove MetaTableLocator usages in non-migration code (#3686)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2021-09-21 22:22:00 +08:00
Andrew Purtell ed56a40e46
HBASE-25588 Excessive logging of "hbase.zookeeper.useMulti is deprecated. Default to true always." (#3640)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Reviewed-by: Duo Zhang <zhangduo@apache.org>
2021-08-31 09:39:21 -07:00
GeorryHuang 4b0a64033a
HBASE-26215 The backup master status page should use ActiveMasterManager instead of MasterAddressTracker (#3621)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2021-08-25 16:41:42 +08:00
Duo Zhang c8d9d4df80
HBASE-26172 Deprecated MasterRegistry (#3566)
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
2021-08-19 16:16:35 +08:00
Duo Zhang 63d4970de4
HBASE-26150 Let region server also carry ClientMetaService (#3550)
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
2021-08-04 23:44:10 +08:00
Duo Zhang b248730126
HBASE-26151 Reimplement MasterAddressTracker to also cache backup master addresses (#3548)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2021-07-31 15:39:08 +08:00
Duo Zhang 5f0950558f
HBASE-26096 Cleanup the deprecated methods in HBTU related classes and format code (#3503)
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2021-07-29 10:18:38 +08:00
Duo Zhang 16721239e7
HBASE-26100 Set version as 3.0.0-alpha-2-SNAPSHOT in master (#3508)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2021-07-20 23:04:08 +08:00
Duo Zhang d30cc27097
HBASE-26081 Copy HBTU to hbase-testing-util, rename the HBTU related classes in hbase-server and mark them as IA.LimitedPrivate (#3478)
Signed-off-by: Michael Stack <stack@apache.org>
2021-07-19 09:29:08 +08:00
Duo Zhang 5118321ec9
HBASE-26059 Set version as 3.0.0-alpha-1 in master in prep for first RC of 3.0.0-alpha-1 (#3453)
Signed-off-by: Pankaj Kumar <pankajkumar@apache.org>
2021-07-02 07:50:41 +08:00
litao 555f8b461f
HBASE-26000 Optimize the display of ZK dump in the master web UI (#3383)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2021-06-15 14:10:55 +01:00
Andrew Purtell 335305e0cf
HBASE-25911 Replace calls to System.currentTimeMillis with EnvironmentEdgeManager.currentTime (#3302)
We introduced EnvironmentEdgeManager as a way to inject alternate clocks
for unit tests. In order for this to be effective, all callers that would
otherwise use System.currentTimeMillis() must call
EnvironmentEdgeManager.currentTime() instead, except the implementers of
EnvironmentEdge.

Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2021-06-01 09:57:48 -07:00
Duo Zhang 302d9ea8b8 HBASE-25373 Remove HTrace completely in code base and try to make use of OpenTelemetry
Signed-off-by: stack <stack@apache.org>
2021-04-25 09:23:23 +08:00
Bharath Vissapragada a59ac48bd9
HBASE-25743: Retry REQUESTTIMEOUT based KeeperExceptions in ZK client. (#3131)
Starting ZOOKEEPER-2251, client requests exceeding a timeout can throw
a KeeperException with REQUESTTIMEOUT opcode set. RecoverableZookeeper
doesn't transparently retry in such cases.

Reviewed-by: Rushabh Shah <rushabh.shah@salesforce.com>
Signed-off-by: Michael Stack <stack@apache.org>
2021-04-07 23:44:07 -07:00
Duo Zhang ba3610d097
HBASE-19577 Use log4j2 instead of log4j for logging (#1708)
Signed-off-by: stack <stack@apache.org>
2021-03-20 09:21:25 +08:00
Anoop Sam John a698b1ea53
HBASE-25673 Wrong log regarding current active master at ZKLeaderManager#waitToBecomeLeader (#3057)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
2021-03-18 21:18:25 +05:30
Josh Elser ec63cc3144 HBASE-25279 Make ZKWatcher ExecutorService launch daemon threads
Closes #2651

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Yulin Niu <niuyulin@apache.org>
2020-12-31 19:19:23 -05:00
Duo Zhang 55a4eca9e6
HBASE-25452 Use MatcherAssert.assertThat instead of org.junit.Assert.assertThat (#2826)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
2020-12-30 09:47:56 +08:00
Laxman Goswami fa257539ca
HBASE-25230 Embedded zookeeper server not clean up the old data
Closes #2732

Signed-off-by: maoling <maoling199210191@sina.com>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-12-03 14:39:16 +05:30
Andrew Purtell 679dd7b8f9
HBASE-25292 Improve InetSocketAddress usage discipline (#2669)
Network identities should be bound late. Remote addresses should be
resolved at the last possible moment, just before connect(). Network
identity mappings can change, so our code should not inappropriately
cache them. Otherwise we might miss a change and fail to operate normally.

Revert "HBASE-14544 Allow HConnectionImpl to not refresh the dns on errors"
Removes hbase.resolve.hostnames.on.failure and related code. We always
resolve hostnames, as late as possible.

Preserve InetSocketAddress caching per RPC connection. Avoids potential
lookups per Call.

Replace InetSocketAddress with Address where used as a map key. If we want
to key by hostname and/or resolved address we should be explicit about it.
Using Address chooses mapping by hostname and port only.

Add metrics for potential nameservice resolution attempts, whenever an
InetSocketAddress is instantiated for connect; and metrics for failed
resolution, whenever InetSocketAddress#isUnresolved on the new instance
is true.

* Use ServerName directly to build a stub key

* Resolve and cache ISA on a RpcChannel as late as possible, at first call

* Remove now invalid unit test TestCIBadHostname

We resolve DNS at the latest possible time, at first call, and do not
resolve hostnames for creating stubs at all, so this unit test cannot
work now.

Reviewed-by: Mingliang Liu <liuml07@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2020-11-28 21:01:22 +08:00
Andrew Purtell 1726160839
HBASE-24640 Purge use of VisibleForTesting (#2695)
Signed-off-by: Reid Chan <reidchan@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
2020-11-25 14:10:12 -08:00
Qi Yu 984d578dd4
HBASE-25323 Fix potential NPE when the zookeeper path of RegionServerTracker does not exist when start (#2702)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Guanghao Zhang <zghao@apache.org>
2020-11-25 15:13:09 +08:00
Duo Zhang b268b1f621
HBASE-25103 Remove ZNodePaths.metaReplicaZNodes (#2464)
Signed-off-by: Huaxiang Sun <huaxiangsun@apache.com>
2020-09-29 15:48:57 +08:00
Michael Stack 70a947dc6b
HBASE-25067 Edit of log messages around async WAL Replication; checkstyle fixes; and a bugfix (#2435)
Editing logging around region replicas: shortening and adding context.
Checkstyle fixes in edited files while I was in there.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
2020-09-22 10:10:31 -07:00
Bharath Vissapragada 01cf60067c
HBASE-24765: Dynamic master discovery (#2130)
This patch adds the ability to discover newly added masters
dynamically on the master registry side. The trigger for the
re-fetch is either periodic (5 mins) or any registry RPC failure.
Master server information is cached in masters to avoid repeated
ZK lookups.

Updates the client side connection metrics to maintain a counter
per RPC type so that clients have visibility into counts grouped
by RPC method name.

I didn't add the method to ZK registry interface since there
is a design discussion going on in splittable meta doc. We can
add it later if needed.

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
2020-08-25 15:09:03 -07:00
WenFeiYi 066be4a76f
HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown
* Resolves Exception on standalone (master) shutdown

Closes #2239

Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-08-12 17:09:40 +05:30
Viraj Jasani ea130249ae
HBASE-24750 : Adding default UncaughtExceptionHandler for Thread factories (ADDENDUM)
Closes #2231
2020-08-11 17:18:47 +05:30
Viraj Jasani 0b604d921a
HBASE-24750 : All ExecutorService should use guava ThreadFactoryBuilder
Closes #2196

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Ted Yu <tyu@apache.org>
2020-08-07 20:24:36 +05:30
Michael Stack 345b77a4ca
HBASE-24632 Enable procedure-based log splitting as default in hbase3 Add deprecation of 'classic' zk-based WAL splitter. (#2156)
Also fix three bugs:

 * We were trying to delete non-empty directory; weren't doing
 accounting for meta WALs where meta had moved off the server
 (successfully)
 * We were deleting split WALs rather than archiving them.
 * We were not handling corrupt files.

Deprecations and removal of tests of old system.

Signed-off-by: Anoop Sam John <anoopsamjohn@apache.org>
2020-07-29 07:37:28 -07:00
Bharath Vissapragada 84e246f9b1
HBASE-24603: Make Zookeeper sync() call synchronous (#1945)
Writing a test for this is tricky. There is enough coverage for
functional tests. Only concern is performance, but there is enough
logging for it to detect timed out/badly performing sync calls.

Additionally, this patch decouples the ZK event processing into it's
own thread rather than doing it in the EventThread's context. That
avoids deadlocks and stalls of the event thread.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
2020-06-25 13:27:38 -07:00
Duo Zhang 8601416ee8
HBASE-24309 Avoid introducing log4j and slf4j-log4j dependencies for modules other than hbase-assembly (#1640)
Signed-off-by: stack <stack@apache.org>
2020-05-12 12:03:30 +08:00