Package org.apache.hive.service.cli

Examples of org.apache.hive.service.cli.CLIService


    this.inactiveHandleCache =
      CacheBuilder.newBuilder()
        .expireAfterWrite(cConf.getLong(Constants.Explore.INACTIVE_OPERATION_TIMEOUT_SECS), TimeUnit.SECONDS)
        .build();

    this.cliService = new CLIService();

    this.txClient = txClient;
    ContextManager.saveContext(datasetFramework);

    cleanupJobSchedule = cConf.getLong(Constants.Explore.CLEANUP_JOB_SCHEDULE_SECS);
View Full Code Here


    HiveConf hconf = new HiveConf();
    assertTrue("default value of hive server2 doAs should be true",
        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService();
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftBinaryCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TSetIpAddressProcessor.class);
View Full Code Here

   * This class is almost the same as EmbeddedThriftBinaryCLIService,
   * except its constructor having a HiveConf param for test usage.
   */
  private class FakeEmbeddedThriftBinaryCLIService extends ThriftBinaryCLIService {
    public FakeEmbeddedThriftBinaryCLIService(HiveConf hiveConf) {
      super(new CLIService(null));
      isEmbedded = true;
      cliService.init(hiveConf);
      cliService.start();
    }
View Full Code Here

    HiveConf hconf = new HiveConf();
    assertTrue("default value of hive server2 doAs should be true",
        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService(null);
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftBinaryCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TSetIpAddressProcessor.class);
View Full Code Here

*
*/
public class EmbeddedThriftBinaryCLIService extends ThriftBinaryCLIService {

  public EmbeddedThriftBinaryCLIService() {
    super(new CLIService(null));
    isEmbedded = true;
    HiveConf.setLoadHiveServer2Config(true);
  }
View Full Code Here

    HiveConf.setLoadHiveServer2Config(true);
  }

  @Override
  public synchronized void init(HiveConf hiveConf) {
    cliService = new CLIService(this);
    addService(cliService);
    if (isHTTPTransportMode(hiveConf)) {
      thriftCLIService = new ThriftHttpCLIService(cliService);
    } else {
      thriftCLIService = new ThriftBinaryCLIService(cliService);
View Full Code Here

*
*/
public class EmbeddedThriftBinaryCLIService extends ThriftBinaryCLIService {

  public EmbeddedThriftBinaryCLIService() {
    super(new CLIService());
    isEmbedded = true;
    cliService.init(new HiveConf());
    cliService.start();
  }
View Full Code Here

  }


  @Override
  public synchronized void init(HiveConf hiveConf) {
    cliService = new CLIService();
    addService(cliService);

    String transportMode = System.getenv("HIVE_SERVER2_TRANSPORT_MODE");
    if(transportMode == null) {
      transportMode = hiveConf.getVar(HiveConf.ConfVars.HIVE_SERVER2_TRANSPORT_MODE);
View Full Code Here

        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));

    hconf.setVar(ConfVars.HIVE_SERVER2_AUTHENTICATION,
        HiveAuthFactory.AuthTypes.KERBEROS.toString());

    CLIService cliService = new CLIService();
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftCLIService(cliService);
    TOpenSessionReq req = new TOpenSessionReq();
    req.setUsername("testuser1");
    SessionHandle sHandle = tcliService.getSessionHandle(req );
    SessionManager sManager = getSessionManager(cliService.getServices());
    HiveSession session = sManager.getSession(sHandle);

    //Proxy class for doing doAs on all calls is used when doAs is enabled
    // and kerberos security is on
    assertTrue("check if session class is a proxy", session instanceof java.lang.reflect.Proxy);
View Full Code Here

    HiveConf hconf = new HiveConf();
    assertTrue("default value of hive server2 doAs should be true",
        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService();
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TUGIContainingProcessor.class);
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.CLIService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.