int fieldNo = Integer.parseInt(args[2]); // which field to create histogram for
int min = Integer.parseInt(args[3]); // min field value
int max = Integer.parseInt(args[4]); // max field value
int bucketSize = Integer.parseInt(args[5]); // histogram bucket size
if (!parsedPigScript.aliases().contains(alias)) throw new IllegalArgumentException("No such alias.");
Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
monitorClasses.put(alias, new ClassWithArgs(DHMonitorAgent.class, fieldNo, min, max, bucketSize));
TreeMap<Integer, Integer> histogram = (TreeMap<Integer, Integer>) parsedPigScript.trace(DHCoordinator.class, monitorClasses);
System.out.println("Histogram: " + histogram);