keith-turner closed pull request #974: fixes #973 default fluo.dfs.root to empty string URL: https://github.com/apache/fluo/pull/974
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/modules/api/src/main/java/org/apache/fluo/api/config/FluoConfiguration.java b/modules/api/src/main/java/org/apache/fluo/api/config/FluoConfiguration.java index 9d3ea6e4..cf416c0c 100644 --- a/modules/api/src/main/java/org/apache/fluo/api/config/FluoConfiguration.java +++ b/modules/api/src/main/java/org/apache/fluo/api/config/FluoConfiguration.java @@ -170,7 +170,7 @@ */ public static final String DFS_ROOT_PROP = DFS_PREFIX + ".root"; // DFS defaults - public static final String DFS_ROOT_DEFAULT = "hdfs://localhost:8020/fluo"; + public static final String DFS_ROOT_DEFAULT = ""; // Administration properties private static final String ADMIN_PREFIX = FLUO_PREFIX + ".admin"; @@ -605,7 +605,7 @@ public FluoConfiguration setDfsRoot(String dfsRoot) { * @since 1.2.0 */ public String getDfsRoot() { - return getNonEmptyString(DFS_ROOT_PROP, DFS_ROOT_DEFAULT); + return getString(DFS_ROOT_PROP, DFS_ROOT_DEFAULT); } /** diff --git a/modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java b/modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java index 158b7d1f..e7117057 100644 --- a/modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java +++ b/modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java @@ -151,9 +151,16 @@ public void initialize(InitializationOptions opts) String accumuloJars; if (!config.getAccumuloJars().trim().isEmpty()) { + if (config.getDfsRoot().trim().isEmpty()) { + throw new IllegalStateException("The property " + FluoConfiguration.ACCUMULO_JARS_PROP + + " is set and " + FluoConfiguration.DFS_ROOT_PROP + + " is not set. So there is no where to copy the jars."); + } accumuloJars = config.getAccumuloJars().trim(); - } else { + } else if (!config.getDfsRoot().trim().isEmpty()) { accumuloJars = getJarsFromClasspath(); + } else { + accumuloJars = ""; } String accumuloClasspath; diff --git a/modules/distribution/src/main/config/fluo-app.properties b/modules/distribution/src/main/config/fluo-app.properties index 8a1110a9..bdddd5eb 100644 --- a/modules/distribution/src/main/config/fluo-app.properties +++ b/modules/distribution/src/main/config/fluo-app.properties @@ -59,7 +59,11 @@ fluo.accumulo.password= ## Accumulo zookeepers #fluo.accumulo.zookeepers=localhost -## Optional - List of jars to provide to Accumulo. If not set, Fluo will find jars on classpath. +## Optional - List of jars to provide to Accumulo. The jars specified at +## this location are copied to DFS (specified by fluo.dfs.root). Fluo runs +## code inside Accumulo tablet servers. This property provides a way to specify +## where to find Fluo's server side Accumulo code. If not set, Fluo will attempt +## to find jars on classpath. This property is only used at initialization. #fluo.accumulo.jars=/path/to/a.jar,/path/to/b.jar # Transaction properties ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services