Examples of CliSessionState


Examples of org.apache.hadoop.hive.cli.CliSessionState

    HiveConf hiveConf = new HiveConf(TestHCatLoaderComplexSchema.class);
    hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
    hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
    hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
    driver = new Driver(hiveConf);
    SessionState.start(new CliSessionState(hiveConf));
    //props = new Properties();
    //props.setProperty("fs.default.name", cluster.getProperties().getProperty("fs.default.name"));

  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

    hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
    hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
    hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
    hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR);
    driver = new Driver(hiveConf);
    SessionState.start(new CliSessionState(hiveConf));

    cleanup();

    createTable(BASIC_TABLE, "a int, b string");
    createTable(COMPLEX_TABLE,
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

      }
    }
    HBaseConfiguration.merge(hcatConf,
      RevisionManagerConfiguration.create());
    hcatConf.set(RMConstants.ZOOKEEPER_DATADIR, "/rm_base");
    SessionState.start(new CliSessionState(hcatConf));
    hcatDriver = new HCatDriver();

  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

    }
    HBaseConfiguration.merge(hcatConf,
        RevisionManagerConfiguration.create());


    SessionState.start(new CliSessionState(hcatConf));
    hcatDriver = new HCatDriver();

  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

      hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
      hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
      hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
      hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR);
      driver = new Driver(hiveConf);
      SessionState.start(new CliSessionState(hiveConf));
    }

    cleanup();
  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

      if (el.getKey().startsWith("hbase.")) {
        hcatConf.set(el.getKey(), el.getValue());
      }
    }

    SessionState.start(new CliSessionState(hcatConf));
    hcatDriver = new HCatDriver();

  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

    hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
    hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");

    LOG.debug("Hive conf : {}", hiveConf.getAllProperties());
    Driver driver = new Driver(hiveConf);
    SessionState.start(new CliSessionState(hiveConf));
    return driver;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

    hiveConf = new HiveConf(this.getClass());
    assertTrue(hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION));
    assertFalse(hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_AUTO_CREATE_SCHEMA));
    assertTrue(hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_FIXED_DATASTORE));

    SessionState.start(new CliSessionState(hiveConf));
    driver = new Driver(hiveConf);
    // driver execution should fail since the schema didn't get created
    CommandProcessorResponse proc = driver.run("show tables");
    assertFalse(proc.getResponseCode() == 0);
   }
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

   */
  public void testMetastoreVersion () throws Exception {
    // let the schema and version be auto created
    System.setProperty(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.toString(), "false");
    hiveConf = new HiveConf(this.getClass());
    SessionState.start(new CliSessionState(hiveConf));
    driver = new Driver(hiveConf);
    driver.run("show tables");

    // correct version stored by Metastore during startup
    assertEquals(MetaStoreSchemaInfo.getHiveSchemaVersion(), getVersion(hiveConf));
View Full Code Here

Examples of org.apache.hadoop.hive.cli.CliSessionState

   * @throws Exception
   */
  public void testVersionMatching () throws Exception {
    System.setProperty(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.toString(), "false");
    hiveConf = new HiveConf(this.getClass());
    SessionState.start(new CliSessionState(hiveConf));
    driver = new Driver(hiveConf);
    driver.run("show tables");

    hiveConf.setBoolVar(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION, true);
    setVersion(hiveConf, MetaStoreSchemaInfo.getHiveSchemaVersion());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.