Skip to content

HBASE-28660 list_namespace not working after an incorrect user input (branch-2.6)#8015

Merged
NihalJain merged 1 commit intoapache:branch-2.6from
arvindKandpal-ksolves:HBASE-28660-branch-2.6
Apr 6, 2026
Merged

HBASE-28660 list_namespace not working after an incorrect user input (branch-2.6)#8015
NihalJain merged 1 commit intoapache:branch-2.6from
arvindKandpal-ksolves:HBASE-28660-branch-2.6

Conversation

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor

This is a backport of HBASE-28660 to branch-2.6.

(cherry picked from commit 2e42e4c)

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

I've raised the backport for branch-2.6:

  • Cherry-picked the commit from master and amended the message.
  • Handled the same minor merge conflict in hirb.rb as in branch-2.5 to accommodate the older JRuby output_value method signature (0 arguments). The core fix remains completely intact.
  • Ran comprehensive manual tests on a local standalone cluster. Triggering bad syntax (list_namespace, 'ns.*') and assignments (list = 10) successfully logged the expected WARN messages and caught the SyntaxError.
  • Validated that the shell binding remained perfectly healthy afterward by executing cluster commands (create, put, scan, drop), which all succeeded without issues.
  • Will proceed to branch-3 next!

cc @NihalJain @Apache9 @liuxiaocs7 @vaijosh

@NihalJain NihalJain added the backport This PR is a back port of some issue or issues already committed to master label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@vaijosh vaijosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liuxiaocs7
Copy link
Copy Markdown
Member

Hi, @arvindKandpal-ksolves, please take a look at the failed ut when free, thanks!

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

arvindKandpal-ksolves commented Apr 2, 2026

Hi @liuxiaocs7,

I looked into the large-wave-3 failures. It failed in TestShell with this error:
org.jruby.embed.EvalFailedException: (RuntimeError) test_Change_table's_sft is already defined in SftChangeTest (at sftchange_test_cluster.rb:31).

I checked this file locally and there are actually no duplicate tests. It looks like a CI flake where the JRuby test runner is accidentally double-loading the file and throwing the "already defined" error.

Since my changes are only in hirb.rb and general_test_cluster.rb, this failure is completely unrelated to this PR.

Could you please re-run the failed jobs ? Thanks!

I have download the zip then , look into the files as mention below.

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

arvindKandpal-ksolves commented Apr 2, 2026

cat archiver/hbase-shell/target/surefire-reports/org.apache.hadoop.hbase.client.TestShell.txt

Test set: org.apache.hadoop.hbase.client.TestShell

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.845 s <<< FAILURE! -- in org.apache.hadoop.hbase.client.TestShell
org.apache.hadoop.hbase.client.TestShell.testRunShellTests -- Time elapsed: 6.825 s <<< ERROR!
org.jruby.embed.EvalFailedException: (RuntimeError) test_Change_table's_sft is already defined in SftChangeTest
	at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:134)
	at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1296)
	at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1341)
	at org.apache.hadoop.hbase.client.RubyShellTest.testRunShellTests(RubyShellTest.java:105)
	at org.apache.hadoop.hbase.client.AbstractTestShell.testRunShellTests(AbstractTestShell.java:65)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.hbase.HBaseJupiterExtension.lambda$runWithTimeout$0(HBaseJupiterExtension.java:159)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.jruby.exceptions.RuntimeError: (RuntimeError) test_Change_table's_sft is already defined in SftChangeTest
	at home.runner.work.hbase.hbase.src.hbase_minus_shell.src.test.ruby.test_helper.define_test(/home/runner/work/hbase/hbase/src/hbase-shell/src/test/ruby/test_helper.rb:26)
	at RUBY.<class:SftChangeTest>(src/test/ruby/shell/sftchange_test_cluster.rb:31)
	at RUBY.<main>(src/test/ruby/shell/sftchange_test_cluster.rb:23)
	at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1053)
	at RUBY.<main>(src/test/ruby/tests_runner.rb:55)
	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1865)
	at RUBY.<main>(src/test/ruby/tests_runner.rb:43)

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

cat archiver/hbase-shell/target/surefire-reports/org.apache.hadoop.hbase.client.TestTableShell.txt

Test set: org.apache.hadoop.hbase.client.TestTableShell
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 46.31 s -- in org.apache.hadoop.hbase.client.TestTableShell

@NihalJain
Copy link
Copy Markdown
Contributor

Thank you @arvindKandpal-ksolves , i have retriggered failed jobs. BTW have you raise branch-3 PR i will start merging from there towards branch-2.5

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

arvindKandpal-ksolves commented Apr 2, 2026

Hi @liuxiaocs7,

  • I did a deep dive into the TestShell failures on branch-2.6. The failure is actually happening in ReopenRegionsTest (reopen_regions_test_cluster.rb).

  • It throws a NoMethodError because it's trying to call reopenTableRegions on the Java HBaseAdmin object. However, while checking the Java source in branch-2.6, the reopenTableRegions method does not exist in Admin.java or AsyncAdmin.java (it only exists in branch-3 and master).

  • It seems like an incomplete backport of the reopen_regions feature to branch-2.6. Since my changes for list_namespace are completely isolated and pass locally when tested individually, could we proceed with this PR?

cc @NihalJain @Apache9 @vaijosh

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

BTW have you raise branch-3 PR

@NihalJain yes already done.

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

mnt/backup_hdd/hbase-github-code/hbase$ grep -A 15 "Error:" hbase-shell/target/surefire-reports/org.apache.hadoop.hbase.client.TestShell-output.txt
/mnt/backup_hdd/hbase-github-code/hbase$ grep -A 15 "Failure:" hbase-shell/target/surefire-reports/org.apache.hadoop.hbase.client.TestShell-output.txt


Failure: test_reopen_regions_should_work_for_all_regions(Hbase::ReopenRegionsTest):

  Exception raised:

  NoMethodError(<undefined method `reopenTableRegions' for #<Java::OrgApacheHadoopHbaseClient::HBaseAdmin:0x657c32e>>)

===============================================================================

2026-04-02T16:12:02,207 DEBUG [HBase-Test-TestShell-Main-Thread] zookeeper.ReadOnlyZKClient(407): Close zookeeper connection 0x755d37c7 to 127.0.0.1:52768

2026-04-02T16:12:02,208 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.AbstractRpcClient(519): Stopping rpc client

2026-04-02T16:12:02,214 DEBUG [HBase-Test-TestShell-Main-Thread] zookeeper.ReadOnlyZKClient(149): Connect 0x581a5381 to 127.0.0.1:52768 with session timeout=90000ms, retries=30, retry interval=1000ms, keepAlive=60000ms, zk client config=org.apache.zookeeper.client.ZKClientConfig@1ea16c25

2026-04-02T16:12:02,304 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.AbstractRpcClient(203): Codec=org.apache.hadoop.hbase.codec.KeyValueCodec@4cb2a56d, compressor=null, tcpKeepAlive=true, tcpNoDelay=true, connectTO=10000, readTO=20000, writeTO=60000, minIdleTimeBeforeClose=120000, maxRetries=0, fallbackAllowed=false, bind address=null

2026-04-02T16:12:02,312 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.RpcConnection(157): Using SIMPLE authentication for service=ClientService, sasl=false

2026-04-02T16:12:02,318 INFO  [RS-EventLoopGroup-3-2] ipc.ServerRpcConnection(483): Connection from 127.0.0.1:37998, version=2.6.6-SNAPSHOT, sasl=false, ugi=arvindksi274 (auth:SIMPLE), service=ClientService

Took 0.0097 seconds                                                                                                                                                                     F

===============================================================================

org/jruby/RubyKernel.java:1233:in `catch'

org/jruby/RubyKernel.java:1238:in `catch'

org/jruby/RubyKernel.java:1233:in `catch'

org/jruby/RubyKernel.java:1238:in `catch'

--

Failure: test_reopen_regions_should_work_for_specific_regions(Hbase::ReopenRegionsTest):

  Exception raised:

  NoMethodError(<undefined method `reopenTableRegions' for #<Java::OrgApacheHadoopHbaseClient::HBaseAdmin:0x273f82a5>>)

===============================================================================

2026-04-02T16:12:02,501 DEBUG [HBase-Test-TestShell-Main-Thread] zookeeper.ReadOnlyZKClient(407): Close zookeeper connection 0x581a5381 to 127.0.0.1:52768

2026-04-02T16:12:02,503 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.AbstractRpcClient(519): Stopping rpc client

2026-04-02T16:12:02,533 DEBUG [HBase-Test-TestShell-Main-Thread] zookeeper.ReadOnlyZKClient(149): Connect 0x111b235e to 127.0.0.1:52768 with session timeout=90000ms, retries=30, retry interval=1000ms, keepAlive=60000ms, zk client config=org.apache.zookeeper.client.ZKClientConfig@34831629

2026-04-02T16:12:02,550 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.AbstractRpcClient(203): Codec=org.apache.hadoop.hbase.codec.KeyValueCodec@7328cee8, compressor=null, tcpKeepAlive=true, tcpNoDelay=true, connectTO=10000, readTO=20000, writeTO=60000, minIdleTimeBeforeClose=120000, maxRetries=0, fallbackAllowed=false, bind address=null

2026-04-02T16:12:02,564 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.RpcConnection(157): Using SIMPLE authentication for service=ClientService, sasl=false

2026-04-02T16:12:02,573 INFO  [RS-EventLoopGroup-3-1] ipc.ServerRpcConnection(483): Connection from 127.0.0.1:38014, version=2.6.6-SNAPSHOT, sasl=false, ugi=arvindksi274 (auth:SIMPLE), service=ClientService

2026-04-02T16:12:02,597 DEBUG [HBase-Test-TestShell-Main-Thread] ipc.RpcConnection(157): Using SIMPLE authentication for service=MasterService, sasl=false

2026-04-02T16:12:02,602 INFO  [RS-EventLoopGroup-1-3] ipc.ServerRpcConnection(483): Connection from 127.0.0.1:48920, version=2.6.6-SNAPSHOT, sasl=false, ugi=arvindksi274 (auth:SIMPLE), service=MasterService

2026-04-02T16:12:02,686 DEBUG [RpcServer.default.FPBQ.Fifo.handler=2,queue=0,port=37691] zookeeper.ReadOnlyZKClient(149): Connect 0x2d47cf16 to 127.0.0.1:52768 with session timeout=90000ms, retries=30, retry interval=1000ms, keepAlive=60000ms, zk client config=org.apache.zookeeper.client.ZKClientConfig@1ed98e91

2026-04-02T16:12:02,704 DEBUG [RpcServer.default.FPBQ.Fifo.handler=2,queue=0,port=37691] ipc.AbstractRpcClient(203): Codec=org.apache.hadoop.hbase.codec.KeyValueCodec@1ba273bc, compressor=null, tcpKeepAlive=true, tcpNoDelay=true, connectTO=10000, readTO=20000, writeTO=60000, minIdleTimeBeforeClose=120000, maxRetries=0, fallbackAllowed=false, bind address=null

2026-04-02T16:12:02,708 DEBUG [hconnection-0x495dcb5f-metaLookup-shared--pool-0] ipc.RpcConnection(157): Using SIMPLE authentication for service=ClientService, sasl=false

2026-04-02T16:12:02,712 INFO  [RS-EventLoopGroup-3-2] ipc.ServerRpcConnection(483): Connection from 127.0.0.1:38020, version=2.6.6-SNAPSHOT, sasl=false, ugi=arvindksi274 (auth:SIMPLE), service=ClientService

@NihalJain
Copy link
Copy Markdown
Contributor

NihalJain commented Apr 2, 2026

  • s trying to call reopenTableRegions on the Java HBaseAdmin object. However, while checking the Java source in branch-2.6, the reopenTableRegions method does not exist in Admin.java or AsyncAdmin.java (it only exists in branch-3 and master).

thanks for digging in, do you mind creating a jira to track this? also feel free to fix. in case you plan to pick, its important we figure out exact rca as not sure only why 2.6 is failing, but please do as part of the new jira.

@NihalJain
Copy link
Copy Markdown
Contributor

please let me know if we are good to go here as you mentioned failures are not relevant. also the failure/bug will be tracked with another jira

@liuxiaocs7
Copy link
Copy Markdown
Member

Thanks @arvindKandpal-ksolves for the detailed log, related #7973

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

Thanks @NihalJain and @liuxiaocs7 for the feedback and for pointing out the related PR.

I'll create a new JIRA ticket right away to track the missing reopenTableRegions method in branch-2.6 and will work on the RCA and fix as part of that new issue.

Since we've confirmed that the current TestShell failures are unrelated to my changes in this PR, I'm glad to hear we are good to go here. Thanks again for the support!

@liuxiaocs7
Copy link
Copy Markdown
Member

Thanks @NihalJain and @liuxiaocs7 for the feedback and for pointing out the related PR.感谢你的反馈,也感谢你指出相关的公关问题。

I'll create a new JIRA ticket right away to track the missing reopenTableRegions method in branch-2.6 and will work on the RCA and fix as part of that new issue.我会立刻创建一个新的 JIRA 工单,以追踪 branch-2.6 中缺少的 reopenTableRegions 方法,并会针对 RCA 进行修复,作为新问题的一部分。

Since we've confirmed that the current TestShell failures are unrelated to my changes in this PR, I'm glad to hear we are good to go here. Thanks again for the support!既然我们已经确认当前的 TestShell 故障与我这次 PR 的更改无关,很高兴听到这里一切顺利。再次感谢大家的支持!

Seems we don't need a new Jira, it should be included in HBASE-29950?
Thanks.

…pache#7931)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org>
Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
Reviewed-by: Vaibhav Joshi <vjoshi@cloudera.com>
(cherry picked from commit 2e42e4c)
@NihalJain NihalJain merged commit b6e1898 into apache:branch-2.6 Apr 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a back port of some issue or issues already committed to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants