Examples of PigServer


Examples of org.apache.pig.PigServer

 
 
  //still to complete.
  @Test
  public void testContentOfPigScript() throws ExecException, IOException {
    PigServer pigServer = new PigServer("LOCAL");
    pigServer.registerScript("/tmp/pigScript.txt");
    //pigServer.registerQuery("A = LOAD 'mapreduce.jdbc.hiho.input.outputPath' USING PigStorage(',') AS (URL:chararray,PAGEVIEW:long);");
    /*pigServer.dumpSchema("A") ;
    String s;
        InputStream fileWithStdOutContents = new DataInputStream( new BufferedInputStream( new FileInputStream(new File("stdout.redirected"))));
        BufferedReader reader = new BufferedReader(new InputStreamReader(fileWithStdOutContents));
View Full Code Here

Examples of org.apache.pig.pigunit.pig.PigServer

   */
  public static Cluster getCluster() throws ExecException {
    if (cluster == null) {
      if (System.getProperties().containsKey(EXEC_CLUSTER)) {
        LOG.info("Using cluster mode");
        pig = new PigServer(ExecType.MAPREDUCE);
      } else {
        LOG.info("Using default local mode");
        pig = new PigServer(ExecType.LOCAL);
      }

      cluster = new Cluster(pig.getPigContext());
    }

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.