Package org.apache.hive.service.cli.thrift

Examples of org.apache.hive.service.cli.thrift.ThriftCLIServiceClient


  private void stageDirTest(String stageDirConfigStr, String stageDirName, boolean isLocal) throws IOException {
    String scratchDirStr = System.getProperty("test.tmp.dir") + File.separator +
        stageDirName;
    System.setProperty(stageDirConfigStr, scratchDirStr);
    ThriftCLIService service = new EmbeddedThriftBinaryCLIService();
    ThriftCLIServiceClient client = new ThriftCLIServiceClient(service);
    final Path scratchDir = new Path(scratchDirStr);
    Configuration conf = new Configuration();
    FileSystem fs = scratchDir.getFileSystem(conf);
    if (isLocal) {
      fs = FileSystem.getLocal(conf);
View Full Code Here


    SessionHookTest.runCount.set(0);
    System.setProperty(ConfVars.HIVE_SERVER2_SESSION_HOOK.varname,
        TestSessionHooks.SessionHookTest.class.getName());
    service = new EmbeddedThriftBinaryCLIService();
    service.init(new HiveConf());
    client = new ThriftCLIServiceClient(service);
  }
View Full Code Here

  }

  public CLIServiceClient getServiceClientInternal() {
    for (Service service : hiveServer2.getServices()) {
      if (service instanceof ThriftBinaryCLIService) {
        return new ThriftCLIServiceClient((ThriftBinaryCLIService) service);
      }
      if (service instanceof ThriftHttpCLIService) {
        return new ThriftCLIServiceClient((ThriftHttpCLIService) service);
      }
    }
    throw new IllegalStateException("HiveServer2 not running Thrift service");
  }
View Full Code Here

  protected static ThriftCLIService service;

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    service = new EmbeddedThriftBinaryCLIService();
    client = new ThriftCLIServiceClient(service);
  }
View Full Code Here

  }

  public CLIServiceClient getServiceClientInternal() {
    for (Service service : hiveServer2.getServices()) {
      if (service instanceof ThriftBinaryCLIService) {
        return new ThriftCLIServiceClient((ThriftBinaryCLIService) service);
      }
      if (service instanceof ThriftHttpCLIService) {
        return new ThriftCLIServiceClient((ThriftHttpCLIService) service);
      }
    }
    throw new IllegalStateException("HiveServer2 not running Thrift service");
  }
View Full Code Here

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    service = new EmbeddedThriftBinaryCLIService();
    service.init(new HiveConf());
    client = new ThriftCLIServiceClient(service);
  }
View Full Code Here

    hiveConf = new HiveConf();
    hiveConf.setVar(HiveConf.ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION,
        initFile.getParentFile().getAbsolutePath());
    service = new FakeEmbeddedThriftBinaryCLIService(hiveConf);
    service.init(new HiveConf());
    client = new ThriftCLIServiceClient(service);
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    dataFile = new File(hiveConf.get("test.data.files"), "kv1.txt");
    EmbeddedThriftBinaryCLIService service = new EmbeddedThriftBinaryCLIService();
    service.init(hiveConf);
    client = new ThriftCLIServiceClient(service);
    sessionHandle = setupSession();
  }
View Full Code Here

  }

  public CLIServiceClient getServiceClientInternal() {
    for (Service service : hiveServer2.getServices()) {
      if (service instanceof ThriftBinaryCLIService) {
        return new ThriftCLIServiceClient((ThriftBinaryCLIService) service);
      }
      if (service instanceof ThriftHttpCLIService) {
        return new ThriftCLIServiceClient((ThriftHttpCLIService) service);
      }
    }
    throw new IllegalStateException("HiveServer2 not running Thrift service");
  }
View Full Code Here

  private static  ThriftCLIService service;

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    service = new EmbeddedThriftCLIService();
    client = new ThriftCLIServiceClient(service);
  }
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.thrift.ThriftCLIServiceClient

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.