Examples of registerQuery()


Examples of org.apache.pig.PigServer.registerQuery()

    new FuncSpec(funcSpecString));

  server.registerQuery("a = LOAD '" + singlePartitionedDir + "' using "
    + funcSpecString + ";");

  server.registerQuery("b = foreach a generate f1;");

  Iterator<Tuple> result = server.openIterator("b");

  int count = 0;
  Tuple t = null;
View Full Code Here

Examples of org.apache.pig.pigunit.pig.PigServer.registerQuery()

  public void testLocalModeTakesLessThan5secs() throws Exception {
    PigServer pigServer = new PigServer(ExecType.LOCAL);
    Data data = resetData(pigServer);
    data.set("in", tuple("a"));
    long t0 = System.currentTimeMillis();
    pigServer.registerQuery(
        "A = LOAD 'in' using mock.Storage();\n"
        + "STORE A INTO 'out' USING mock.Storage();");
    long t1 = System.currentTimeMillis();
    List<Tuple> list = data.get("out");
    assertEquals(1, list.size());
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.