Package org.apache.hadoop.hive.ql

Examples of org.apache.hadoop.hive.ql.Driver.run()


public class TestReadEntityDirect {

  @BeforeClass
  public static void onetimeSetup() throws CommandNeedRetryException {
    Driver driver = createDriver();
    int ret = driver.run("create table t1(i int)").getResponseCode();
    assertEquals("Checking command success", 0, ret);
    ret = driver.run("create view v1 as select * from t1").getResponseCode();
    assertEquals("Checking command success", 0, ret);
  }

View Full Code Here


  @BeforeClass
  public static void onetimeSetup() throws CommandNeedRetryException {
    Driver driver = createDriver();
    int ret = driver.run("create table t1(i int)").getResponseCode();
    assertEquals("Checking command success", 0, ret);
    ret = driver.run("create view v1 as select * from t1").getResponseCode();
    assertEquals("Checking command success", 0, ret);
  }

  @AfterClass
  public static void onetimeTeardown() throws Exception {
View Full Code Here

  }

  @AfterClass
  public static void onetimeTeardown() throws Exception {
    Driver driver = createDriver();
    driver.run("drop table t1");
    driver.run("drop view v1");
  }

  @Before
  public void setup() {
View Full Code Here

  @AfterClass
  public static void onetimeTeardown() throws Exception {
    Driver driver = createDriver();
    driver.run("drop table t1");
    driver.run("drop view v1");
  }

  @Before
  public void setup() {
    CheckInputReadEntityDirect.readEntities = null;
View Full Code Here

        "inputformat 'org.apache.hadoop.hive.ql.exec.TestOperators$CustomInFmt' " +
        "outputformat 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' " +
        "tblproperties ('myprop1'='val1', 'myprop2' = 'val2')";
    Driver driver = new Driver();
    driver.init();
    CommandProcessorResponse response = driver.run(cmd);
    assertEquals(0, response.getResponseCode());
    List<Object> result = new ArrayList<Object>();

    cmd = "load data local inpath '../data/files/employee.dat' " +
        "overwrite into table fetchOp partition (state='CA')";
View Full Code Here

    List<Object> result = new ArrayList<Object>();

    cmd = "load data local inpath '../data/files/employee.dat' " +
        "overwrite into table fetchOp partition (state='CA')";
    driver.init();
    response = driver.run(cmd);
    assertEquals(0, response.getResponseCode());

    cmd = "load data local inpath '../data/files/employee2.dat' " +
        "overwrite into table fetchOp partition (state='OR')";
    driver.init();
View Full Code Here

    assertEquals(0, response.getResponseCode());

    cmd = "load data local inpath '../data/files/employee2.dat' " +
        "overwrite into table fetchOp partition (state='OR')";
    driver.init();
    response = driver.run(cmd);
    assertEquals(0, response.getResponseCode());

    cmd = "select * from fetchOp";
    driver.init();
    driver.setMaxRows(500);
View Full Code Here

    assertEquals(0, response.getResponseCode());

    cmd = "select * from fetchOp";
    driver.init();
    driver.setMaxRows(500);
    response = driver.run(cmd);
    assertEquals(0, response.getResponseCode());
    driver.getResults(result);
    assertEquals(20, result.size());
    driver.close();
  }
View Full Code Here

public class TestColumnAccess {

  @BeforeClass
  public static void Setup() throws CommandNeedRetryException {
    Driver driver = createDriver();
    int ret = driver.run("create table t1(id1 int, name1 string)").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
    ret = driver.run("create table t2(id2 int, id1 int, name2 string)").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
    ret = driver.run("create view v1 as select * from t1").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
View Full Code Here

  @BeforeClass
  public static void Setup() throws CommandNeedRetryException {
    Driver driver = createDriver();
    int ret = driver.run("create table t1(id1 int, name1 string)").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
    ret = driver.run("create table t2(id2 int, id1 int, name2 string)").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
    ret = driver.run("create view v1 as select * from t1").getResponseCode();
    Assert.assertEquals("Checking command success", 0, ret);
  }

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.