def getStandaloneHiveJdbcJar(): hive_lib_dir = os.path.join(Hive.getHiveHome(), 'jdbc') jdbc_standalone_jar = util.findMatchingFiles(hive_lib_dir, "hive-jdbc-*-standalone.jar", depth=1) return jdbc_standalone_jar[0] if len(jdbc_standalone_jar) > 0 else None
from beaver.component.hive import Hive from beaver.machine import Machine from beaver.config import Config from beaver.java import Java from beaver.maven import Maven from beaver.ant import Ant from beaver import util import os, random, re, time, logging, shutil import tempfile from taskreporter.taskreporter import TaskReporter logger = logging.getLogger(__name__) SRC_DIR = os.path.join(Config.getEnv('WORKSPACE'), 'datateamtest', 'hcatalog') HADOOP_HOME = Config.get('hadoop', 'HADOOP_HOME') HADOOP_CONF = Config.get('hadoop', 'HADOOP_CONF') HIVE_HOME = Hive.getHiveHome() PIG_HOME = HIVE_HOME HCATALOG_HOME = Config.get('hcatalog', 'HCATALOG_HOME') HCAT_TEST_DIR = "/user/hrt_qa" HDFS_TEST_DIR = HCAT_TEST_DIR + "/tests" HDFS_USER = Config.get('hadoop', 'HDFS_USER') @TaskReporter.report_test() def getJobAndAppIds(text): ''' getJobAndAppIds text - Text from which to get the application and the job id ''' ids = [] # pattern to look for is different when tez is enabled.