Package org.apache.hive.service.cli.session

Examples of org.apache.hive.service.cli.session.SessionManager


  }

  @Override
  public synchronized void init(HiveConf hiveConf) {
    this.hiveConf = hiveConf;
    sessionManager = new SessionManager(hiveServer2);
    addService(sessionManager);
    //  If the hadoop cluster is secure, do a kerberos login for the service from the keytab
    if (ShimLoader.getHadoopShims().isSecurityEnabled()) {
      try {
        HiveAuthFactory.loginFromKeytab(hiveConf);
View Full Code Here


  }

  @Override
  public synchronized void init(HiveConf hiveConf) {
    this.hiveConf = hiveConf;
    sessionManager = new SessionManager();
    addService(sessionManager);
    /**
     * If auth mode is Kerberos, do a kerberos login for the service from the keytab
     */
    if (hiveConf.getVar(ConfVars.HIVE_SERVER2_AUTHENTICATION).equalsIgnoreCase(
View Full Code Here

    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

  @Override
  public synchronized void init(HiveConf hiveConf) {
    this.hiveConf = hiveConf;

    sessionManager = new SessionManager();
    addService(sessionManager);
    try {
      HiveAuthFactory.loginFromKeytab(hiveConf);
      serverUserName = ShimLoader.getHadoopShims().
          getShortUserName(ShimLoader.getHadoopShims().getUGIForConf(hiveConf));
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.session.SessionManager

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.