Search in sources :

Example 36 with HiveConf

use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.

the class TestMergeStatement method initialize.

@BeforeClass
public static void initialize() {
    conf = new HiveConf(SemanticAnalyzer.class);
    SessionState.start(conf);
}
Also used : HiveConf(org.apache.hadoop.hive.conf.HiveConf) BeforeClass(org.junit.BeforeClass)

Example 37 with HiveConf

use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.

the class TestQBJoinTreeApplyPredicate method initialize.

@BeforeClass
public static void initialize() {
    queryState = new QueryState(new HiveConf(SemanticAnalyzer.class));
    conf = queryState.getConf();
    SessionState.start(conf);
}
Also used : HiveConf(org.apache.hadoop.hive.conf.HiveConf) QueryState(org.apache.hadoop.hive.ql.QueryState) BeforeClass(org.junit.BeforeClass)

Example 38 with HiveConf

use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.

the class TestQBSubQuery method initialize.

@BeforeClass
public static void initialize() {
    queryState = new QueryState(new HiveConf(SemanticAnalyzer.class));
    conf = queryState.getConf();
    SessionState.start(conf);
}
Also used : HiveConf(org.apache.hadoop.hive.conf.HiveConf) QueryState(org.apache.hadoop.hive.ql.QueryState) BeforeClass(org.junit.BeforeClass)

Example 39 with HiveConf

use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.

the class TestReplicationSemanticAnalyzer method initialize.

@BeforeClass
public static void initialize() throws HiveException {
    queryState = new QueryState(new HiveConf(SemanticAnalyzer.class));
    conf = queryState.getConf();
    conf.set("hive.security.authorization.manager", "");
    SessionState.start(conf);
    Hive hiveDb = Hive.get(conf);
    hiveDb.createTable(defaultDB + "." + tblName, cols, null, OrcInputFormat.class, OrcOutputFormat.class);
    Table t = hiveDb.getTable(tblName);
}
Also used : Hive(org.apache.hadoop.hive.ql.metadata.Hive) Table(org.apache.hadoop.hive.ql.metadata.Table) HiveConf(org.apache.hadoop.hive.conf.HiveConf) QueryState(org.apache.hadoop.hive.ql.QueryState) BeforeClass(org.junit.BeforeClass)

Example 40 with HiveConf

use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.

the class HiveServer2 method start.

@Override
public synchronized void start() {
    super.start();
    // If we're supporting dynamic service discovery, we'll add the service uri for this
    // HiveServer2 instance to Zookeeper as a znode.
    HiveConf hiveConf = this.getHiveConf();
    if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY)) {
        try {
            addServerInstanceToZooKeeper(hiveConf);
        } catch (Exception e) {
            LOG.error("Error adding this HiveServer2 instance to ZooKeeper: ", e);
            throw new ServiceException(e);
        }
    }
    if (webServer != null) {
        try {
            webServer.start();
            LOG.info("Web UI has started on port " + webServer.getPort());
        } catch (Exception e) {
            LOG.error("Error starting Web UI: ", e);
            throw new ServiceException(e);
        }
    }
}
Also used : ServiceException(org.apache.hive.service.ServiceException) HiveConf(org.apache.hadoop.hive.conf.HiveConf) ServiceException(org.apache.hive.service.ServiceException) ParseException(org.apache.commons.cli.ParseException) HiveException(org.apache.hadoop.hive.ql.metadata.HiveException) LogInitializationException(org.apache.hadoop.hive.common.LogUtils.LogInitializationException) KeeperException(org.apache.zookeeper.KeeperException) IOException(java.io.IOException)

Aggregations

HiveConf (org.apache.hadoop.hive.conf.HiveConf)404 BeforeClass (org.junit.BeforeClass)73 Test (org.junit.Test)66 Path (org.apache.hadoop.fs.Path)54 Before (org.junit.Before)50 Driver (org.apache.hadoop.hive.ql.Driver)46 CliSessionState (org.apache.hadoop.hive.cli.CliSessionState)44 IOException (java.io.IOException)39 ArrayList (java.util.ArrayList)37 File (java.io.File)31 HashMap (java.util.HashMap)26 FileSystem (org.apache.hadoop.fs.FileSystem)26 SessionState (org.apache.hadoop.hive.ql.session.SessionState)22 LinkedHashMap (java.util.LinkedHashMap)17 List (java.util.List)16 HiveException (org.apache.hadoop.hive.ql.metadata.HiveException)15 MiniHS2 (org.apache.hive.jdbc.miniHS2.MiniHS2)14 Map (java.util.Map)12 HiveMetaStoreClient (org.apache.hadoop.hive.metastore.HiveMetaStoreClient)12 MetaException (org.apache.hadoop.hive.metastore.api.MetaException)12