diff --git a/wherehows-common/src/main/java/wherehows/common/Constant.java b/wherehows-common/src/main/java/wherehows/common/Constant.java index 753a0d1d11..a38b3e88c9 100644 --- a/wherehows-common/src/main/java/wherehows/common/Constant.java +++ b/wherehows-common/src/main/java/wherehows/common/Constant.java @@ -231,9 +231,9 @@ public class Constant { /** Property name of wherehows execution id for ETL process. */ public static final String WH_EXEC_ID_KEY = "wh.exec.id"; - public static final String WH_ELASTICSEARCH_URL_KEY = "wh.elasticsearch.url"; - public static final String WH_ELASTICSEARCH_PORT_KEY = "wh.elasticsearch.port"; - public static final String WH_ELASTICSEARCH_INDEX_KEY = "wh.elasticsearch.index"; + public static final String ELASTICSEARCH_URL_KEY = "elasticsearch.url"; + public static final String ELASTICSEARCH_PORT_KEY = "elasticsearch.port"; + public static final String ELASTICSEARCH_INDEX_KEY = "elasticsearch.index"; // Oracle public static final String ORA_DB_USERNAME_KEY = "oracle.db.username"; diff --git a/wherehows-etl/src/main/resources/jython/DatasetTreeBuilder.py b/wherehows-etl/src/main/resources/jython/DatasetTreeBuilder.py index 4c9d2c9459..53827af3a6 100644 --- a/wherehows-etl/src/main/resources/jython/DatasetTreeBuilder.py +++ b/wherehows-etl/src/main/resources/jython/DatasetTreeBuilder.py @@ -81,8 +81,8 @@ class DatasetTreeBuilder: def saveTreeInElasticSearchIfApplicable(args): - es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None) - es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None) + es_url = args.get(Constant.ELASTICSEARCH_URL_KEY, None) + es_port = args.get(Constant.ELASTICSEARCH_PORT_KEY, None) if es_url and es_port: esi = ElasticSearchIndex(args) d = datetime.utcnow() diff --git a/wherehows-etl/src/main/resources/jython/ElasticSearchIndex.py b/wherehows-etl/src/main/resources/jython/ElasticSearchIndex.py index b900d4b77c..ae4116a715 100644 --- a/wherehows-etl/src/main/resources/jython/ElasticSearchIndex.py +++ b/wherehows-etl/src/main/resources/jython/ElasticSearchIndex.py @@ -22,13 +22,13 @@ import urllib2 class ElasticSearchIndex(): def __init__(self, args): self.logger = LoggerFactory.getLogger('jython script : ' + self.__class__.__name__) - self.elasticsearch_index_url = args[Constant.WH_ELASTICSEARCH_URL_KEY] - self.elasticsearch_port = args[Constant.WH_ELASTICSEARCH_PORT_KEY] + self.elasticsearch_index_url = args[Constant.ELASTICSEARCH_URL_KEY] + self.elasticsearch_port = args[Constant.ELASTICSEARCH_PORT_KEY] - if Constant.WH_ELASTICSEARCH_INDEX_KEY not in args: + if Constant.ELASTICSEARCH_INDEX_KEY not in args: self.elasticsearch_index = "wherehows" else: - self.elasticsearch_index = args[Constant.WH_ELASTICSEARCH_INDEX_KEY] + self.elasticsearch_index = args[Constant.ELASTICSEARCH_INDEX_KEY] self.wh_con = zxJDBC.connect(args[Constant.WH_DB_URL_KEY], diff --git a/wherehows-etl/src/main/resources/jython/FlowTreeBuilder.py b/wherehows-etl/src/main/resources/jython/FlowTreeBuilder.py index e40eb61655..78649bae78 100644 --- a/wherehows-etl/src/main/resources/jython/FlowTreeBuilder.py +++ b/wherehows-etl/src/main/resources/jython/FlowTreeBuilder.py @@ -84,8 +84,8 @@ class FlowTreeBuilder: def saveTreeInElasticSearchIfApplicable(args): - es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None) - es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None) + es_url = args.get(Constant.ELASTICSEARCH_URL_KEY, None) + es_port = args.get(Constant.ELASTICSEARCH_PORT_KEY, None) if es_url and es_port: esi = ElasticSearchIndex(args) d = datetime.utcnow()