You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/10 21:17:16 UTC

[GitHub] [hbase] sanjeetnishad95 opened a new pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

sanjeetnishad95 opened a new pull request #2047:
URL: https://github.com/apache/hbase/pull/2047


   …ion state if any region of that table is not open.


----------------------------------------------------------------
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.

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



[GitHub] [hbase] virajjasani commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
virajjasani commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r456896681



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       Sure, handling Exception in `table.jsp` is good idea for this Jira and `compact()` improvement can be in different Jira.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r457371856



##########
File path: hbase-server/src/main/resources/hbase-webapps/master/table.jsp
##########
@@ -655,11 +656,16 @@
       CompactionState compactionState = admin.getCompactionState(table.getName()).get();
       %><%= compactionState %><%
     } catch (Exception e) {
-      // Nothing really to do here
-      for(StackTraceElement element : e.getStackTrace()) {
-        %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
+
+      if(e.getCause().getCause() instanceof NotServingRegionException) {

Review comment:
       yes @virajjasani . I updated the PR.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] virajjasani commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
virajjasani commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r453701827



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       > the patch doesn't aim to fix this, patch is only for `getCompactionState()` and not for `compact()`
   
   If we can fix `compact()` i.e asynchronous compaction to consider waiting for region to come online and then proceed for the table, that will be really great. If we can maintain offline regions of a table, and retry compacting them when they come online, that would be much better.
   If region doesn't come online in some configurable time (~30/60 s), we can fail compaction with proper error message and even indicate how many regions of this table are offline for long time and hence, the request failed.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-660693528


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 37s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 15s |  The patch does not generate ASF License warnings.  |
   |  |   |   3m 17s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | dupname asflicense |
   | uname | Linux 339d30a33fad 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 9b32943697 |
   | Max. process+thread count | 47 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-661033482


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 30s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 13s |  The patch does not generate ASF License warnings.  |
   |  |   |   2m  1s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | dupname asflicense |
   | uname | Linux d7868c4df305 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / f73b9085ad |
   | Max. process+thread count | 48 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] virajjasani closed pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
virajjasani closed pull request #2047:
URL: https://github.com/apache/hbase/pull/2047


   


----------------------------------------------------------------
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.

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



[GitHub] [hbase] virajjasani commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
virajjasani commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r453328220



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       We should not swallow `NotServingRegionException` here. With this patch, we don't complete future call and eventually we will see CompactionState.NONE in UI without proper info on how the request was completed.
   
   We need better way. Just a question: waiting for region to come out of RIT seems valid right? Due to this issue, are we not able to compact the table ever?




----------------------------------------------------------------
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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-656910711


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 51s |  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 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 12s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 46s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   3m 22s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 39s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   1m 35s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m 29s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   3m 12s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 27s |  The patch does not generate ASF License warnings.  |
   |  |   |  39m 46s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 711fac18d86f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 724f0478ed |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-661124800


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 40s |  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 _ |
   | +1 :green_heart: |  mvninstall  |   5m 37s |  master passed  |
   | -0 :warning: |  javadoc  |   0m 55s |  hbase-server in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   5m 29s |  the patch passed  |
   | -0 :warning: |  javadoc  |   0m 54s |  hbase-server in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 140m 43s |  hbase-server in the patch passed.  |
   |  |   | 156m 31s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit |
   | uname | Linux 4ec3ee753ad0 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / f73b9085ad |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/testReport/ |
   | Max. process+thread count | 4268 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r453718395



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       yes, this approach makes more sense. I think it's better to add a new flag for tracking offline regions in RegionInfo as the old `isOffline()` serves other purpose. 




----------------------------------------------------------------
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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-660713800


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   3m 59s |  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 _ |
   | +1 :green_heart: |  mvninstall  |   4m 17s |  master passed  |
   | -0 :warning: |  javadoc  |   0m 43s |  hbase-server in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 56s |  the patch passed  |
   | -0 :warning: |  javadoc  |   0m 40s |  hbase-server in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 132m 58s |  hbase-server in the patch passed.  |
   |  |   | 148m 42s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit |
   | uname | Linux ebc68055f99c 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 9b32943697 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/testReport/ |
   | Max. process+thread count | 4439 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r456268713



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       ok @liuml07 , for this fix, will move the parsing to `table.jsp` . Also, the test case will not be needed so I'll remove that as well.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r453625470



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       @virajjasani , we are completing the future in later part of the code. Previously we had an `isOffline` flag which was used to filter out the regions which were not online but now we are not updating that flag. This patch just provides a workaround to skip those regions while calculating the compactionState of a table. But yes, I agree there won't be proper info on how the request was completed.
   
   > Just a question: waiting for region to come out of RIT seems valid right?
   This issue isn't specifically only in RITscenarios. Even if the user purposely unassigns a region, the future is completed exceptionally. 
   
   > Due to this issue, are we not able to compact the table ever?
   
   Yes future is completed exceptionally and table will not be compacted ever (the patch doesn't aim to fix this, patch is only for `getCompactionState()` and not for `compact()`).
   
   What do you say? How should we proceed?
   




----------------------------------------------------------------
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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-661122935


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 30s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 43s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 24s |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 142m 22s |  hbase-server in the patch passed.  |
   |  |   | 153m 25s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit |
   | uname | Linux d792d05cc6b2 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / f73b9085ad |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/testReport/ |
   | Max. process+thread count | 4095 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-656947208


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   2m  6s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  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 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  7s |  master passed  |
   | +1 :green_heart: |  compile  |   1m 26s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 17s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 11s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 17s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 31s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 36s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m 36s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 52s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m  6s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 17s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 144m  0s |  hbase-server in the patch passed.  |
   |  |   | 177m 35s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux bec908523e63 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 724f0478ed |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/testReport/ |
   | Max. process+thread count | 3916 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r456269065



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       I'll raise a seperate JIRA for `compact()` improvement.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-656955806


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 27s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  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 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 15s |  master passed  |
   | +1 :green_heart: |  compile  |   1m 50s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 57s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 33s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 54s |  hbase-server in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 17s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   5m 27s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 22s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 22s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 30s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 30s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 48s |  hbase-server in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 39s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 188m 12s |  hbase-server in the patch passed.  |
   |  |   | 226m  9s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 6f28776dd765 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 724f0478ed |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/testReport/ |
   | Max. process+thread count | 3130 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] Apache-HBase commented on pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#issuecomment-660720769


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  8s |  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 _ |
   | +1 :green_heart: |  mvninstall  |   4m  5s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 51s |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 35s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 203m 25s |  hbase-server in the patch passed.  |
   |  |   | 215m 29s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2047 |
   | JIRA Issue | HBASE-24714 |
   | Optional Tests | javac javadoc unit |
   | uname | Linux 97ace044828e 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 9b32943697 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/testReport/ |
   | Max. process+thread count | 3036 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-2047/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 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.

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



[GitHub] [hbase] liuml07 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
liuml07 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r456264746



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
##########
@@ -529,4 +529,28 @@ static void loadData(final TableName tableName, final byte[][] families, final i
       puts.clear();
     }
   }
+
+  @Test
+  public void testCompactionState() throws IOException, InterruptedException {
+    TableName tableName = TableName.valueOf("testCompactionState");
+    byte[] family = Bytes.toBytes("CF");
+    TableDescriptor td = TableDescriptorBuilder.newBuilder(tableName)
+      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(family)).build();
+    final Admin admin = TEST_UTIL.getAdmin();
+    if (admin.tableExists(tableName)) {
+      admin.disableTable(tableName);
+      admin.deleteTable(tableName);
+    }
+    admin.createTable(td, new byte[][] { Bytes.toBytes(1) });
+    TEST_UTIL.waitTableAvailable(tableName);
+    TEST_UTIL.waitUntilNoRegionsInTransition(10000);
+    byte[] regionName = admin.getRegions(tableName).get(0).getRegionName();
+    admin.unassign(regionName, true);
+    TEST_UTIL.waitUntilNoRegionsInTransition(10000);
+    try {

Review comment:
       ```
       try {
         admin.getCompactionState(tableName);
       } catch (IOException e) {
         fail("Exception is not excepted.");
       }
   ```
   is the same as
   ```
   admin.getCompactionState(tableName);
   ```
   Tests fails in case of exceptions.

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       Not having all the context, but a quick question is: if the workaround is for the interpret in UI, we can parse exception in `table.jsp`? The `compact()` improvement can be separately tracked.




----------------------------------------------------------------
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.

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



[GitHub] [hbase] virajjasani commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
virajjasani commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r457104953



##########
File path: hbase-server/src/main/resources/hbase-webapps/master/table.jsp
##########
@@ -655,11 +656,16 @@
       CompactionState compactionState = admin.getCompactionState(table.getName()).get();
       %><%= compactionState %><%
     } catch (Exception e) {
-      // Nothing really to do here
-      for(StackTraceElement element : e.getStackTrace()) {
-        %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
+
+      if(e.getCause().getCause() instanceof NotServingRegionException) {

Review comment:
       `if(e.getCause() != null && e.getCause().getCause() instanceof NotServingRegionException)`




----------------------------------------------------------------
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.

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



[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

Posted by GitBox <gi...@apache.org>.
sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r456943199



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       @virajjasani I have updated the PR, resolving this review comment.




----------------------------------------------------------------
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.

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