Search in sources :

Example 1 with HiveTestService

use of org.apache.hudi.hive.testutils.HiveTestService in project hudi by apache.

the class UtilitiesTestBase method initClass.

public static void initClass(boolean startHiveService) throws Exception {
    hdfsTestService = new HdfsTestService();
    zookeeperTestService = new ZookeeperTestService(hdfsTestService.getHadoopConf());
    dfsCluster = hdfsTestService.start(true);
    dfs = dfsCluster.getFileSystem();
    dfsBasePath = dfs.getWorkingDirectory().toString();
    dfs.mkdirs(new Path(dfsBasePath));
    if (startHiveService) {
        hiveTestService = new HiveTestService(hdfsTestService.getHadoopConf());
        hiveServer = hiveTestService.start();
        clearHiveDb();
    }
    zookeeperTestService.start();
}
Also used : Path(org.apache.hadoop.fs.Path) ZookeeperTestService(org.apache.hudi.common.testutils.minicluster.ZookeeperTestService) HdfsTestService(org.apache.hudi.common.testutils.minicluster.HdfsTestService) HiveTestService(org.apache.hudi.hive.testutils.HiveTestService)

Example 2 with HiveTestService

use of org.apache.hudi.hive.testutils.HiveTestService in project hudi by apache.

the class HiveServiceProvider method startLocalHiveServiceIfNeeded.

public void startLocalHiveServiceIfNeeded(Configuration configuration) throws IOException {
    if (config.isHiveLocal()) {
        hiveService = new HiveTestService(configuration);
        hiveServer = hiveService.start();
    }
}
Also used : HiveTestService(org.apache.hudi.hive.testutils.HiveTestService)

Aggregations

HiveTestService (org.apache.hudi.hive.testutils.HiveTestService)2 Path (org.apache.hadoop.fs.Path)1 HdfsTestService (org.apache.hudi.common.testutils.minicluster.HdfsTestService)1 ZookeeperTestService (org.apache.hudi.common.testutils.minicluster.ZookeeperTestService)1