@Override public void execute(ClusterConfiguration config) { String pathConf = config.getPathConf(); if (StringUtils.isNotBlank(pathConf) && new File(pathConf).isDirectory() == false) { throw new ElasticsearchSetupException(String.format( "The value of the 'pathConf' parameter ('%1$s') must be the absolute path" + " (or relative to the maven project) of an existing directory.", pathConf)); } }
private void setupElasticsearchConf(InstanceConfiguration config) throws IOException { String pathConf = config.getClusterConfiguration().getPathConf(); if (pathConf != null && !pathConf.isEmpty()) { // Merge the user-defined config directory with the default one // This allows user to omit some configuration files (jvm.options for instance) File baseDir = new File(config.getBaseDir()); FileUtils.copyDirectory(new File(pathConf), new File(baseDir, "config")); } }