hiveHost = conf.getHiveHost();
hivePort = conf.getHivePort();
transport = new TSocket(hiveHost, hivePort);
protocol = new TBinaryProtocol(transport);
client = new HiveClient(protocol);
if (StringUtils.isNotEmpty(elasticsearchUrl)) {
this.elasticsearchUrl = elasticsearchUrl;
this.elasticsearchMarkerFolder = conf.getElasticSearchMarkerFolder();
if (runMarkerQueries) {
LOG.info("RUNNING ELASTICSEARCHMARKERQUERIES\n");
runElasticSearchMarkerQueries();
}
}
this.hiveTableName = hiveTableName;
hiveMarkerFolder = conf.getHiveDefaultMarkerFolder();
try {
if (!transport.isOpen()) {
LOG.error("hive transport is closed, re-opening");
transport = new TSocket(hiveHost, hivePort);
protocol = new TBinaryProtocol(transport);
client = new HiveClient(protocol);
transport.open();
if (runMarkerQueries) {
LOG.info("RUNNING HIVEMARKERQUERIES\n");
runHiveMarkerQueries();
}