#1810 remove transport settings
This commit is contained in:
parent
50abebb82b
commit
f2ed9d02fa
7 changed files with 13 additions and 81 deletions
|
@ -15,7 +15,6 @@ fi
|
|||
|
||||
# External elasticsearch cluster
|
||||
#ES_HTTP_URL=http://localhost:9200
|
||||
#ES_TRANSPORT_URL=localhost:9300
|
||||
#FESS_DICTIONARY_PATH=/var/lib/elasticsearch/config/
|
||||
|
||||
# SSL truststore for certificate validation over https
|
||||
|
|
|
@ -184,6 +184,8 @@ public class FessEsClient implements Client {
|
|||
|
||||
protected int maxEsStatusRetry = 10;
|
||||
|
||||
protected String clusterName = "elasticsearch";
|
||||
|
||||
public void addIndexConfig(final String path) {
|
||||
indexConfigList.add(path);
|
||||
}
|
||||
|
@ -230,7 +232,7 @@ public class FessEsClient implements Client {
|
|||
if (StringUtil.isBlank(httpAddress)) {
|
||||
if (runner == null) {
|
||||
runner = new ElasticsearchClusterRunner();
|
||||
final Configs config = newConfigs().clusterName(fessConfig.getElasticsearchClusterName()).numOfNode(1).useLogger();
|
||||
final Configs config = newConfigs().clusterName(clusterName).numOfNode(1).useLogger();
|
||||
final String esDir = System.getProperty("fess.es.dir");
|
||||
if (esDir != null) {
|
||||
config.basePath(esDir);
|
||||
|
@ -586,8 +588,7 @@ public class FessEsClient implements Client {
|
|||
}
|
||||
final String message =
|
||||
"Elasticsearch (" + System.getProperty(Constants.FESS_ES_HTTP_ADDRESS)
|
||||
+ ") is not available. Check the state of your Elasticsearch cluster (" + fessConfig.getElasticsearchClusterName()
|
||||
+ ").";
|
||||
+ ") is not available. Check the state of your Elasticsearch cluster (" + clusterName + ").";
|
||||
throw new ContainerInitFailureException(message, cause);
|
||||
}
|
||||
|
||||
|
@ -1174,6 +1175,10 @@ public class FessEsClient implements Client {
|
|||
T build(R response, H hit);
|
||||
}
|
||||
|
||||
public void setClusterName(String clusterName) {
|
||||
this.clusterName = clusterName;
|
||||
}
|
||||
|
||||
//
|
||||
// Elasticsearch Client
|
||||
//
|
||||
|
@ -1499,5 +1504,4 @@ public class FessEsClient implements Client {
|
|||
public void fieldCaps(final FieldCapabilitiesRequest request, final ActionListener<FieldCapabilitiesResponse> listener) {
|
||||
client.fieldCaps(request, listener);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,21 +25,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
/** The key of the configuration. e.g. Fess */
|
||||
String DOMAIN_TITLE = "domain.title";
|
||||
|
||||
/** The key of the configuration. e.g. elasticsearch */
|
||||
String ELASTICSEARCH_CLUSTER_NAME = "elasticsearch.cluster.name";
|
||||
|
||||
/** The key of the configuration. e.g. http://localhost:9201 */
|
||||
String ELASTICSEARCH_HTTP_URL = "elasticsearch.http.url";
|
||||
|
||||
/** The key of the configuration. e.g. false */
|
||||
String ELASTICSEARCH_TRANSPORT_SNIFF = "elasticsearch.transport.sniff";
|
||||
|
||||
/** The key of the configuration. e.g. 1m */
|
||||
String ELASTICSEARCH_TRANSPORT_ping_timeout = "elasticsearch.transport.ping_timeout";
|
||||
|
||||
/** The key of the configuration. e.g. 5s */
|
||||
String ELASTICSEARCH_TRANSPORT_nodes_sampler_interval = "elasticsearch.transport.nodes_sampler_interval";
|
||||
|
||||
/** The key of the configuration. e.g. aes */
|
||||
String APP_CIPHER_ALGORISM = "app.cipher.algorism";
|
||||
|
||||
|
@ -1442,48 +1430,13 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
String getDomainTitle();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.cluster.name'. <br>
|
||||
* The value is, e.g. elasticsearch <br>
|
||||
* Get the value for the key 'elasticsearch.http.url'. <br>
|
||||
* The value is, e.g. http://localhost:9201 <br>
|
||||
* comment: Elasticsearch
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getElasticsearchClusterName();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.http.url'. <br>
|
||||
* The value is, e.g. http://localhost:9201 <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getElasticsearchHttpUrl();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.transport.sniff'. <br>
|
||||
* The value is, e.g. false <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getElasticsearchTransportSniff();
|
||||
|
||||
/**
|
||||
* Is the property for the key 'elasticsearch.transport.sniff' true? <br>
|
||||
* The value is, e.g. false <br>
|
||||
* @return The determination, true or false. (if not found, exception but basically no way)
|
||||
*/
|
||||
boolean isElasticsearchTransportSniff();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.transport.ping_timeout'. <br>
|
||||
* The value is, e.g. 1m <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getElasticsearchTransportPingTimeout();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'elasticsearch.transport.nodes_sampler_interval'. <br>
|
||||
* The value is, e.g. 5s <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getElasticsearchTransportNodesSamplerInterval();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'app.cipher.algorism'. <br>
|
||||
* The value is, e.g. aes <br>
|
||||
|
@ -5924,30 +5877,10 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
return get(FessConfig.DOMAIN_TITLE);
|
||||
}
|
||||
|
||||
public String getElasticsearchClusterName() {
|
||||
return get(FessConfig.ELASTICSEARCH_CLUSTER_NAME);
|
||||
}
|
||||
|
||||
public String getElasticsearchHttpUrl() {
|
||||
return get(FessConfig.ELASTICSEARCH_HTTP_URL);
|
||||
}
|
||||
|
||||
public String getElasticsearchTransportSniff() {
|
||||
return get(FessConfig.ELASTICSEARCH_TRANSPORT_SNIFF);
|
||||
}
|
||||
|
||||
public boolean isElasticsearchTransportSniff() {
|
||||
return is(FessConfig.ELASTICSEARCH_TRANSPORT_SNIFF);
|
||||
}
|
||||
|
||||
public String getElasticsearchTransportPingTimeout() {
|
||||
return get(FessConfig.ELASTICSEARCH_TRANSPORT_ping_timeout);
|
||||
}
|
||||
|
||||
public String getElasticsearchTransportNodesSamplerInterval() {
|
||||
return get(FessConfig.ELASTICSEARCH_TRANSPORT_nodes_sampler_interval);
|
||||
}
|
||||
|
||||
public String getAppCipherAlgorism() {
|
||||
return get(FessConfig.APP_CIPHER_ALGORISM);
|
||||
}
|
||||
|
@ -8292,11 +8225,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
protected java.util.Map<String, String> prepareGeneratedDefaultMap() {
|
||||
java.util.Map<String, String> defaultMap = super.prepareGeneratedDefaultMap();
|
||||
defaultMap.put(FessConfig.DOMAIN_TITLE, "Fess");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_CLUSTER_NAME, "elasticsearch");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_HTTP_URL, "http://localhost:9201");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_TRANSPORT_SNIFF, "false");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_TRANSPORT_ping_timeout, "1m");
|
||||
defaultMap.put(FessConfig.ELASTICSEARCH_TRANSPORT_nodes_sampler_interval, "5s");
|
||||
defaultMap.put(FessConfig.APP_CIPHER_ALGORISM, "aes");
|
||||
defaultMap.put(FessConfig.APP_CIPHER_KEY, "___change__me___");
|
||||
defaultMap.put(FessConfig.APP_DIGEST_ALGORISM, "sha256");
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
# The title of domain the application for logging
|
||||
domain.title = Fess
|
||||
|
||||
# Elasticsearch
|
||||
elasticsearch.http.url=http://localhost:9201
|
||||
|
||||
# Cryptographer
|
||||
app.cipher.algorism=aes
|
||||
app.cipher.key=___change__me___
|
||||
|
|
1
src/packaging/common/env/fess
vendored
1
src/packaging/common/env/fess
vendored
|
@ -18,5 +18,4 @@ ES_HOME=/usr/share/elasticsearch/
|
|||
|
||||
# Elasticsearch URL
|
||||
ES_HTTP_URL=http://localhost:9200
|
||||
ES_TRANSPORT_URL=localhost:9300
|
||||
|
||||
|
|
|
@ -116,7 +116,6 @@ export FESS_VAR_PATH
|
|||
export FESS_DICTIONARY_PATH
|
||||
export ES_HOME
|
||||
export ES_HTTP_URL
|
||||
export ES_TRANSPORT_URL
|
||||
export FESS_JAVA_OPTS
|
||||
|
||||
# Check DAEMON exists
|
||||
|
|
|
@ -56,7 +56,6 @@ export FESS_DICTIONARY_PATH
|
|||
export FESS_HEAP_SIZE
|
||||
export ES_HOME
|
||||
export ES_HTTP_URL
|
||||
export ES_TRANSPORT_URL
|
||||
export FESS_JAVA_OPTS
|
||||
export JAVA_HOME
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue