Examples of ExecJob


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

        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = group a by $0;");
        pigServer.registerQuery("c = foreach b generate group;");

        ExecJob job = pigServer.store("c", "output");
        PigStats pigStats = job.getStatistics();
        InputStream is = FileLocalizer.open(FileLocalizer.fullPath("output",
                pigServer.getPigContext()), pigServer.getPigContext());

        long filesize = 0;
        while(is.read() != -1) filesize++;
View Full Code Here

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

        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = group a by $0;");
        pigServer.registerQuery("c = foreach b generate group;");
        ExecJob job = pigServer.store("c", "output", "BinStorage");
        PigStats pigStats = job.getStatistics();

        InputStream is = FileLocalizer.open(FileLocalizer.fullPath("output",
                pigServer.getPigContext()), pigServer.getPigContext());
        long filesize = 0;
        while(is.read() != -1) filesize++;
View Full Code Here

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

        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = group a by $0;");
        pigServer.registerQuery("c = foreach b generate group, SUM(a.$1);");
        ExecJob job = pigServer.store("c", "output");
        PigStats pigStats = job.getStatistics();

        InputStream is = FileLocalizer.open(FileLocalizer.fullPath("output",
                pigServer.getPigContext()), pigServer.getPigContext());
        long filesize = 0;
        while(is.read() != -1) filesize++;
View Full Code Here

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

        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = group a by $0;");
        pigServer.registerQuery("c = foreach b generate group, SUM(a.$1);");

        ExecJob job = pigServer.store("c", "output", "BinStorage");
        PigStats pigStats = job.getStatistics();
       
        InputStream is = FileLocalizer.open(FileLocalizer.fullPath("output",
                pigServer.getPigContext()), pigServer.getPigContext());

        long filesize = 0;
View Full Code Here

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

        PigServer pigServer = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
        pigServer.registerQuery("a = load '" + file + "';");
        pigServer.registerQuery("b = order a by $0;");
        pigServer.registerQuery("c = group b by $0;");
        pigServer.registerQuery("d = foreach c generate group, SUM(b.$1);");
        ExecJob job = pigServer.store("d", "output");
        PigStats pigStats = job.getStatistics();
       
        InputStream is = FileLocalizer.open(FileLocalizer.fullPath("output",
                pigServer.getPigContext()), pigServer.getPigContext());
        long filesize = 0;
        while(is.read() != -1) filesize++;
View Full Code Here

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

        if (keyword.equals("join") || keyword.endsWith("cogroup")) {
            pigServer.registerQuery("c = " + keyword + " a by $0, b by $0;");
        } else if (keyword.equals("skewed")) {
            pigServer.registerQuery("c = join a by $0, b by $0 using 'skewed';");
        }
        ExecJob job = pigServer.store("c", output + "_output");
       
        PigStats stats = job.getStatistics();
        assertTrue(stats.isSuccessful());
        List<InputStats> inputs = stats.getInputStats();
        if (keyword.equals("join") || keyword.endsWith("cogroup")) {
            assertEquals(2, inputs.size());
        } else if (keyword.equals("skewed")) {
View Full Code Here

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

      System.out.println(RowValue);
    }

    try {
        Path newPath = new Path(getCurrentMethodName());
        ExecJob pigJob = pigServer
            .store(
                "records",
                new Path(newPath, "store").toString(),
                TableStorer.class.getCanonicalName()
                    + "('[s7, s2]; [s3, s4]')");
View Full Code Here

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

    }

    try {
        Path newPath = new Path(getCurrentMethodName());
       
        ExecJob pigJob = pigServer
              .store(
                  "records",
                  new Path(newPath, "store").toString(),
                  TableStorer.class.getCanonicalName()
                      + "('[s1, s2]; [s1, s4]')");
View Full Code Here

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

      System.out.println(RowValue);
    }
    try{
        Path newPath = new Path(getCurrentMethodName());
   
        ExecJob pigJob = pigServer
            .store(
                "records",
                new Path(newPath, "store").toString(),
                TableStorer.class.getCanonicalName()
                    + "('[s1]; [s1]')");
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
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.