accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <>
Subject [GitHub] accumulo pull request #227: ACCUMULO-4596 Stopped using ACCUMULO_HOME for na...
Date Fri, 03 Mar 2017 18:08:04 GMT
Github user ctubbsii commented on a diff in the pull request:
    --- Diff: server/tserver/src/main/java/org/apache/accumulo/tserver/ ---
    @@ -70,11 +70,10 @@
       static {
         // Check standard directories
         List<File> directories = new ArrayList<>(Arrays.asList(new File[] {new
File("/usr/lib64"), new File("/usr/lib")}));
    -    // Check in ACCUMULO_HOME location, too
    -    String accumuloHome = System.getenv("ACCUMULO_HOME");
    -    if (accumuloHome != null) {
    -      directories.add(new File(accumuloHome + "/lib/native"));
    -      directories.add(new File(accumuloHome + "/lib/native/map")); // old location, just
in case somebody puts it here
    +    // Check in directory set by 'accumulo.native.lib.dir' system property
    +    String accumuloNativeLibDir = System.getProperty("accumulo.native.lib.dir");
    +    if (accumuloNativeLibDir != null) {
    +      directories.add(new File(accumuloNativeLibDir));
    --- End diff --
    I don't think we should be using this multiple directories strategy at all, nor the System.loadLibrary
strategy below. It's too complex, confusing, and prone to problems (thinking in particular
multi-arch issues with System.loadLibary), and the fact that "standard library directories"
are so platform specific.
    We should just do:
    if native == true:
      load native map from file specified by prop (or dir from prop + filename from System.mapLibraryName)
      if load failed:
        exit process

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message