av9ash/GitBugs huggingface dataset:
Bug: Build against Hadoop 3.3.3
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 26/May/22 21:19
Affects Version/s: 2.5.0

When building against Hadoop 3.3.3 and any future version of Hadoop incorporating reload4j, the new Enforcer rule we have active in branch-2.5 and up to exclude other logging frameworks besides log4j2 will trigger. We need to add exclusions to prevent that from happening so the build will succeed.

Tested with {{mvn clean install assembly:single -DskipTests -Dhadoop-three.version=3.3.3}} on master branch and with {{mvn clean install assembly:single -DskipTests -Dhadoop.profile=3.0 -Dhadoop-three.version=3.3.3}} on branch-2.5. 

I also needed to exclude leveldbjni-all via hadoop-hdfs to avoid a LICENSE file generation error. hadoop-hdfs is messy and exports this among findbugs and other clutter. Anyway, better to exclude something we do not require than add an unnecessary supplemental model.
Bug: The CPU usage of the regionserver node where the meta table is located is too high
Status: Reopened | Priority: Major | Resolution: 
Created: 27/Apr/22 12:21
Affects Version/s: 2.3.4

When the read and write pressure is high, the CPU usage of the meta table node is too high

!image-2022-04-28-09-59-40-567.png!

 

!image-2022-04-27-20-24-33-252.png!
Bug: ClientZKSyncer.deleteDataForClientZkUntilSuccess should break from the loop when deletion is succeeded
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 25/Jun/22 08:49

https://nightlies.apache.org/hbase/HBase-Flaky-Tests/master/3745/hbase-server/target/surefire-reports/org.apache.hadoop.hbase.client.TestSeparateClientZKCluster-output.txt

{noformat}
2022-06-25T04:53:00,316 DEBUG [ClientZKUpdater-/hbase/meta-region-server-1] zksyncer.ClientZKSyncer(200): Failed to delete node from client ZK, will retry later
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase/meta-region-server-1
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:118) ~[zookeeper-3.5.7.jar:3.5.7]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[zookeeper-3.5.7.jar:3.5.7]
	at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:1793) ~[zookeeper-3.5.7.jar:3.5.7]
	at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.delete(RecoverableZooKeeper.java:210) ~[hbase-zookeeper-3.0.0-alpha-3.jar:3.0.0-alpha-3]
	at org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:851) ~[hbase-zookeeper-3.0.0-alpha-3.jar:3.0.0-alpha-3]
	at org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:843) ~[hbase-zookeeper-3.0.0-alpha-3.jar:3.0.0-alpha-3]
	at org.apache.hadoop.hbase.master.zksyncer.ClientZKSyncer.deleteDataForClientZkUntilSuccess(ClientZKSyncer.java:198) ~[classes/:?]
	at org.apache.hadoop.hbase.master.zksyncer.ClientZKSyncer.access$400(ClientZKSyncer.java:45) ~[classes/:?]
	at org.apache.hadoop.hbase.master.zksyncer.ClientZKSyncer$ClientZkUpdater.run(ClientZKSyncer.java:318) ~[classes/:?]
{noformat}

Not sure if this is the root cause of the flakiness but at least it messes up the output, let's fix it first.
Bug: Avoid CellUtil.cloneRow in MetaCellComparator
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 21/Jun/22 13:24

In HBASE-26981, a flame graph shows that we spend a lot of CPUs in CellUtils.cloneXXX.

Since we need to split the row to different parts when comparing, we can not use ByteBuffer compare directly, but as least, we should try to avoid copy the content when the Cell is stored in a ByteBuffer.
Bug: Make Netty channel bytebuf allocator configurable
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 12/Jun/22 17:47
Affects Version/s: 2.5.0

Netty supports different strategies for allocating byte buffers for IO and channel modules. We do not allow the site operator to fine tune this but could. It would be particularly useful to allow preference of heap buffers where direct memory may be limited or utilized for other purposes. 

Support site configuration of the bytebuf allocator that Netty will use for NettyRpcServer channels. Property name is 'hbase.netty.rpcserver.allocator'. Default is no value, which is equivalent to "pooled". Valid values are:
- "pooled": use PooledByteBufAllocator
- "unpooled": use UnpooledByteBufAllocator
- "heap": use HeapByteBufAllocator, which is a PooledByteBufAllocator that preferentially allocates buffers on heap wherever possible
- <class>: If the value is none of the recognized labels, treat it as a class name implementing org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator. This allows the user to add a custom implementation, perhaps for debugging.
Bug: TestMultiRespectsLimits.testBlockMultiLimits repeatable failure
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 23/Jun/22 03:02
Affects Version/s: 2.4.12

[ERROR] org.apache.hadoop.hbase.client.TestMultiRespectsLimits.testBlockMultiLimits  Time elapsed: 1.414 s  <<< FAILURE!
java.lang.AssertionError: exceptions (0) should be greater than 0
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.apache.hadoop.hbase.test.MetricsAssertHelperImpl.assertCounterGt(MetricsAssertHelperImpl.java:191)
	at org.apache.hadoop.hbase.client.TestMultiRespectsLimits.testBlockMultiLimits(TestMultiRespectsLimits.java:185)

A git bisect identified HBASE-26856 as the cause.
Bug: Remove ThreadPool in HBaseInterClusterReplicationEndpoint when use AsyncClusterConnection
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 25/May/22 11:45
Affects Version/s: 3.0.0-alpha-2

For master branch, {{HBaseInterClusterReplicationEndpoint}} has already to use  {{AsyncClusterConnection}} to  send to peer cluster, but it still use {{ThreadPoolExecutor}} to call {{AsyncRegionServerAdmin.replicateWALEntry}} synchronously, I think we could remove the  {{ThreadPoolExecutor}}  and call {{AsyncRegionServerAdmin.replicateWALEntry}} using asynchronous style.
Bug: TestMultiRespectsLimits consistently failing
Status: Resolved | Priority: Major | Resolution: Duplicate
Created: 22/Jun/22 18:31
Affects Version/s: 2.4.12

TestMultiRespectsLimits#testBlockMultiLimits is consistently failing:
{code:java}
Error Messageexceptions (0) should be greater than 0Stacktracejava.lang.AssertionError: exceptions (0) should be greater than 0
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.apache.hadoop.hbase.test.MetricsAssertHelperImpl.assertCounterGt(MetricsAssertHelperImpl.java:191)
	at org.apache.hadoop.hbase.client.TestMultiRespectsLimits.testBlockMultiLimits(TestMultiRespectsLimits.java:185)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) {code}
Reports:

[https://ci-hbase.apache.org/job/HBase-Flaky-Tests/job/branch-2.4/3377/testReport/junit/org.apache.hadoop.hbase.client/TestMultiRespectsLimits/testBlockMultiLimits/]

[https://ci-hbase.apache.org/job/HBase-Flaky-Tests/job/branch-2.4/3378/testReport/junit/org.apache.hadoop.hbase.client/TestMultiRespectsLimits/testBlockMultiLimits/]

[https://ci-hbase.apache.org/job/HBase-Flaky-Tests/job/branch-2.4/3376/testReport/junit/org.apache.hadoop.hbase.client/TestMultiRespectsLimits/testBlockMultiLimits/]
Bug: Add hbase-unsafe as a dependency for a MR job triggered by hbase shell
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 21/Jun/22 06:32
Affects Version/s: 2.4.13

After HBASE-26523, the use of hbase-thirdparty 4.1.0 introduced an new dependency of hbase-unsafe that wasn't added as part of the MR job triggered by hbase-shell. As such, class not found exception was being emitted when executing in distributed mode.

{code}
22/06/21 04:57:15 INFO mapreduce.Job: Task Id : attempt_1655784404826_0011_m_000000_0, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.unsafe.HBasePlatformDependent
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at org.apache.hadoop.hbase.util.Bytes.<clinit>(Bytes.java:129)
	at org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList$Generator$GeneratorMapper.setup(IntegrationTestBigLinkedList.java:455)
	at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:799)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168)
{code}

This task will add it back as part of the job configuration handled by hbase internally in addHBaseDependencyJars
Bug: [HBCK2] Some commands are broken after HBASE-24587
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 14/Jun/22 15:13

HBCK2 _replication_ and _filesystem_ commands are broken after HBASE-24587. Trying to pass the _-f_ or _--fix_ options give the below error:
{noformat}
ERROR: Unrecognized option: -f
FOR USAGE, use the -h or --help option
2022-06-14T16:07:32,296 INFO  [main] client.ConnectionImplementation: Closing master protocol: MasterService
Exception in thread "main" java.lang.NullPointerException
	at org.apache.hbase.HBCK2.doCommandLine(HBCK2.java:1083)
	at org.apache.hbase.HBCK2.run(HBCK2.java:982)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
	at org.apache.hbase.HBCK2.main(HBCK2.java:1318)
{noformat}

This is because _getInputList_ calls [here|https://github.com/apache/hbase-operator-tools/blob/master/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java#L1073] and [here|https://github.com/apache/hbase-operator-tools/blob/master/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java#L1082] only accept the _-i_/_--inputFiles_, throwing an exception if we pass _-f/--fix_ options.

Still need to confirm if any other command is affected by this.
Bug: Mark ByteBufferUtils as IA.Private
Status: Resolved | Priority: Major | Resolution: Duplicate
Created: 21/Jun/22 12:59

As the javadoc says

{code}
/**
 * Utility functions for working with byte buffers, such as reading/writing variable-length long
 * numbers.
 * @deprecated This class will become IA.Private in HBase 3.0. Downstream folks shouldn't use it.
 */
{code}
Bug: TestMultiRespectsLimits.testBlockMultiLimits is flaky
Status: Open | Priority: Major | Resolution: 
Created: 14/Jun/22 16:33

This test case failed twice in the pre-commit [jdk8|https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4493/7/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt] and [jdk11|https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4493/7/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt] checks for PR-4493
Bug: HBase site generation should use its own JRuby
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 11/Jun/22 05:26

The maven plugin we use to generate the reference guide, {{asciidoctor-maven-plugin}}, does not yet work with JRuby 9.3.

Due to a dependency error we currently get a mix of JRuby 9.2 and 9.3 libraries when building the site goal, which fails without an actionable error message. Correcting the dependency to consistently get JRuby 9.3 also results in failure, but due to gem resolution.

We originally started overriding the JRuby version to get Aarch64 support. The version that ships with the plugin has this support already.

Falling back to JRuby 9.2 for the plugin will mean our reference guide building won't work on M1 systems, but I don't see how we can change that until the plugin updates for JRuby 9.3 changes.
Bug: Vacate the .idea folder in order to simplify spotless configuration
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 09/Jun/22 09:56
Affects Version/s: 2.4.12

Per discussion on HBASE-27096, spotless configuration is a bit ham-handed. We can simplify its maintenance by ignoring entirely the {{.idea}} directory. Since committing project files there is not workable at the moment, the only functionality present there is {{checkstyle-idea.xml}}. Let's move that to {{dev-support}} and update the book accordingly.
Bug: HbckChore should produce a report
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 07/Jun/22 13:53
Affects Version/s: 2.4.12

In the PR for HBASE-26192, it was noted that the HbckChore is kind of a pain to use and test because it maintains a bunch of local state. By contract, the CatalogJanitorChore makes a nice self-contained report. Let's update HbckChore to do the same.
Bug: Upgrade JRuby to 9.3.4.0
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 27/Apr/22 13:19
Affects Version/s: 2.4.11

Hbase shell is failing to start on Apple M1 OSX ARM 64 processor architecture.

*Error:*
{code}
Version 2.4.11, r7e672a0da0586e6b7449310815182695bc6ae193, Tue Mar 15 10:31:00 PDT 2022
Took 0.0010 seconds
NotImplementedError: fstat unimplemented unsupported or native support failed to load; see https://github.com/jruby/jruby/wiki/Native-Libraries
  initialize at org/jruby/RubyIO.java:1015
        open at org/jruby/RubyIO.java:1156
  initialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/input-method.rb:141
  initialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/context.rb:70
  initialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb:410
  initialize at uri:classloader:/irb/hirb.rb:49
      <main> at classpath:/jar-bootstrap.rb:223
{code}
 

{*}Uname output{*}:
{code}
Darwin vijays-mbp.lan 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64
{code}
Bug: The Region Visualizer display failed
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 27/May/22 06:22
Affects Version/s: 2.5.0

The `Region Visualizer` display failed. Because the active master hostname is `localhost`.

Before the change:

!image-2022-05-27-14-22-44-336.png|width=520,height=162!

After the change:

!image-2022-05-27-14-22-29-015.png|width=562,height=229!
Bug: AsyncNonMetaRegionLocator：put Complete CompletableFuture outside lock block
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 07/Jun/22 03:02
Affects Version/s: 2.4.12

 
{code:java}
synchronized (tableCache) {
  tableCache.pendingRequests.remove(req);
  // fail the request itself, no matter whether it is a DoNotRetryIOException, as we have
  // already retried several times
  CompletableFuture<?> future = tableCache.allRequests.remove(req);
  if (future != null) {
    future.completeExceptionally(error);
  }
  tableCache.clearCompletedRequests(null);
  // Remove a complete locate request in a synchronized block, so the table cache must have
  // quota to send a candidate request.
  toSend = tableCache.getCandidate();
  toSend.ifPresent(r -> tableCache.send(r));
}

{code}
Complete or completeExceptionally in a lock block may cause deadlock. We can put this action outside the lock block to avoid deadlock.
Bug: Terminating standalone process is slow
Status: Open | Priority: Major | Resolution: 
Created: 06/Jun/22 10:11
Affects Version/s: 3.0.0-alpha-2

Run hbase in standalone mode off of master, terminate the process with ^C.  The process takes its sweet time to terminate. Luckily, we have some thread management utility code to inspect this behavior. Jetty takes a little time to shutdown, but does eventually. More problematic is the ZooKeeper client, which appears to not take a hint. In fact, the client attempts to initiate new connections to a service which has already been terminated, making matters worse.

{noformat}
2022-06-06T11:59:36,137 INFO  [main] util.Threads: Non daemon thread SessionTracker is still alive
2022-06-06T11:59:36,137 INFO  [main] util.Threads:
    java.base@11.0.11/java.lang.Thread.sleep(Native Method)
    app//org.apache.zookeeper.server.SessionTrackerImpl.run(SessionTrackerImpl.java:151)
2022-06-06T11:59:36,137 INFO  [main] util.Threads: Non daemon thread RS:0;192.168.178.157:16020 is still alive
2022-06-06T11:59:36,137 INFO  [main] util.Threads:
    java.base@11.0.11/java.lang.Object.wait(Native Method)
    java.base@11.0.11/java.lang.Object.wait(Object.java:328)
    app//org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1529)
    app//org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1512)
    app//org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:1791)
    app//org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.delete(RecoverableZooKeeper.java:210)
    app//org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:851)
    app//org.apache.hadoop.hbase.zookeeper.ZKUtil.deleteNode(ZKUtil.java:843)
    app//org.apache.hadoop.hbase.regionserver.HRegionServer.deleteMyEphemeralNode(HRegionServer.java:1453)
    app//org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:969)
    java.base@11.0.11/java.lang.Thread.run(Thread.java:829)
2022-06-06T11:59:36,137 INFO  [main] util.Threads: Non daemon thread Thread-2 is still alive
2022-06-06T11:59:36,138 INFO  [main] util.Threads:
    java.base@11.0.11/jdk.internal.misc.Unsafe.park(Native Method)
    java.base@11.0.11/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
    java.base@11.0.11/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:444)
    java.base@11.0.11/java.util.concurrent.FutureTask.get(FutureTask.java:203)
    app//org.apache.hadoop.util.ShutdownHookManager.executeShutdown(ShutdownHookManager.java:124)
    app//org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:95)
2022-06-06T11:59:36,392 INFO  [SessionTracker] server.SessionTrackerImpl: SessionTrackerImpl exited loop!
2022-06-06T11:59:36,442 INFO  [main-SendThread(127.0.0.1:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown err
or)
2022-06-06T11:59:36,442 INFO  [main-SendThread(127.0.0.1:2181)] zookeeper.ClientCnxn: Socket error occurred: localhost/127.0.0.1:2181: Connection refused
{noformat}

Full session in the attached log.
Bug: SecureBulkLoadManager will set wrong permission if umask too strict
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 28/Apr/22 03:53
Affects Version/s: 2.4.11

SecureBulkLoadManager will create baseStagingDir if not exist. start method use 
fs.mkdirs(baseStagingDir, PERM_HIDDEN); to create directory with permission -rwx–x–x.BUT if umask is too strict such as 077 ,this directory will create with 0700 so it too strict for GROUP and OTHER user to own execute permission
Bug: Make the new framework for region replication could work for SKIP_WAL
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 30/Apr/22 03:54
Affects Version/s: 3.0.0-alpha-2

For now , the new region replication framework introduced by HBASE-26233 could not work for table which {{DURABILITY}} is {{Durability.SKIP_WAL}}, but the framework does not build on WAL replication, so it should also work for SKIP_WAL, and besides  table could be SKIP_WAL, the individual {{Mutation}}  could also be SKIP_WAL.
Bug: Add protobuf to NOTICE file
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 11/May/22 08:44

The spotless formatting removed the protobuf credit from the AbstractByteRange. It is currently not included in the NOTICE file.

https://github.com/apache/hbase/commit/9c8c9e7fbf8005ea89fa9b13d6d063b9f0240443#diff-f5806f14849a23b9265b022f3f330b80d08bcc10fcf69d8ee2e1b0d5af266d52
Bug: NPE occurs when the active master has not yet been elected
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 29/May/22 02:09

When the active master has not yet been elected. We access the master web UI, a NPE will be thrown out. Assertion is now added, but assertion in production is disabled by default. We can use `Preconditions` instead.

 

Before the change:

!image-2022-05-29-10-08-21-637.png|width=268,height=256!

 

After the change:

!image-2022-05-29-10-08-49-672.png|width=263,height=255!
Bug: Admin#getLastMajorCompactionTimestamp() doesn't get updated when the EnvironmentEdgeManager clock is stopped
Status: Resolved | Priority: Major | Resolution: Not A Bug
Created: 23/May/22 15:35
Affects Version/s: 2.5.0

In Hbase 2.0-2.4 it is possible to check for a finished compaction by polling 

Admin.getLastMajorCompactionTimestamp() for the table under compaction, even when the clock is stopped via EnvironmentEdgeManager.

However, in Hbase 2.5 the Admin.getLastMajorCompactionTimestamp() will not be updated even after the compaction is finished, and getCompactionState() returns NONE.

I am not even sure that this is bug, however, this has broken one of our Phoenix tests, and may cause problems for others.

This is the test code that breaks:
[https://github.com/apache/phoenix/blob/8aa825ed88828a99d40fdb68eb2f930981cd8a6b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java#L818]

Admin.getLastMajorCompactionTimestamp() seems to take the value from the Metrics, so I guess that the metrics no longer get updated somewhere when the clock is stopped.

I did not dig deeper than that.
Bug: Synchronous API calls for Split, Merge, and Compaction operations for testing
Status: Open | Priority: Major | Resolution: 
Created: 31/May/22 04:16

While generally split, merge, and compaction operations are too slow for synchrounous calls, for many tests we do need to wait until these operations are finished to be able to check their results.
At least in the Phoenix tests, we also need to to do this while the EnvirenmentEdge clock is stopped.
The polling method Admin.getLastMajorCompactionTimestamp() the we used for compactions has stopped working with EnvironmentEdgeManager in 2.5, see HBASE-27058 for details. We've also had similar issues in the past, where new versions made the previous workaround for synchronous operations fail.

A longer-term solution for the problem would be having Synchronous API calls for testing, which block on the client side until the requested operation is finished.

These could be added as variants to Admin / AsyncAdmin, or could be somewhere else, it doesn't really matter, as these would not be well suited for production use anyway.
Bug: TestMetaFixed fails reliably with Hadoop 3.2.3 and Hadoop 3.3.2
Status: Resolved | Priority: Major | Resolution: Duplicate
Created: 22/Apr/22 16:02
Affects Version/s: 2.4.12

Noticed on build results over on https://github.com/apache/hbase/pull/4305, and reproduces locally with AdoptOpenJDK-11.0.11+9 .
Bug: Fix undefined local variable error in draining_servers.rb
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 13/May/22 08:41
Affects Version/s: 3.0.0-alpha-3

HBASE-21812 replaced a for-loop with an each block. Each block introduces a new scope, so a local variable defined inside it cannot be accessed afterwards.

{quote}
  NameError: undefined local variable or method `admin' for main:Object
    getServerNames at /opt/khp/hbase/bin/draining_servers.rb:81
        addServers at /opt/khp/hbase/bin/draining_servers.rb:88
            <main> at /opt/khp/hbase/bin/draining_servers.rb:146
{quote}
 
{code:java}
for i in [1, 2, 3]
  a = i
end
puts a
  # 3

[4, 5, 6].each do |i|
  b = i
end
puts b
  # undefined local variable or method `b'
{code}

We can define the admin local variable in the current scope beforehand, and we can still access it after the block.