Package org.apache.hive.service.server

Examples of org.apache.hive.service.server.HiveServer2


    hiveConf.set("hive.server2.custom.authentication.class",
        "org.apache.hive.service.auth.TestCustomAuthentication$SimpleAuthenticationProviderImpl");
    FileOutputStream fos = new FileOutputStream(new File(hiveConf.getHiveSiteLocation().toURI()));
    hiveConf.writeXml(fos);
    fos.close();
    hiveserver2 = new HiveServer2();
    hiveserver2.init(hiveConf);
    hiveserver2.start();
    Thread.sleep(1000);
    System.out.println("hiveServer2 start ......");
  }
View Full Code Here


    // verify that hiveserver2 config is not loaded
    assertFalse(HiveConf.isLoadHiveServer2Config());
    assertNull(conf.get("hive.dummyparam.test.server.specific.config.hiveserver2site"));

    // check if hiveserver2 config gets loaded when HS2 is started
    new HiveServer2();
    conf = new HiveConf();
    verifyHS2ConfParams(conf);

    assertEquals("from.hivemetastore-site.xml",
        conf.get("hive.dummyparam.test.server.specific.config.metastoresite"));
View Full Code Here

      HiveConf conf = new HiveConf();
      // ensure metatore site.xml does not get to override this
      assertEquals("from.sysprop", conf.get(OVERRIDE_KEY));

      // get HS2 site.xml loaded
      new HiveServer2();
      conf = new HiveConf();
      assertTrue(HiveConf.isLoadHiveServer2Config());
      // ensure hiveserver2 site.xml does not get to override this
      assertEquals("from.sysprop", conf.get(OVERRIDE_KEY));
View Full Code Here

    verifyMetastoreConfNotLoaded(conf);
    assertEquals("from.hive-site.xml",
        conf.get("hive.dummyparam.test.server.specific.config.override"));

    // get HS2 site.xml loaded
    new HiveServer2();
    conf = new HiveConf();
    verifyHS2ConfParams(conf);
    verifyMetastoreConfNotLoaded(conf);
  }
View Full Code Here

   */
  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    // Find a free port
    port = MetaStoreUtils.findFreePort();
    hiveServer2 = new HiveServer2();
    hiveConf = new HiveConf();
  }
View Full Code Here

  private static String getHiveLocation(String baseLocation) {
    return baseLocation + Path.SEPARATOR + "hive";
  }

  private HiveServer2 startHiveServer(HiveConf serverConf) {
    HiveServer2 hiveServer = new HiveServer2();
    hiveServer.init(serverConf);
    hiveServer.start();
    return hiveServer;
  }
View Full Code Here

      getHiveConf().setVar(ConfVars.METASTOREURIS, "thrift://localhost:" + metaStorePort);
      MetaStoreUtils.startMetaStore(metaStorePort,
      ShimLoader.getHadoopThriftAuthBridge(), getHiveConf());
    }

    hiveServer2 = new HiveServer2();
    // Set confOverlay parameters
    for (Map.Entry<String, String> entry : confOverlay.entrySet()) {
      setConfProperty(entry.getKey(), entry.getValue());
    }
    hiveServer2.init(getHiveConf());
View Full Code Here

    hiveConf.setVar(HiveConf.ConfVars.POSTEXECHOOKS,
        PostExecHook.class.getName());
    hiveConf.setVar(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK,
        SemanticAnalysisHook.class.getName());

    hiveServer2 = new HiveServer2();
    hiveServer2.init(hiveConf);
    hiveServer2.start();
    Thread.sleep(2000);
  }
View Full Code Here

*/
public class TestServerOptionsProcessor {

  @Test
  public void test() {
    ServerOptionsProcessor optProcessor = new ServerOptionsProcessor("HiveServer2");
    final String key = "testkey";
    final String value = "value123";
    String []args = {"-hiveconf", key + "=" + value};

    Assert.assertEquals(
        "checking system property before processing options",
        null,
        System.getProperty(key));

    optProcessor.parse(args);

    Assert.assertEquals(
        "checking system property after processing options",
        value,
        System.getProperty(key));
View Full Code Here

TOP

Related Classes of org.apache.hive.service.server.HiveServer2

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.