Mike Percy has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12147 )
Change subject: java: KuduBinaryExtractor should use the thread context classloader ...................................................................... java: KuduBinaryExtractor should use the thread context classloader Using the thread context classloader makes it straightforward to write end-to-end tests, one of which is included in this patch. This patch makes the following changes: 1. The KuduBinaryExtractor will now search for the test binary jars via the thread context classloader, if available. 2. Remove the work-in-progress OS-detection implementation from KuduBinaryExtractor (to be replaced in a future commit) because it was failing tests. 3. KuduBinaryExtractor will no longer cache its search results to make it more straightforward to use a thread local context classloader. 4. KuduBinaryExtractor.extractKuduBinary() now throws FileNotFoundException instead of IllegalStateException when the Kudu binary test jar cannot be found. Since it is a checked exception and a subclass of IOException it will be less likely to go uncaught. 5. Update the API docs to be more specific about the semantics of the public methods of KuduBinaryExtractor, including the use of the thread context classloader. 6. Add a simple test binary locator test using a child classloader plumbed into the KuduBinaryExtractor code by setting it as the thread context classloader. Change-Id: I5e1cf188bb557eeaea0b2867243855f3f2d121f1 Reviewed-on: http://gerrit.cloudera.org:8080/12147 Tested-by: Mike Percy <mpe...@apache.org> Reviewed-by: Brian McDevitt <br...@phdata.io> Reviewed-by: Grant Henke <granthe...@apache.org> --- M java/kudu-test-utils/src/main/java/org/apache/kudu/test/cluster/KuduBinaryJarExtractor.java M java/kudu-test-utils/src/test/java/org/apache/kudu/test/cluster/TestKuduBinaryJarExtractor.java 2 files changed, 60 insertions(+), 20 deletions(-) Approvals: Mike Percy: Verified Brian McDevitt: Looks good to me, but someone else must approve Grant Henke: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/12147 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5e1cf188bb557eeaea0b2867243855f3f2d121f1 Gerrit-Change-Number: 12147 Gerrit-PatchSet: 2 Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Brian McDevitt <br...@phdata.io> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mike Percy <mpe...@apache.org>