[
https://issues.apache.org/jira/browse/ACCUMULO-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683004#comment-13683004
]
Corey J. Nolet commented on ACCUMULO-1499:
------------------------------------------
Miguel,
I took a look at your patch. Were you on an updated 1.6.0 branch when you made
the change? The initialize() method in your patch seems to be missing some
content. Here's the content that I have from 1.6.0:
{code:java}
/**
* Set directories and fully populate site config
*/
MiniAccumuloConfig initialize() {
if (!initialized) {
libDir = new File(dir, "lib");
confDir = new File(dir, "conf");
accumuloDir = new File(dir, "accumulo");
zooKeeperDir = new File(dir, "zookeeper");
logDir = new File(dir, "logs");
walogDir = new File(dir, "walogs");
String classpath = System.getenv("ACCUMULO_HOME") + "/lib/.*.jar," +
"$ZOOKEEPER_HOME/zookeeper[^.].*.jar," + "$HADOOP_HOME/[^.].*.jar,"
+ "$HADOOP_HOME/lib/[^.].*.jar," +
"$HADOOP_PREFIX/share/hadoop/common/.*.jar," +
"$HADOOP_PREFIX/share/hadoop/common/lib/.*.jar,"
+ "$HADOOP_PREFIX/share/hadoop/hdfs/.*.jar," +
"$HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar";
mergeProp(Property.INSTANCE_DFS_URI.getKey(), "file:///");
mergeProp(Property.INSTANCE_DFS_DIR.getKey(),
accumuloDir.getAbsolutePath());
mergeProp(Property.INSTANCE_SECRET.getKey(), DEFAULT_INSTANCE_SECRET);
mergeProp(Property.TSERV_PORTSEARCH.getKey(), "true");
mergeProp(Property.LOGGER_DIR.getKey(), walogDir.getAbsolutePath());
mergeProp(Property.TSERV_DATACACHE_SIZE.getKey(), "10M");
mergeProp(Property.TSERV_INDEXCACHE_SIZE.getKey(), "10M");
mergeProp(Property.TSERV_MAXMEM.getKey(), "50M");
mergeProp(Property.TSERV_WALOG_MAX_SIZE.getKey(), "100M");
mergeProp(Property.TSERV_NATIVEMAP_ENABLED.getKey(), "false");
mergeProp(Property.TRACE_TOKEN_PROPERTY_PREFIX + ".password",
getRootPassword());
// since there is a small amount of memory, check more frequently for
majc... setting may not be needed in 1.5
mergeProp(Property.TSERV_MAJC_DELAY.getKey(), "3");
mergeProp(Property.GENERAL_CLASSPATHS.getKey(), classpath);
mergeProp(Property.GENERAL_DYNAMIC_CLASSPATHS.getKey(),
libDir.getAbsolutePath());
mergePropWithRandomPort(Property.MASTER_CLIENTPORT.getKey());
mergePropWithRandomPort(Property.TRACE_PORT.getKey());
mergePropWithRandomPort(Property.TSERV_CLIENTPORT.getKey());
// zookeeper port should be set explicitly in this class, not just on the
site config
if (zooKeeperPort == null)
zooKeeperPort = PortUtils.getRandomFreePort();
siteConfig.put(Property.INSTANCE_ZK_HOST.getKey(), "localhost:" +
zooKeeperPort);
initialized = true;
}
return this;
}
{code}
> Move sanity checks from MiniAccumuloCluster constructor into
> MiniAccumuloConfig.initialize method.
> --------------------------------------------------------------------------------------------------
>
> Key: ACCUMULO-1499
> URL: https://issues.apache.org/jira/browse/ACCUMULO-1499
> Project: Accumulo
> Issue Type: Improvement
> Affects Versions: 1.6.0
> Reporter: David Medinets
> Priority: Trivial
> Fix For: 1.6.0
>
> Attachments: ACCUMULO-1499.patch
>
>
> The code below seems like it should be in the config class:
> if (config.getDir().exists() && !config.getDir().isDirectory())
> throw new IllegalArgumentException("Must pass in directory, " +
> config.getDir() + " is a file");
> if (config.getDir().exists() && config.getDir().list().length != 0)
> throw new IllegalArgumentException("Directory " + config.getDir() + "
> is not empty");
> this.config = config.initialize();
> Any objections to this change?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira