[jira] [Commented] (HBASE-27819) 10k RpcServer.MAX_REQUEST_SIZE is not enough in ReplicationDroppedTable related tests

2023-05-01 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-27819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17718430#comment-17718430
 ] 

Hudson commented on HBASE-27819:


Results for branch branch-2.4
[build #553 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/]:
 (/) *{color:green}+1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/General_20Nightly_20Build_20Report/]


(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> 10k RpcServer.MAX_REQUEST_SIZE is not enough in ReplicationDroppedTable 
> related tests
> -
>
> Key: HBASE-27819
> URL: https://issues.apache.org/jira/browse/HBASE-27819
> Project: HBase
>  Issue Type: Improvement
>  Components: test
>Reporter: Duo Zhang
>Assignee: Duo Zhang
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> The request size for regionServerReport is greater than 10k, so it will 
> generate a lot of error messages and slow down the test, and also may fail 
> the test.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (HBASE-27810) HBCK throws RejectedExecutionException when closing ZooKeeper resources

2023-05-01 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-27810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17718432#comment-17718432
 ] 

Hudson commented on HBASE-27810:


Results for branch branch-2.4
[build #553 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/]:
 (/) *{color:green}+1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/General_20Nightly_20Build_20Report/]


(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> HBCK throws RejectedExecutionException when closing ZooKeeper resources
> ---
>
> Key: HBASE-27810
> URL: https://issues.apache.org/jira/browse/HBASE-27810
> Project: HBase
>  Issue Type: Bug
>  Components: hbck
>Affects Versions: 2.6.0, 3.0.0-alpha-3, 2.4.17, 2.5.4
>Reporter: Andor Molnar
>Assignee: Andor Molnar
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> HBCK throws RejectedExecutionException at the end of run, because the order 
> of closing ZooKeeper resources has been swapped in HBASE-27426.
> In ZKWatcher.java close() method first it shuts down the zkEventProcessor and 
> when it fully shut down, it closes the RecoverableZooKeeper (the ZK client). 
> The watcher receives the close event which cannot be submitted to the event 
> processor and throws exception.
> I think we need to check whether the executor is able to receive jobs before 
> submitting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (HBASE-27762) Include EventType and ProcedureV2 pid in logging via MDC

2023-05-01 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-27762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17718431#comment-17718431
 ] 

Hudson commented on HBASE-27762:


Results for branch branch-2.4
[build #553 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/]:
 (/) *{color:green}+1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/General_20Nightly_20Build_20Report/]


(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/553/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Include EventType and ProcedureV2 pid in logging via MDC
> 
>
> Key: HBASE-27762
> URL: https://issues.apache.org/jira/browse/HBASE-27762
> Project: HBase
>  Issue Type: Task
>Affects Versions: 2.6.0, 3.0.0-alpha-4, 2.5.3, 2.4.17
>Reporter: Nick Dimiduk
>Assignee: Nick Dimiduk
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> Tracing the distributed actions of ProcedureV2 {{RemoteProcedure}} execution 
> is painful. We are pretty good about logging the {{proc_id}} most of the 
> time, but we don't catch them all. Now that we're up on log4j2, let's use the 
> MDC feature to include some basic information universally.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] Apache-HBase commented on pull request #5171: HBASE-27788 Skip family comparing when compare cells inner the store

2023-05-01 Thread via GitHub


Apache-HBase commented on PR #5171:
URL: https://github.com/apache/hbase/pull/5171#issuecomment-1530803203

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |::|--:|:|:|
   | +0 :ok: |  reexec  |   1m  0s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files 
found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any 
anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any 
@author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 10s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 50s |  master passed  |
   | +1 :green_heart: |  compile  |   3m  7s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 49s |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 43s |  branch has no errors when 
running spotless:check.  |
   | +1 :green_heart: |  spotbugs  |   2m 10s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 10s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 36s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  2s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  2s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 48s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace 
issues.  |
   | +1 :green_heart: |  hadoopcheck  |  13m  1s |  Patch does not cause any 
errors with Hadoop 3.2.4 3.3.4.  |
   | +1 :green_heart: |  spotless  |   0m 42s |  patch has no errors when 
running spotless:check.  |
   | +1 :green_heart: |  spotbugs  |   2m 15s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 20s |  The patch does not generate 
ASF License warnings.  |
   |  |   |  43m 18s |   |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.42 ServerAPI=1.42 base: 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5171/18/artifact/yetus-general-check/output/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hbase/pull/5171 |
   | Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti 
spotless checkstyle compile |
   | uname | Linux 8457a4f9a2ea 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 
14:49:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 21d61cfa1c |
   | Default Java | Eclipse Adoptium-11.0.17+8 |
   | Max. process+thread count | 86 (vs. ulimit of 3) |
   | modules | C: hbase-common hbase-server U: . |
   | Console output | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5171/18/console
 |
   | versions | git=2.34.1 maven=3.8.6 spotbugs=4.7.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (HBASE-27788) Skip family comparing when compare cells inner the store

2023-05-01 Thread Zheng Wang (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zheng Wang updated HBASE-27788:
---
Attachment: BenchmarkForInnerStore.java
BenchmarkForNormal.java

> Skip family comparing when compare cells inner the store
> 
>
> Key: HBASE-27788
> URL: https://issues.apache.org/jira/browse/HBASE-27788
> Project: HBase
>  Issue Type: Improvement
>  Components: Performance
>Reporter: Zheng Wang
>Assignee: Zheng Wang
>Priority: Major
> Attachments: BenchmarkForInnerStore.java, BenchmarkForNormal.java
>
>
> Currently we use CellComparatorImpl to compare cells, it compare row first, 
> then family, then qulifier and so on.
> If the comparing inner the store, the families are always equal(unless the 
> familyLength is zero for special purpose), so this step could be skipped for 
> better performance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] bsglz commented on a diff in pull request #5171: HBASE-27788 Skip family comparing when compare cells inner the store

2023-05-01 Thread via GitHub


bsglz commented on code in PR #5171:
URL: https://github.com/apache/hbase/pull/5171#discussion_r1182008415


##
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java:
##
@@ -121,7 +122,8 @@ public class FixedFileTrailer {
* Raw key comparator class name in version 3
*/
   // We could write the actual class name from 2.0 onwards and handle BC
-  private String comparatorClassName = 
CellComparator.getInstance().getClass().getName();
+  private String comparatorClassName =

Review Comment:
   > No compatibility issues?
   
   Thought about it and i think so, because we do the conversion when we save 
and read the hfile, the actual store is the KVComparator, we can't change this 
since we want hbase1.x to be able to read the files generated in the new 
version. See the comment of getHBase1CompatibleName for more detail.
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] bsglz commented on a diff in pull request #5171: HBASE-27788 Skip family comparing when compare cells inner the store

2023-05-01 Thread via GitHub


bsglz commented on code in PR #5171:
URL: https://github.com/apache/hbase/pull/5171#discussion_r1182008415


##
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java:
##
@@ -121,7 +122,8 @@ public class FixedFileTrailer {
* Raw key comparator class name in version 3
*/
   // We could write the actual class name from 2.0 onwards and handle BC
-  private String comparatorClassName = 
CellComparator.getInstance().getClass().getName();
+  private String comparatorClassName =

Review Comment:
   > No compatibility issues?
   
   Thought about it and i think so, because we do the conversion when we save 
and read the hfile, the actual store is the KVComparator, we can't change this 
since we want hbase1.x to be able to read the files generated in the new 
version.
   Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] bsglz commented on a diff in pull request #5171: HBASE-27788 Skip family comparing when compare cells inner the store

2023-05-01 Thread via GitHub


bsglz commented on code in PR #5171:
URL: https://github.com/apache/hbase/pull/5171#discussion_r1182005833


##
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/PerfTestCellComparator.java:
##
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.apache.hadoop.hbase.ByteBufferKeyValue;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellComparator;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.InnerStoreCellComparator;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+/**
+ * This is not a unit test. It is not run as part of the general unit test 
suite. It is for
+ * comparing cell comparators. You must run it explicitly; e.g. mvn test
+ * -Dtest=PerfTestCellComparator
+ */
+@Category({ MediumTests.class })
+@RunWith(Parameterized.class)
+public class PerfTestCellComparator {

Review Comment:
   OK.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #5202: HBASE-27109 Move replication queue storage from zookeeper to a separated HBase table

2023-05-01 Thread via GitHub


Apache-HBase commented on PR #5202:
URL: https://github.com/apache/hbase/pull/5202#issuecomment-1530543579

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |::|--:|:|:|
   | +0 :ok: |  reexec  |   0m 37s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): 
--brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list 
--whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 41s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 44s |  master passed  |
   | +1 :green_heart: |  compile  |   1m 54s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 23s |  branch has no errors when 
building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 55s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 55s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 11s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 11s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 33s |  patch has no errors when 
building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 47s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 426m 20s |  root in the patch failed.  |
   |  |   | 463m 42s |   |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.42 ServerAPI=1.42 base: 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hbase/pull/5202 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 8e6ac25f68e4 5.4.0-1094-aws #102~18.04.1-Ubuntu SMP Tue Jan 
10 21:07:03 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 21d61cfa1c |
   | Default Java | Temurin-1.8.0_352-b08 |
   | unit | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
 |
   |  Test Results | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/testReport/
 |
   | Max. process+thread count | 2469 (vs. ulimit of 3) |
   | modules | C: hbase-protocol-shaded hbase-client hbase-replication 
hbase-procedure hbase-server . U: . |
   | Console output | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/console 
|
   | versions | git=2.34.1 maven=3.8.6 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #5202: HBASE-27109 Move replication queue storage from zookeeper to a separated HBase table

2023-05-01 Thread via GitHub


Apache-HBase commented on PR #5202:
URL: https://github.com/apache/hbase/pull/5202#issuecomment-1530347403

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |::|--:|:|:|
   | +0 :ok: |  reexec  |   0m 31s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): 
--brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list 
--whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 45s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 40s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 13s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m  9s |  branch has no errors when 
building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 44s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 17s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 44s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m  8s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m  8s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 43s |  patch has no errors when 
building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 49s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 325m  9s |  root in the patch failed.  |
   |  |   | 367m 24s |   |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.42 ServerAPI=1.42 base: 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hbase/pull/5202 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux a91df31d193c 5.4.0-1094-aws #102~18.04.1-Ubuntu SMP Tue Jan 
10 21:07:03 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 21d61cfa1c |
   | Default Java | Eclipse Adoptium-11.0.17+8 |
   | unit | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
 |
   |  Test Results | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/testReport/
 |
   | Max. process+thread count | 2699 (vs. ulimit of 3) |
   | modules | C: hbase-protocol-shaded hbase-client hbase-replication 
hbase-procedure hbase-server . U: . |
   | Console output | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/console 
|
   | versions | git=2.34.1 maven=3.8.6 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (HBASE-27109) Move replication queue storage from zookeeper to a separated HBase table

2023-05-01 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-27109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17718316#comment-17718316
 ] 

Hudson commented on HBASE-27109:


Results for branch HBASE-27109/table_based_rqs
[build #68 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/HBASE-27109%252Ftable_based_rqs/68/]:
 (/) *{color:green}+1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/HBASE-27109%252Ftable_based_rqs/68/General_20Nightly_20Build_20Report/]




(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/HBASE-27109%252Ftable_based_rqs/68/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/HBASE-27109%252Ftable_based_rqs/68/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Move replication queue storage from zookeeper to a separated HBase table
> 
>
> Key: HBASE-27109
> URL: https://issues.apache.org/jira/browse/HBASE-27109
> Project: HBase
>  Issue Type: New Feature
>  Components: Replication
>Reporter: Duo Zhang
>Assignee: Duo Zhang
>Priority: Major
>
> This is a more specific issue based on the works which are already done in 
> HBASE-15867.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] Apache-HBase commented on pull request #5202: HBASE-27109 Move replication queue storage from zookeeper to a separated HBase table

2023-05-01 Thread via GitHub


Apache-HBase commented on PR #5202:
URL: https://github.com/apache/hbase/pull/5202#issuecomment-1529944888

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |::|--:|:|:|
   | +0 :ok: |  reexec  |   0m 32s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files 
found.  |
   | +0 :ok: |  shelldocs  |   0m  1s |  Shelldocs was not available.  |
   | +0 :ok: |  prototool  |   0m  0s |  prototool was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any 
anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any 
@author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 26s |  master passed  |
   | +1 :green_heart: |  compile  |   6m 34s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 24s |  master passed  |
   | +1 :green_heart: |  spotless  |   0m 47s |  branch has no errors when 
running spotless:check.  |
   | +1 :green_heart: |  spotbugs  |  13m  9s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 16s |  the patch passed  |
   | +1 :green_heart: |  compile  |   4m 45s |  the patch passed  |
   | +1 :green_heart: |  cc  |   4m 45s |  the patch passed  |
   | -0 :warning: |  javac  |   4m 45s |  root generated 9 new + 899 unchanged 
- 11 fixed = 908 total (was 910)  |
   | -0 :warning: |  checkstyle  |   1m  5s |  root: The patch generated 6 new 
+ 70 unchanged - 1 fixed = 76 total (was 71)  |
   | +1 :green_heart: |  shellcheck  |   0m  1s |  There were no new shellcheck 
issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace 
issues.  |
   | +1 :green_heart: |  xml  |   0m  4s |  The patch has no ill-formed XML 
file.  |
   | +1 :green_heart: |  hadoopcheck  |  12m 22s |  Patch does not cause any 
errors with Hadoop 3.2.4 3.3.4.  |
   | +1 :green_heart: |  hbaseprotoc  |   4m 43s |  the patch passed  |
   | +1 :green_heart: |  spotless  |   0m 41s |  patch has no errors when 
running spotless:check.  |
   | +1 :green_heart: |  spotbugs  |  13m  6s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 58s |  The patch does not generate 
ASF License warnings.  |
   |  |   |  78m 32s |   |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.42 ServerAPI=1.42 base: 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-general-check/output/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hbase/pull/5202 |
   | Optional Tests | dupname asflicense spotless shellcheck shelldocs javac 
spotbugs hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool xml |
   | uname | Linux c00477c461f2 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 
17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 21d61cfa1c |
   | Default Java | Eclipse Adoptium-11.0.17+8 |
   | javac | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-general-check/output/diff-compile-javac-root.txt
 |
   | checkstyle | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/artifact/yetus-general-check/output/diff-checkstyle-root.txt
 |
   | Max. process+thread count | 177 (vs. ulimit of 3) |
   | modules | C: hbase-protocol-shaded hbase-client hbase-replication 
hbase-procedure hbase-server . U: . |
   | Console output | 
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5202/6/console 
|
   | versions | git=2.34.1 maven=3.8.6 shellcheck=0.8.0 spotbugs=4.7.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (HBASE-27810) HBCK throws RejectedExecutionException when closing ZooKeeper resources

2023-05-01 Thread Rajeshbabu Chintaguntla (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla resolved HBASE-27810.
-
Resolution: Fixed

Pushed to branch-2.4+

Thanks [~andor]  for the patch.

> HBCK throws RejectedExecutionException when closing ZooKeeper resources
> ---
>
> Key: HBASE-27810
> URL: https://issues.apache.org/jira/browse/HBASE-27810
> Project: HBase
>  Issue Type: Bug
>  Components: hbck
>Affects Versions: 2.6.0, 3.0.0-alpha-3, 2.4.17, 2.5.4
>Reporter: Andor Molnar
>Assignee: Andor Molnar
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> HBCK throws RejectedExecutionException at the end of run, because the order 
> of closing ZooKeeper resources has been swapped in HBASE-27426.
> In ZKWatcher.java close() method first it shuts down the zkEventProcessor and 
> when it fully shut down, it closes the RecoverableZooKeeper (the ZK client). 
> The watcher receives the close event which cannot be submitted to the event 
> processor and throws exception.
> I think we need to check whether the executor is able to receive jobs before 
> submitting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (HBASE-27810) HBCK throws RejectedExecutionException when closing ZooKeeper resources

2023-05-01 Thread Rajeshbabu Chintaguntla (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated HBASE-27810:

Fix Version/s: 2.4.18

> HBCK throws RejectedExecutionException when closing ZooKeeper resources
> ---
>
> Key: HBASE-27810
> URL: https://issues.apache.org/jira/browse/HBASE-27810
> Project: HBase
>  Issue Type: Bug
>  Components: hbck
>Affects Versions: 2.6.0, 3.0.0-alpha-3, 2.4.17, 2.5.4
>Reporter: Andor Molnar
>Assignee: Andor Molnar
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> HBCK throws RejectedExecutionException at the end of run, because the order 
> of closing ZooKeeper resources has been swapped in HBASE-27426.
> In ZKWatcher.java close() method first it shuts down the zkEventProcessor and 
> when it fully shut down, it closes the RecoverableZooKeeper (the ZK client). 
> The watcher receives the close event which cannot be submitted to the event 
> processor and throws exception.
> I think we need to check whether the executor is able to receive jobs before 
> submitting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] chrajeshbabu merged pull request #5212: HBASE-27810 HBCK throws RejectedExecutionException when closing ZooKeeper resources (branch-2.4)

2023-05-01 Thread via GitHub


chrajeshbabu merged PR #5212:
URL: https://github.com/apache/hbase/pull/5212


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (HBASE-27762) Include EventType and ProcedureV2 pid in logging via MDC

2023-05-01 Thread Nick Dimiduk (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Dimiduk updated HBASE-27762:
-
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> Include EventType and ProcedureV2 pid in logging via MDC
> 
>
> Key: HBASE-27762
> URL: https://issues.apache.org/jira/browse/HBASE-27762
> Project: HBase
>  Issue Type: Task
>Affects Versions: 2.6.0, 3.0.0-alpha-4, 2.5.3, 2.4.17
>Reporter: Nick Dimiduk
>Assignee: Nick Dimiduk
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> Tracing the distributed actions of ProcedureV2 {{RemoteProcedure}} execution 
> is painful. We are pretty good about logging the {{proc_id}} most of the 
> time, but we don't catch them all. Now that we're up on log4j2, let's use the 
> MDC feature to include some basic information universally.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (HBASE-27762) Include EventType and ProcedureV2 pid in logging via MDC

2023-05-01 Thread Nick Dimiduk (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Dimiduk updated HBASE-27762:
-
Fix Version/s: 2.6.0
   2.5.5
   2.4.18

> Include EventType and ProcedureV2 pid in logging via MDC
> 
>
> Key: HBASE-27762
> URL: https://issues.apache.org/jira/browse/HBASE-27762
> Project: HBase
>  Issue Type: Task
>Affects Versions: 2.6.0, 3.0.0-alpha-4, 2.5.3, 2.4.17
>Reporter: Nick Dimiduk
>Assignee: Nick Dimiduk
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> Tracing the distributed actions of ProcedureV2 {{RemoteProcedure}} execution 
> is painful. We are pretty good about logging the {{proc_id}} most of the 
> time, but we don't catch them all. Now that we're up on log4j2, let's use the 
> MDC feature to include some basic information universally.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] ndimiduk merged pull request #5187: Backport "HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC (#5145)" to branch-2.4

2023-05-01 Thread via GitHub


ndimiduk merged PR #5187:
URL: https://github.com/apache/hbase/pull/5187


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] ndimiduk merged pull request #5186: Backport "HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC (#5145)" to branch-2.5

2023-05-01 Thread via GitHub


ndimiduk merged PR #5186:
URL: https://github.com/apache/hbase/pull/5186


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] ndimiduk merged pull request #5185: Backport "HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC (#5145)" to branch-2

2023-05-01 Thread via GitHub


ndimiduk merged PR #5185:
URL: https://github.com/apache/hbase/pull/5185


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] Apache9 commented on a diff in pull request #5171: HBASE-27788 Skip family comparing when compare cells inner the store

2023-05-01 Thread via GitHub


Apache9 commented on code in PR #5171:
URL: https://github.com/apache/hbase/pull/5171#discussion_r1181632693


##
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/PerfTestCellComparator.java:
##
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.apache.hadoop.hbase.ByteBufferKeyValue;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellComparator;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.InnerStoreCellComparator;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+/**
+ * This is not a unit test. It is not run as part of the general unit test 
suite. It is for
+ * comparing cell comparators. You must run it explicitly; e.g. mvn test
+ * -Dtest=PerfTestCellComparator
+ */
+@Category({ MediumTests.class })
+@RunWith(Parameterized.class)
+public class PerfTestCellComparator {

Review Comment:
   I think we'd better just post the JMH code on the jira issue? Without JMH, a 
micro bench is not very stable...



##
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java:
##
@@ -121,7 +122,8 @@ public class FixedFileTrailer {
* Raw key comparator class name in version 3
*/
   // We could write the actual class name from 2.0 onwards and handle BC
-  private String comparatorClassName = 
CellComparator.getInstance().getClass().getName();
+  private String comparatorClassName =

Review Comment:
   No compatibility issues?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (HBASE-27819) 10k RpcServer.MAX_REQUEST_SIZE is not enough in ReplicationDroppedTable related tests

2023-05-01 Thread Duo Zhang (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-27819.
---
Fix Version/s: 2.6.0
   3.0.0-alpha-4
   2.5.5
   2.4.18
 Hadoop Flags: Reviewed
 Assignee: Duo Zhang
   Resolution: Fixed

Pushed to branch-2.4+.

Thanks [~heliangjun] for reviewing!

> 10k RpcServer.MAX_REQUEST_SIZE is not enough in ReplicationDroppedTable 
> related tests
> -
>
> Key: HBASE-27819
> URL: https://issues.apache.org/jira/browse/HBASE-27819
> Project: HBase
>  Issue Type: Improvement
>  Components: test
>Reporter: Duo Zhang
>Assignee: Duo Zhang
>Priority: Major
> Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5, 2.4.18
>
>
> The request size for regionServerReport is greater than 10k, so it will 
> generate a lot of error messages and slow down the test, and also may fail 
> the test.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [hbase] Apache9 merged pull request #5208: HBASE-27819 10k RpcServer.MAX_REQUEST_SIZE is not enough in Replicati…

2023-05-01 Thread via GitHub


Apache9 merged PR #5208:
URL: https://github.com/apache/hbase/pull/5208


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] bbeaudreault commented on a diff in pull request #5192: HBASE-27799: RpcThrottlingException wait interval message is misleading between 0-1s

2023-05-01 Thread via GitHub


bbeaudreault commented on code in PR #5192:
URL: https://github.com/apache/hbase/pull/5192#discussion_r1181563492


##
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/RpcThrottlingException.java:
##
@@ -130,29 +129,55 @@ public static void throwWriteCapacityUnitExceeded(final 
long waitInterval)
 
   private static void throwThrottlingException(final Type type, final long 
waitInterval)
 throws RpcThrottlingException {
-String msg = MSG_TYPE[type.ordinal()] + MSG_WAIT + 
StringUtils.formatTime(waitInterval);
+String msg = MSG_TYPE[type.ordinal()] + MSG_WAIT + 
stringFromMillis(waitInterval);
 throw new RpcThrottlingException(type, waitInterval, msg);
   }
 
-  private static long timeFromString(String timeDiff) {
-Pattern[] patterns = new Pattern[] { 
Pattern.compile("^(\\d+\\.\\d\\d)sec"),
-  Pattern.compile("^(\\d+)mins, (\\d+\\.\\d\\d)sec"),
-  Pattern.compile("^(\\d+)hrs, (\\d+)mins, (\\d+\\.\\d\\d)sec") };
+  // Visible for TestRpcThrottlingException
+  protected static String stringFromMillis(long millis) {
+StringBuilder buf = new StringBuilder();
+long hours = millis / (60 * 60 * 1000);
+long rem = (millis % (60 * 60 * 1000));
+long minutes = rem / (60 * 1000);
+rem = rem % (60 * 1000);
+long seconds = rem / 1000;
+long milliseconds = rem % 1000;
 
-for (int i = 0; i < patterns.length; ++i) {
-  Matcher m = patterns[i].matcher(timeDiff);
-  if (m.find()) {
-long time = Math.round(Float.parseFloat(m.group(1 + i)) * 1000);
-if (i > 0) {
-  time += Long.parseLong(m.group(i)) * (60 * 1000);
-}
-if (i > 1) {
-  time += Long.parseLong(m.group(i - 1)) * (60 * 60 * 1000);
+if (hours != 0) {
+  buf.append(hours);
+  buf.append("hrs, ");

Review Comment:
   Since we have our own formatted here now, can you appease my perfectionism 
and only add the s to these if > 1? In terms of parsing you'll just add `?` 
after each s in the regex. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hbase] bbeaudreault commented on a diff in pull request #5192: HBASE-27799: RpcThrottlingException wait interval message is misleading between 0-1s

2023-05-01 Thread via GitHub


bbeaudreault commented on code in PR #5192:
URL: https://github.com/apache/hbase/pull/5192#discussion_r1181557849


##
hbase-client/src/test/java/org/apache/hadoop/hbase/quotas/TestRpcThrottlingException.java:
##
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.quotas;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category({ SmallTests.class })
+public class TestRpcThrottlingException {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+HBaseClassTestRule.forClass(TestRpcThrottlingException.class);
+
+  @Test
+  public void itHandlesSecWaitIntervalMessage() {
+try {
+  RpcThrottlingException.throwNumReadRequestsExceeded(1001);
+  fail();
+} catch (RpcThrottlingException e) {
+  assertTrue(e.getMessage().contains("wait 1sec, 1ms"));
+}
+  }
+
+  @Test
+  public void itHandlesMsWaitIntervalMessage() {
+try {
+  RpcThrottlingException.throwNumReadRequestsExceeded(50);
+  fail();
+} catch (RpcThrottlingException e) {
+  assertTrue(e.getMessage().contains("wait 50ms"));
+}
+  }
+
+  @Test
+  public void itHandlesMinWaitIntervalMessage() {
+try {
+  RpcThrottlingException.throwNumReadRequestsExceeded(65_015);
+  fail();
+} catch (RpcThrottlingException e) {
+  assertTrue(e.getMessage().contains("wait 1mins, 5sec, 15ms"));
+}
+  }
+
+  @Test
+  public void itConvertsMillisToString() {
+String output = RpcThrottlingException.stringFromMillis(6500);
+assertEquals("6sec, 500ms", output);
+  }
+
+  @Test
+  public void itConvertsStringToMillis() {
+long millis = RpcThrottlingException.timeFromString("5mins, 2sec, 0ms");

Review Comment:
   can you make a few more tests? sorry.  TBH I might just use test inputs like 
this to keep it simple:
   
   ```
   // new format
   "1hrs, 1mins, 1sec, 1ms"
   "1mins, 1sec, 1ms"
   "1sec, 1ms"
   "1ms"
   // legacy format
   "1hrs, 1mins, 1sec"
   "1mins, 1sec"
   "1sec"
   ```
   
   This way we can be sure we're actually parsing the values correctly -- in 
this test i commented on, using 0ms proves that the match works but doesn't 
prove that the parsing of value actually works since the value is 0.



##
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/RpcThrottlingException.java:
##
@@ -130,29 +129,55 @@ public static void throwWriteCapacityUnitExceeded(final 
long waitInterval)
 
   private static void throwThrottlingException(final Type type, final long 
waitInterval)
 throws RpcThrottlingException {
-String msg = MSG_TYPE[type.ordinal()] + MSG_WAIT + 
StringUtils.formatTime(waitInterval);
+String msg = MSG_TYPE[type.ordinal()] + MSG_WAIT + 
stringFromMillis(waitInterval);
 throw new RpcThrottlingException(type, waitInterval, msg);
   }
 
-  private static long timeFromString(String timeDiff) {
-Pattern[] patterns = new Pattern[] { 
Pattern.compile("^(\\d+\\.\\d\\d)sec"),
-  Pattern.compile("^(\\d+)mins, (\\d+\\.\\d\\d)sec"),
-  Pattern.compile("^(\\d+)hrs, (\\d+)mins, (\\d+\\.\\d\\d)sec") };
+  // Visible for TestRpcThrottlingException
+  protected static String stringFromMillis(long millis) {
+StringBuilder buf = new StringBuilder();
+long hours = millis / (60 * 60 * 1000);
+long rem = (millis % (60 * 60 * 1000));
+long minutes = rem / (60 * 1000);
+rem = rem % (60 * 1000);
+long seconds = rem / 1000;
+long milliseconds = rem % 1000;
 
-for (int i = 0; i < patterns.length; ++i) {
-  Matcher m = patterns[i].matcher(timeDiff);
-  if (m.find()) {
-long time = Math.round(Float.parseFloat(m.group(1 + i)) * 1000);
-if (i > 0) {
-  time += Long.parseLong(m.group(i)) * (60 * 1000);
-}
-if (i > 1) {
-  time += Long.parseLong(m.group(i - 1)) * (60 * 60 * 1000);
+if (hours != 0) {
+