Search in sources :

Example 6 with ThriftCLIServiceClient

use of org.apache.hive.service.cli.thrift.ThriftCLIServiceClient in project hive by apache.

the class TestSessionHooks method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    SessionHookTest.runCount.set(0);
    System.setProperty(ConfVars.HIVE_SERVER2_SESSION_HOOK.varname, TestSessionHooks.SessionHookTest.class.getName());
    service = new EmbeddedThriftBinaryCLIService();
    HiveConf hiveConf = new HiveConf();
    hiveConf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
    service.init(hiveConf);
    client = new ThriftCLIServiceClient(service);
}
Also used : EmbeddedThriftBinaryCLIService(org.apache.hive.service.cli.thrift.EmbeddedThriftBinaryCLIService) HiveConf(org.apache.hadoop.hive.conf.HiveConf) ThriftCLIServiceClient(org.apache.hive.service.cli.thrift.ThriftCLIServiceClient) Before(org.junit.Before)

Aggregations

HiveConf (org.apache.hadoop.hive.conf.HiveConf)6 ThriftCLIServiceClient (org.apache.hive.service.cli.thrift.ThriftCLIServiceClient)6 SessionHandle (org.apache.hive.service.cli.SessionHandle)3 EmbeddedThriftBinaryCLIService (org.apache.hive.service.cli.thrift.EmbeddedThriftBinaryCLIService)3 Test (org.junit.Test)3 File (java.io.File)2 CLIService (org.apache.hive.service.cli.CLIService)2 ThriftBinaryCLIService (org.apache.hive.service.cli.thrift.ThriftBinaryCLIService)2 Before (org.junit.Before)2 HashSet (java.util.HashSet)1 BeforeClass (org.junit.BeforeClass)1