mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-22 08:08:01 +00:00
Move elastic-serach related props from wh_property table to job files. (#574)
This will break FlowTreeBuilder & DatasetTreeBuilder, both are not being used anyway.
This commit is contained in:
parent
d2d92367f9
commit
9dca733d76
@ -231,9 +231,9 @@ public class Constant {
|
|||||||
/** Property name of wherehows execution id for ETL process. */
|
/** 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_EXEC_ID_KEY = "wh.exec.id";
|
||||||
|
|
||||||
public static final String WH_ELASTICSEARCH_URL_KEY = "wh.elasticsearch.url";
|
public static final String ELASTICSEARCH_URL_KEY = "elasticsearch.url";
|
||||||
public static final String WH_ELASTICSEARCH_PORT_KEY = "wh.elasticsearch.port";
|
public static final String ELASTICSEARCH_PORT_KEY = "elasticsearch.port";
|
||||||
public static final String WH_ELASTICSEARCH_INDEX_KEY = "wh.elasticsearch.index";
|
public static final String ELASTICSEARCH_INDEX_KEY = "elasticsearch.index";
|
||||||
|
|
||||||
// Oracle
|
// Oracle
|
||||||
public static final String ORA_DB_USERNAME_KEY = "oracle.db.username";
|
public static final String ORA_DB_USERNAME_KEY = "oracle.db.username";
|
||||||
|
@ -81,8 +81,8 @@ class DatasetTreeBuilder:
|
|||||||
|
|
||||||
|
|
||||||
def saveTreeInElasticSearchIfApplicable(args):
|
def saveTreeInElasticSearchIfApplicable(args):
|
||||||
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
|
es_url = args.get(Constant.ELASTICSEARCH_URL_KEY, None)
|
||||||
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
|
es_port = args.get(Constant.ELASTICSEARCH_PORT_KEY, None)
|
||||||
if es_url and es_port:
|
if es_url and es_port:
|
||||||
esi = ElasticSearchIndex(args)
|
esi = ElasticSearchIndex(args)
|
||||||
d = datetime.utcnow()
|
d = datetime.utcnow()
|
||||||
|
@ -22,13 +22,13 @@ import urllib2
|
|||||||
class ElasticSearchIndex():
|
class ElasticSearchIndex():
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
self.logger = LoggerFactory.getLogger('jython script : ' + self.__class__.__name__)
|
self.logger = LoggerFactory.getLogger('jython script : ' + self.__class__.__name__)
|
||||||
self.elasticsearch_index_url = args[Constant.WH_ELASTICSEARCH_URL_KEY]
|
self.elasticsearch_index_url = args[Constant.ELASTICSEARCH_URL_KEY]
|
||||||
self.elasticsearch_port = args[Constant.WH_ELASTICSEARCH_PORT_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"
|
self.elasticsearch_index = "wherehows"
|
||||||
else:
|
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],
|
self.wh_con = zxJDBC.connect(args[Constant.WH_DB_URL_KEY],
|
||||||
|
@ -84,8 +84,8 @@ class FlowTreeBuilder:
|
|||||||
|
|
||||||
|
|
||||||
def saveTreeInElasticSearchIfApplicable(args):
|
def saveTreeInElasticSearchIfApplicable(args):
|
||||||
es_url = args.get(Constant.WH_ELASTICSEARCH_URL_KEY, None)
|
es_url = args.get(Constant.ELASTICSEARCH_URL_KEY, None)
|
||||||
es_port = args.get(Constant.WH_ELASTICSEARCH_PORT_KEY, None)
|
es_port = args.get(Constant.ELASTICSEARCH_PORT_KEY, None)
|
||||||
if es_url and es_port:
|
if es_url and es_port:
|
||||||
esi = ElasticSearchIndex(args)
|
esi = ElasticSearchIndex(args)
|
||||||
d = datetime.utcnow()
|
d = datetime.utcnow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user