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/02/25 18:03:00 UTC
[GitHub] [hbase] wchevreuil opened a new pull request #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
wchevreuil opened a new pull request #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207
…nds SecureTestCluster and hbase-server is referred as a jar file.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-590989997
Idea here is that we need to figure out a valid path from resources within the classpath, but that's only possible if we refer a file that's not contained with a jar, so thought of checking for possible existence of a file named "hbase-test-util-dependent" file that extending tests could then define in its classpath.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] joshelser commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
joshelser commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-592291789
Thanks Wellington. Your explanation was super helpful. I like your second fix much much more :)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-591968773
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 32s | 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. |
| +1 :green_heart: | test4tests | 0m 0s | The patch appears to include 2 new or modified test files. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 39s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 5m 22s | master passed |
| +1 :green_heart: | compile | 1m 22s | master passed |
| +1 :green_heart: | checkstyle | 1m 22s | master passed |
| +1 :green_heart: | shadedjars | 4m 43s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 57s | master passed |
| +0 :ok: | spotbugs | 4m 15s | Used deprecated FindBugs config; considering switching to SpotBugs. |
| +1 :green_heart: | findbugs | 4m 52s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 15s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 5m 7s | the patch passed |
| +1 :green_heart: | compile | 1m 21s | the patch passed |
| +1 :green_heart: | javac | 1m 21s | the patch passed |
| +1 :green_heart: | checkstyle | 1m 21s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | shadedjars | 4m 38s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | hadoopcheck | 16m 4s | Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2. |
| +1 :green_heart: | javadoc | 0m 54s | the patch passed |
| +1 :green_heart: | findbugs | 5m 12s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 0m 43s | hbase-http in the patch passed. |
| +1 :green_heart: | unit | 61m 30s | hbase-server in the patch passed. |
| +1 :green_heart: | asflicense | 1m 5s | The patch does not generate ASF License warnings. |
| | | 124m 39s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | Client=19.03.6 Server=19.03.6 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/2/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/1207 |
| Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile |
| uname | Linux 0442caf891be 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1207/out/precommit/personality/provided.sh |
| git revision | master / 3c3aae9a2f |
| Default Java | 1.8.0_181 |
| Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/2/testReport/ |
| Max. process+thread count | 8920 (vs. ulimit of 10000) |
| modules | C: hbase-http hbase-server U: . |
| Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/2/console |
| versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
| 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
With regards,
Apache Git Services
[GitHub] [hbase] wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-591916838
@joshelser , had pushed another commit with alternative solution I had mentioned on my previous comments. Let me know what you think.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-592495742
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 33s | 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. |
| +1 :green_heart: | test4tests | 0m 0s | The patch appears to include 2 new or modified test files. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 36s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 5m 23s | master passed |
| +1 :green_heart: | compile | 1m 22s | master passed |
| +1 :green_heart: | checkstyle | 1m 21s | master passed |
| +1 :green_heart: | shadedjars | 4m 41s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 56s | master passed |
| +0 :ok: | spotbugs | 4m 11s | Used deprecated FindBugs config; considering switching to SpotBugs. |
| +1 :green_heart: | findbugs | 4m 46s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 15s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 5m 5s | the patch passed |
| +1 :green_heart: | compile | 1m 21s | the patch passed |
| +1 :green_heart: | javac | 1m 21s | 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: | shadedjars | 4m 51s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | hadoopcheck | 16m 19s | Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2. |
| +1 :green_heart: | javadoc | 0m 56s | the patch passed |
| +1 :green_heart: | findbugs | 5m 38s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 0m 48s | hbase-http in the patch passed. |
| -1 :x: | unit | 65m 25s | hbase-server in the patch failed. |
| +1 :green_heart: | asflicense | 1m 0s | The patch does not generate ASF License warnings. |
| | | 129m 27s | |
| Reason | Tests |
|-------:|:------|
| Failed junit tests | hadoop.hbase.io.hfile.bucket.TestBucketCache |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | Client=19.03.6 Server=19.03.6 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/3/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/1207 |
| Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile |
| uname | Linux 55df191e0171 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1207/out/precommit/personality/provided.sh |
| git revision | master / 3c3aae9a2f |
| Default Java | 1.8.0_181 |
| unit | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/3/artifact/out/patch-unit-hbase-server.txt |
| Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/3/testReport/ |
| Max. process+thread count | 8545 (vs. ulimit of 10000) |
| modules | C: hbase-http hbase-server U: . |
| Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/3/console |
| versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
| 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
With regards,
Apache Git Services
[GitHub] [hbase] Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-591012955
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 32s | 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. |
| +1 :green_heart: | test4tests | 0m 0s | The patch appears to include 1 new or modified test files. |
||| _ master Compile Tests _ |
| +1 :green_heart: | mvninstall | 5m 33s | master passed |
| +1 :green_heart: | compile | 0m 25s | master passed |
| +1 :green_heart: | checkstyle | 0m 18s | master passed |
| +1 :green_heart: | shadedjars | 4m 39s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 20s | master passed |
| +0 :ok: | spotbugs | 0m 41s | Used deprecated FindBugs config; considering switching to SpotBugs. |
| +1 :green_heart: | findbugs | 0m 38s | master passed |
||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 5m 4s | the patch passed |
| +1 :green_heart: | compile | 0m 23s | the patch passed |
| +1 :green_heart: | javac | 0m 23s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 15s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | shadedjars | 4m 54s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | hadoopcheck | 17m 15s | Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2. |
| +1 :green_heart: | javadoc | 0m 17s | the patch passed |
| +1 :green_heart: | findbugs | 0m 44s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 0m 47s | hbase-http in the patch passed. |
| +1 :green_heart: | asflicense | 0m 13s | The patch does not generate ASF License warnings. |
| | | 49m 5s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | Client=19.03.6 Server=19.03.6 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/1/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/1207 |
| Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile |
| uname | Linux 745ed911f0a4 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1207/out/precommit/personality/provided.sh |
| git revision | master / 3e21dc73de |
| Default Java | 1.8.0_181 |
| Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/1/testReport/ |
| Max. process+thread count | 617 (vs. ulimit of 10000) |
| modules | C: hbase-http U: hbase-http |
| Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1207/1/console |
| versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
| 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
With regards,
Apache Git Services
[GitHub] [hbase] wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
wchevreuil commented on issue #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#issuecomment-591912867
> Can you share the top of the stack-trace -- what your test code calls and how that filters down into the hbase code here?
The test code extends **SecureTestCluster**, so when **SecureTestCluster.setup** runs, it calls **HBaseKerberosUtils.setSSLConfiguration** passing its own class reference [here](https://github.com/apache/hbase/blob/master/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java#L72).
**HBaseKerberosUtils.setSSLConfiguration**, in turn, calls **KeyStoreTestUtil.getClasspathDir** [here](https://github.com/apache/hbase/blob/master/hbase-server/src/test/java/org/apache/hadoop/hbase/security/HBaseKerberosUtils.java#L173). **KeyStoreTestUtil.getClasspathDir** uses the passed class reference name to look for its related resource in the class loader. [This line](https://github.com/apache/hbase/blob/master/hbase-http/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java#L58) returns an URL value as follows, when the passed class reference resource resides on jar file in the class loader (instead of being in a valid local FS path):
`jar:file:/Users/wellingtonchevreuil/.m2/repository/org/apache/hbase/hbase-server/2.2.3./hbase-server-2.2.3-tests.jar!/org/apache/hadoop/hbase/security/token/SecureTestCluster.class`
This causes [subsequent line](https://github.com/apache/hbase/blob/master/hbase-http/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java#L59) calling `url.toURI().getPath()` to return null, then we get the NPE thrown in the following line, and the test errors out:
`java.lang.NullPointerException
at org.apache.hadoop.hbase.http.ssl.KeyStoreTestUtil.getClasspathDir(KeyStoreTestUtil.java:59)
at org.apache.hadoop.hbase.security.HBaseKerberosUtils.setSSLConfiguration(HBaseKerberosUtils.java:173)
at org.apache.hadoop.hbase.security.token.SecureTestCluster.setUp(SecureTestCluster.java:74)
at com.cloudera.hbase.security.token.TestCldrManualDelegationToken.setUp(TestCldrManualDelegationToken.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.lang.Thread.run(Thread.java:748)`
> Can we fix the test-API such that the downstream code has the hook to provide a class which will actually get a classloader from test-classes instead of the jar?
I can think of defining a protected static `Class` instance in **SecureTestCluster** whose default value would be `SecureTestCluster.class`, then pass that **HBaseKerberosUtils.setSSLConfiguration** so that downstream sub-classes of **SecureTestCluster** could override that property with its own values. Let me update this PR with this option.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] wchevreuil merged pull request #1207: HBASE-23892
SecureTestCluster should allow its subclasses to pass their Class reference
on HBaseKerberosUtils.setSSLConfiguration
Posted by GitBox <gi...@apache.org>.
wchevreuil merged pull request #1207: HBASE-23892 SecureTestCluster should allow its subclasses to pass their Class reference on HBaseKerberosUtils.setSSLConfiguration
URL: https://github.com/apache/hbase/pull/1207
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [hbase] joshelser commented on a change in pull request #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
Posted by GitBox <gi...@apache.org>.
joshelser commented on a change in pull request #1207: HBASE-23892 KeyStoreTestUtil.getClasspathDir NPE when running UT exte…
URL: https://github.com/apache/hbase/pull/1207#discussion_r385489082
##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java
##########
@@ -52,6 +52,12 @@
private static String HTTP_PRINCIPAL;
+ //When extending SecureTestCluster on downstream projects that refer SecureTestCluster via
+ //hbase-server jar, we need to provide a way for the implementation to refer to its own class
+ //definition, so that KeyStoreTestUtil.getClasspathDir can resolve a valid path in the local FS
+ //to place required SSL config files.
+ protected static Class testRunner = SecureTestCluster.class;
Review comment:
Make a setter for this as a static method and you have my +1 :)
----------------------------------------------------------------
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
With regards,
Apache Git Services