Examples of ExecJob


Examples of org.apache.pig.backend.executionengine.ExecJob

      Tuple RowValue = it.next();
      System.out.println(RowValue);
    }

    Path newPath = new Path(getCurrentMethodName());
    ExecJob pigJob = pigServer
        .store(
            "records",
            new Path(newPath, "store").toString(),
            TableStorer.class.getCanonicalName()
                + "('[s7, s2]; [s3, s4]')");
    Assert.assertNotNull(pigJob.getException());
    System.out.println(pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

      System.out.println(RowValue);
    }

    Path newPath = new Path(getCurrentMethodName());
   
    ExecJob pigJob = pigServer
          .store(
              "records",
              new Path(newPath, "store").toString(),
              TableStorer.class.getCanonicalName()
                  + "('[s1, s2]; [s1, s4]')");
      Assert.assertNotNull(pigJob.getException());
      System.out.println(pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

      System.out.println(RowValue);
    }

    Path newPath = new Path(getCurrentMethodName());

    ExecJob pigJob = pigServer
        .store(
            "records",
            new Path(newPath, "store").toString(),
            TableStorer.class.getCanonicalName()
                + "('[s1]; [s1]')");
    Assert.assertNotNull(pigJob.getException());
    System.out.println(pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

      Tuple RowValue = it.next();
      System.out.println(RowValue);
    }

    Path newPath = new Path(getCurrentMethodName());
    ExecJob pigJob = pigServer
        .store(
            "records",
            new Path(newPath, "store").toString(),
            TableStorer.class.getCanonicalName()
                + "('[s1, s2]; [s3, s4]')");
    Assert.assertNotNull(pigJob.getException());
    System.out.println(pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

    //
    // Use pig STORE to store testing data
    //
    System.out.println("path = " + path);
    ExecJob pigJob = pigServer
        .store(
            "records",
            path.toString(),
            TableStorer.class.getCanonicalName()
                + "('[s1, s2]; [s3, s4]')");
    Assert.assertNotNull(pigJob.getException());
    System.out.println("pig job exception : " + pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

    // Store using multiple outputs;
    String outputPaths = "us_0,india_1,japan_2";
    removeDir(getTableFullPath("us_0"));
    removeDir(getTableFullPath("india_1"));
    removeDir(getTableFullPath("japan_2"));
    ExecJob pigJob = pigServer
      .store(
        "records",
        outputPaths,
        TableStorer.class.getCanonicalName() +
             "('[word,count]', 'org.apache.hadoop.zebra.pig.TestMultipleOutputs2$OutputPartitionerClass', 'us,india,japan')");   
   
    Assert.assertNull(pigJob.getException());
   
    // Validate results;
    query = "records = LOAD '" + "us_0"
          + "' USING org.apache.hadoop.zebra.pig.TableLoader();";
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

    t1++;
   
    String table1path = pathTable1.toString() + Integer.toString(t1);
    removeDir(new Path(table1path));
    ExecJob pigJob = pigServer.store("sort1", table1path, TableStorer.class.getCanonicalName()
        + "('[a, b, c]; [d, e, f, r1, m1]')");

    Assert.assertNull(pigJob.getException());

    String query3 = "records1 = LOAD '"
        + table1path
        + "' USING org.apache.hadoop.zebra.pig.TableLoader('a, b, c, d, e, f, r1, m1', 'sorted');";
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

    /*
     * Use pig STORE to store testing data BasicTable.Writer writer = new
     * BasicTable.Writer(pathTable, "SF_a,SF_b,SF_c,SF_d,SF_e,SF_f,SF_g",
     * "[SF_a, SF_b, SF_c]; [SF_e, SF_f, SF_g]", false, conf);
     */
    ExecJob pigJob = pigServer
        .store(
            "records",
            new Path(pathTable, "store").toString(),
            TableStorer.class.getCanonicalName()
                + "('[SF_a, SF_b, SF_c]; [SF_e]')");

    Assert.assertNull(pigJob.getException());
  }
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

        pw.close();
        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = filter a by $0 > 50;");
        pigServer.registerQuery("c = foreach b generate $0 - 50;");
        ExecJob job = pigServer.store("c", "output_map_only");
        PigStats pigStats = job.getStatistics();
       
        //counting the no. of bytes in the output file
        //long filesize = cluster.getFileSystem().getFileStatus(new Path("output_map_only")).getLen();
        InputStream is = FileLocalizer.open(FileLocalizer.fullPath(
                "output_map_only", pigServer.getPigContext()), pigServer
View Full Code Here

Examples of org.apache.pig.backend.executionengine.ExecJob

        pw.close();
        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = filter a by $0 > 50;");
        pigServer.registerQuery("c = foreach b generate $0 - 50;");
        ExecJob job = pigServer.store("c", "output_map_only", "BinStorage");
        PigStats pigStats = job.getStatistics();
       
        InputStream is = FileLocalizer.open(FileLocalizer.fullPath(
                "output_map_only", pigServer.getPigContext()),
                pigServer.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.