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/09/03 11:41:20 UTC

[GitHub] [hbase] virajjasani opened a new pull request #2347: HBASE-24979 : Client operation timeout test for batch requests

virajjasani opened a new pull request #2347:
URL: https://github.com/apache/hbase/pull/2347


   


----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  4s |  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 _ |
   | +1 :green_heart: |  mvninstall  |   4m  7s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 11s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   2m 11s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   1m 11s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  12m 22s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   2m 18s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 13s |  The patch does not generate ASF License warnings.  |
   |  |   |  36m  9s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux d79dfd0df0cb 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / a352706700 |
   | Max. process+thread count | 84 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/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] virajjasani commented on a change in pull request #2347: HBASE-24979 : Client operation timeout test for batch requests

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



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
##########
@@ -117,37 +124,78 @@ public static void tearDown() throws Exception {
   }
 
   /**
-   * Tests that a get on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a get on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testGetTimeout() throws Exception {
+  @Test
+  public void testGetTimeout() {
     DELAY_GET = 600;
-    TABLE.get(new Get(ROW));
+    try {
+      TABLE.get(new Get(ROW));
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
   }
 
   /**
-   * Tests that a put on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a put on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testPutTimeout() throws Exception {
+  @Test
+  public void testPutTimeout() {
     DELAY_MUTATE = 600;
-
     Put put = new Put(ROW);
     put.addColumn(FAMILY, QUALIFIER, VALUE);
-    TABLE.put(put);
+    try {
+      TABLE.put(put);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
+  }
+
+  /**
+   * Tests that a batch mutate on a table throws {@link RetriesExhaustedException} when the
+   * operation takes longer than 'hbase.client.operation.timeout'.
+   */
+  @Test
+  public void testMultiPutsTimeout() {
+    DELAY_BATCH_MUTATE = 600;
+    Put put1 = new Put(ROW);
+    put1.addColumn(FAMILY, QUALIFIER, VALUE);
+    Put put2 = new Put(ROW);
+    put2.addColumn(FAMILY, QUALIFIER, VALUE);
+    List<Put> puts = new ArrayList<>();
+    puts.add(put1);
+    puts.add(put2);
+    try {
+      TABLE.batch(puts, new Object[2]);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof RetriesExhaustedException
+          && e.getCause().getCause() instanceof CallTimeoutException);

Review comment:
       Yes, this is also one the reasons why I updated this test. This happens with batch() API only. But again, it's different in each major release.




----------------------------------------------------------------
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] infraio commented on a change in pull request #2347: HBASE-24979 : Client operation timeout test for batch requests

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



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
##########
@@ -117,37 +124,78 @@ public static void tearDown() throws Exception {
   }
 
   /**
-   * Tests that a get on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a get on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testGetTimeout() throws Exception {
+  @Test
+  public void testGetTimeout() {
     DELAY_GET = 600;
-    TABLE.get(new Get(ROW));
+    try {
+      TABLE.get(new Get(ROW));
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
   }
 
   /**
-   * Tests that a put on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a put on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testPutTimeout() throws Exception {
+  @Test
+  public void testPutTimeout() {
     DELAY_MUTATE = 600;
-
     Put put = new Put(ROW);
     put.addColumn(FAMILY, QUALIFIER, VALUE);
-    TABLE.put(put);
+    try {
+      TABLE.put(put);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
+  }
+
+  /**
+   * Tests that a batch mutate on a table throws {@link RetriesExhaustedException} when the
+   * operation takes longer than 'hbase.client.operation.timeout'.
+   */
+  @Test
+  public void testMultiPutsTimeout() {
+    DELAY_BATCH_MUTATE = 600;
+    Put put1 = new Put(ROW);
+    put1.addColumn(FAMILY, QUALIFIER, VALUE);
+    Put put2 = new Put(ROW);
+    put2.addColumn(FAMILY, QUALIFIER, VALUE);
+    List<Put> puts = new ArrayList<>();
+    puts.add(put1);
+    puts.add(put2);
+    try {
+      TABLE.batch(puts, new Object[2]);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof RetriesExhaustedException
+          && e.getCause().getCause() instanceof CallTimeoutException);

Review comment:
       Need to getCause twice, here?




----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :broken_heart: **-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  8s |  master passed  |
   | +1 :green_heart: |  compile  |   0m 57s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 11s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 57s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 57s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 13s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 36s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 205m 39s |  hbase-server in the patch failed.  |
   |  |   | 234m  3s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux cad486aa4935 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 19d0140562 |
   | Default Java | 1.8.0_232 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/testReport/ |
   | Max. process+thread count | 3718 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/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] virajjasani closed pull request #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   


----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 27s |  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  |   3m 59s |  master passed  |
   | +1 :green_heart: |  compile  |   1m  4s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 39s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 44s |  hbase-server in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   4m  5s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m  6s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  6s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 45s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 41s |  hbase-server in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 142m 31s |  hbase-server in the patch passed.  |
   |  |   | 170m  3s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 3507b617f6ed 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 / 19d0140562 |
   | Default Java | 2020-01-14 |
   | javadoc | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/testReport/ |
   | Max. process+thread count | 3942 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 27s |  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 18s |  master passed  |
   | +1 :green_heart: |  compile  |   1m  5s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 39s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 41s |  hbase-server in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 59s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m  4s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  4s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 40s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 43s |  hbase-server in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 129m 52s |  hbase-server in the patch passed.  |
   |  |   | 157m 39s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux ffbc8afd7f4b 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 / a352706700 |
   | Default Java | 2020-01-14 |
   | javadoc | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/testReport/ |
   | Max. process+thread count | 4192 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/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] infraio commented on a change in pull request #2347: HBASE-24979 : Client operation timeout test for batch requests

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



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
##########
@@ -117,37 +124,78 @@ public static void tearDown() throws Exception {
   }
 
   /**
-   * Tests that a get on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a get on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testGetTimeout() throws Exception {
+  @Test
+  public void testGetTimeout() {
     DELAY_GET = 600;
-    TABLE.get(new Get(ROW));
+    try {
+      TABLE.get(new Get(ROW));
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
   }
 
   /**
-   * Tests that a put on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a put on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testPutTimeout() throws Exception {
+  @Test
+  public void testPutTimeout() {
     DELAY_MUTATE = 600;
-
     Put put = new Put(ROW);
     put.addColumn(FAMILY, QUALIFIER, VALUE);
-    TABLE.put(put);
+    try {
+      TABLE.put(put);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
+  }
+
+  /**
+   * Tests that a batch mutate on a table throws {@link RetriesExhaustedException} when the
+   * operation takes longer than 'hbase.client.operation.timeout'.
+   */
+  @Test
+  public void testMultiPutsTimeout() {
+    DELAY_BATCH_MUTATE = 600;
+    Put put1 = new Put(ROW);
+    put1.addColumn(FAMILY, QUALIFIER, VALUE);
+    Put put2 = new Put(ROW);
+    put2.addColumn(FAMILY, QUALIFIER, VALUE);
+    List<Put> puts = new ArrayList<>();
+    puts.add(put1);
+    puts.add(put2);
+    try {
+      TABLE.batch(puts, new Object[2]);
+      throw new AssertionError("should not reach here");

Review comment:
       use fail("should not reach here"); ?




----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
##########
@@ -117,37 +124,78 @@ public static void tearDown() throws Exception {
   }
 
   /**
-   * Tests that a get on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a get on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testGetTimeout() throws Exception {
+  @Test
+  public void testGetTimeout() {
     DELAY_GET = 600;
-    TABLE.get(new Get(ROW));
+    try {
+      TABLE.get(new Get(ROW));
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
   }
 
   /**
-   * Tests that a put on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a put on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testPutTimeout() throws Exception {
+  @Test
+  public void testPutTimeout() {
     DELAY_MUTATE = 600;
-
     Put put = new Put(ROW);
     put.addColumn(FAMILY, QUALIFIER, VALUE);
-    TABLE.put(put);
+    try {
+      TABLE.put(put);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
+  }
+
+  /**
+   * Tests that a batch mutate on a table throws {@link RetriesExhaustedException} when the
+   * operation takes longer than 'hbase.client.operation.timeout'.
+   */
+  @Test
+  public void testMultiPutsTimeout() {
+    DELAY_BATCH_MUTATE = 600;
+    Put put1 = new Put(ROW);
+    put1.addColumn(FAMILY, QUALIFIER, VALUE);
+    Put put2 = new Put(ROW);
+    put2.addColumn(FAMILY, QUALIFIER, VALUE);
+    List<Put> puts = new ArrayList<>();
+    puts.add(put1);
+    puts.add(put2);
+    try {
+      TABLE.batch(puts, new Object[2]);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof RetriesExhaustedException
+          && e.getCause().getCause() instanceof CallTimeoutException);

Review comment:
       Yes, this is also one the reasons why I updated this test. This happens with batch() calls. But again, it's different in each major release.




----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestClientOperationTimeout.java
##########
@@ -117,37 +124,78 @@ public static void tearDown() throws Exception {
   }
 
   /**
-   * Tests that a get on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a get on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testGetTimeout() throws Exception {
+  @Test
+  public void testGetTimeout() {
     DELAY_GET = 600;
-    TABLE.get(new Get(ROW));
+    try {
+      TABLE.get(new Get(ROW));
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
   }
 
   /**
-   * Tests that a put on a table throws {@link SocketTimeoutException} when the operation takes
+   * Tests that a put on a table throws {@link RetriesExhaustedException} when the operation takes
    * longer than 'hbase.client.operation.timeout'.
    */
-  @Test(expected = RetriesExhaustedException.class)
-  public void testPutTimeout() throws Exception {
+  @Test
+  public void testPutTimeout() {
     DELAY_MUTATE = 600;
-
     Put put = new Put(ROW);
     put.addColumn(FAMILY, QUALIFIER, VALUE);
-    TABLE.put(put);
+    try {
+      TABLE.put(put);
+      throw new AssertionError("should not reach here");
+    } catch (Exception e) {
+      Assert.assertTrue(
+        e instanceof RetriesExhaustedException && e.getCause() instanceof CallTimeoutException);
+    }
+  }
+
+  /**
+   * Tests that a batch mutate on a table throws {@link RetriesExhaustedException} when the
+   * operation takes longer than 'hbase.client.operation.timeout'.
+   */
+  @Test
+  public void testMultiPutsTimeout() {
+    DELAY_BATCH_MUTATE = 600;
+    Put put1 = new Put(ROW);
+    put1.addColumn(FAMILY, QUALIFIER, VALUE);
+    Put put2 = new Put(ROW);
+    put2.addColumn(FAMILY, QUALIFIER, VALUE);
+    List<Put> puts = new ArrayList<>();
+    puts.add(put1);
+    puts.add(put2);
+    try {
+      TABLE.batch(puts, new Object[2]);
+      throw new AssertionError("should not reach here");

Review comment:
       Sure, let me do it.




----------------------------------------------------------------
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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 27s |  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  |   3m 45s |  master passed  |
   | +1 :green_heart: |  compile  |   0m 55s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 30s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   3m 25s |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 57s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 57s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 35s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   0m 35s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 140m 14s |  hbase-server in the patch passed.  |
   |  |   | 166m  0s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 9c2f25971427 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / a352706700 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/1/testReport/ |
   | Max. process+thread count | 4580 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/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 #2347: HBASE-24979 : Client operation timeout test for batch requests

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   2m  1s |  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 _ |
   | +1 :green_heart: |  mvninstall  |   5m  0s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 22s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   2m 37s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   4m 38s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   1m 20s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  12m 34s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 13s |  The patch does not generate ASF License warnings.  |
   |  |   |  40m 27s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2347 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 1a3ae51d6400 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 19d0140562 |
   | Max. process+thread count | 84 (vs. ulimit of 12500) |
   | modules | C: hbase-server U: hbase-server |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2347/2/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