private static List<String> getDefaultSearchPath() { String clientConfSearchPath = getClientConfPath(System.getenv("ACCUMULO_CLIENT_CONF_PATH")); List<String> clientConfPaths; if (clientConfSearchPath != null) { clientConfPaths = Arrays.asList(clientConfSearchPath.split(File.pathSeparator)); } else { // if $ACCUMULO_CLIENT_CONF_PATH env isn't set, priority from top to bottom is: // ~/.accumulo/config // $ACCUMULO_CONF_DIR/client.conf // /etc/accumulo/client.conf // /etc/accumulo/conf/client.conf clientConfPaths = new LinkedList<>(); clientConfPaths.add(System.getProperty("user.home") + File.separator + USER_ACCUMULO_DIR_NAME + File.separator + USER_CONF_FILENAME); if (System.getenv("ACCUMULO_CONF_DIR") != null) { clientConfPaths .add(System.getenv("ACCUMULO_CONF_DIR") + File.separator + GLOBAL_CONF_FILENAME); } clientConfPaths.add("/etc/accumulo/" + GLOBAL_CONF_FILENAME); clientConfPaths.add("/etc/accumulo/conf/" + GLOBAL_CONF_FILENAME); } return clientConfPaths; }
private static List<String> getDefaultSearchPath() { String clientConfSearchPath = getClientConfPath(System.getenv("ACCUMULO_CLIENT_CONF_PATH")); List<String> clientConfPaths; if (clientConfSearchPath != null) { clientConfPaths = Arrays.asList(clientConfSearchPath.split(File.pathSeparator)); } else { // if $ACCUMULO_CLIENT_CONF_PATH env isn't set, priority from top to bottom is: // ~/.accumulo/config // $ACCUMULO_CONF_DIR/client.conf -OR- $ACCUMULO_HOME/conf/client.conf (depending on whether // $ACCUMULO_CONF_DIR is set) // /etc/accumulo/client.conf clientConfPaths = new LinkedList<>(); clientConfPaths.add(System.getProperty("user.home") + File.separator + USER_ACCUMULO_DIR_NAME + File.separator + USER_CONF_FILENAME); if (System.getenv("ACCUMULO_CONF_DIR") != null) { clientConfPaths .add(System.getenv("ACCUMULO_CONF_DIR") + File.separator + GLOBAL_CONF_FILENAME); } else if (System.getenv("ACCUMULO_HOME") != null) { clientConfPaths.add(System.getenv("ACCUMULO_HOME") + File.separator + "conf" + File.separator + GLOBAL_CONF_FILENAME); } clientConfPaths.add("/etc/accumulo/" + GLOBAL_CONF_FILENAME); clientConfPaths.add("/etc/accumulo/conf/" + GLOBAL_CONF_FILENAME); } return clientConfPaths; }