Skip to content

Commit

Permalink
fix #1244 add fess.es.cluster_name
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Aug 24, 2017
1 parent 4b4f681 commit 9465378
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/codelibs/fess/job/CrawlJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,13 @@ protected void executeCrawler() {
if (StringUtil.isNotBlank(transportAddresses)) {
cmdList.add("-D" + Constants.FESS_ES_TRANSPORT_ADDRESSES + "=" + transportAddresses);
}
final String clusterName = System.getProperty(Constants.FESS_ES_CLUSTER_NAME);
if (StringUtil.isNotBlank(clusterName)) {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + clusterName);
}
}

final String clusterName = System.getProperty(Constants.FESS_ES_CLUSTER_NAME);
if (StringUtil.isNotBlank(clusterName)) {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + clusterName);
} else {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + fessConfig.getElasticsearchClusterName());
}

final String systemLastaEnv = System.getProperty("lasta.env");
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/org/codelibs/fess/job/SuggestJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ protected void executeSuggestCreator() {
if (StringUtil.isNotBlank(transportAddresses)) {
cmdList.add("-D" + Constants.FESS_ES_TRANSPORT_ADDRESSES + "=" + transportAddresses);
}
final String clusterName = System.getProperty(Constants.FESS_ES_CLUSTER_NAME);
if (StringUtil.isNotBlank(clusterName)) {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + clusterName);
}
}

final String clusterName = System.getProperty(Constants.FESS_ES_CLUSTER_NAME);
if (StringUtil.isNotBlank(clusterName)) {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + clusterName);
} else {
cmdList.add("-D" + Constants.FESS_ES_CLUSTER_NAME + "=" + fessConfig.getElasticsearchClusterName());
}

final String lastaEnv = System.getProperty("lasta.env");
Expand Down

0 comments on commit 9465378

Please sign in to comment.