[ 
https://issues.apache.org/jira/browse/ARROW-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330680#comment-16330680
 ] 

ASF GitHub Bot commented on ARROW-1966:
---------------------------------------

wesm closed pull request #1487: ARROW-1966: [C++] Accommodate JAVA_HOME on 
Linux that includes the jre/ directory, or is the full path to directory with 
libjvm
URL: https://github.com/apache/arrow/pull/1487
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/apidoc/HDFS.md b/cpp/apidoc/HDFS.md
index d54ad270c..d3671fb76 100644
--- a/cpp/apidoc/HDFS.md
+++ b/cpp/apidoc/HDFS.md
@@ -50,6 +50,10 @@ export CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath --glob`
 * `ARROW_LIBHDFS_DIR` (optional): explicit location of `libhdfs.so` if it is
 installed somewhere other than `$HADOOP_HOME/lib/native`.
 
+To accommodate distribution-specific nuances, the `JAVA_HOME` variable may be
+set to the root path for the Java SDK, the JRE path itself, or to the directory
+containing the `libjvm` library.
+
 ### Mac Specifics
 
 The installed location of Java on OS X can vary, however the following snippet
diff --git a/cpp/src/arrow/io/hdfs-internal.cc 
b/cpp/src/arrow/io/hdfs-internal.cc
index 9cd1c5052..545b2d17d 100644
--- a/cpp/src/arrow/io/hdfs-internal.cc
+++ b/cpp/src/arrow/io/hdfs-internal.cc
@@ -147,7 +147,7 @@ static std::vector<fs::path> get_potential_libjvm_paths() {
   file_name = "jvm.dll";
 #elif __APPLE__
   search_prefixes = {""};
-  search_suffixes = {"", "/jre/lib/server"};
+  search_suffixes = {"", "/jre/lib/server", "/lib/server"};
   file_name = "libjvm.dylib";
 
 // SFrame uses /usr/libexec/java_home to find JAVA_HOME; for now we are
@@ -175,7 +175,7 @@ static std::vector<fs::path> get_potential_libjvm_paths() {
       "/usr/lib/jvm/default",                     // alt centos
       "/usr/java/latest",                         // alt centos
   };
-  search_suffixes = {"/jre/lib/amd64/server"};
+  search_suffixes = {"", "/jre/lib/amd64/server", "/lib/amd64/server"};
   file_name = "libjvm.so";
 #endif
   // From direct environment variable


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [C++] Support JAVA_HOME paths in HDFS libjvm loading that include the jre 
> directory
> -----------------------------------------------------------------------------------
>
>                 Key: ARROW-1966
>                 URL: https://issues.apache.org/jira/browse/ARROW-1966
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Wes McKinney
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> See discussion in https://github.com/apache/arrow/issues/1437



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to