Package com.twitter.ambrose.pig

Examples of com.twitter.ambrose.pig.PigJob


    String[] aliases = new String[] { "alias1" };
    String[] features = new String[] { "feature1" };
    Map<String, Number> m = new HashMap<String, Number>();
    m.put("somemetric", 45);

    pigJob = new PigJob();
    pigJob.setAliases(aliases);
    pigJob.setFeatures(features);
    pigJob.setConfiguration(properties);
    pigJob.setMetrics(m);
  }
View Full Code Here


                   "  },\n" +
                   "  \"id\" : 1,\n" +
                   "  \"timestamp\" : 1373560988033\n" +
                   "}";
    Event event = Event.fromJson(json);
    PigJob job = ((DAGNode<PigJob>)event.getPayload()).getJob();
    assertEquals("job_local_0001", job.getId());
    assertArrayEquals(new String[] {"A", "AA", "B", "C"}, job.getAliases());
    assertArrayEquals(new String[] {"GROUP_BY", "COMBINER", "MAP_PARTIALAGG"}, job.getFeatures());
    assertNotNull(job.getMetrics());
    assertEquals(123, job.getMetrics().get("somemetric"));
  }
View Full Code Here

TOP

Related Classes of com.twitter.ambrose.pig.PigJob

Copyright © 2018 www.massapicom. 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.