Package org.apache.pig.penny

Examples of org.apache.pig.penny.ClassWithArgs


        String pigScriptFilename = args[0];
        ParsedPigScript parsedPigScript = pennyServer.parse(pigScriptFilename);
       
        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        for (String alias : parsedPigScript.aliases()) {
            monitorClasses.put(alias, new ClassWithArgs(DSMonitorAgent.class));
        }
        parsedPigScript.trace(DSCoordinator.class, monitorClasses);
       
    }
View Full Code Here


        if (!parsedPigScript.aliases().contains(triggerAlias)) throw new IllegalArgumentException("Invalid trigger alias.");

        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        for (String alias : parsedPigScript.aliases()) {
            if (alias.equals(triggerAlias)) {
                monitorClasses.put(alias, new ClassWithArgs(FTMonitorAgent.class, triggerField, triggerValue));
            } else {
                monitorClasses.put(alias, new ClassWithArgs(FTMonitorAgent.class));
            }
        }
        parsedPigScript.trace(FTCoordinator.class, monitorClasses);
       
    }
View Full Code Here

        ParsedPigScript parsedPigScript = pennyServer.parse(pigScriptFilename);
       
        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        for (String alias : parsedPigScript.aliases()) {
            if (parsedPigScript.operator(alias).equals("LOLoad")) {
                monitorClasses.put(alias, new ClassWithArgs(TRMonitorAgent.class));
                break;            // only put MA at (first) load
            }
        }
        parsedPigScript.trace(TRCoordinator.class, monitorClasses);
       
View Full Code Here

        String pigScriptFilename = args[0];
        ParsedPigScript parsedPigScript = pennyServer.parse(pigScriptFilename);
   
        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        for (String alias : parsedPigScript.aliases()) {
            monitorClasses.put(alias, new ClassWithArgs(LPMonitorAgent.class, parsedPigScript.operator(alias).equals("LOLoad")));
        }
        parsedPigScript.trace(LPCoordinator.class, monitorClasses);
       
    }
View Full Code Here

        int minCard = Integer.parseInt(args[2]);            // minimum cardinality accepted
       
        if (!parsedPigScript.aliases().contains(alias)) throw new IllegalArgumentException("Invalid alias.");

        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        monitorClasses.put(alias, new ClassWithArgs(TIMonitorAgent.class));
        parsedPigScript.trace(new ClassWithArgs(TICoordinator.class, minCard), monitorClasses);
    }
View Full Code Here

       
        for (int prefix = 0; prefix < runs.size(); prefix++) {
            System.out.println("*** LAUNCHING PROFILE RUN " + (prefix+1) + " of " + runs.size() + " ...");
       
            Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
            if (runs.get(prefix) != null) monitorClasses.put(runs.get(prefix), new ClassWithArgs(OPMonitorAgent.class));
           
            long totalRunningTime = 0;
            for (int i = 0; i < NUM_TRIALS; i++) {
                System.out.println("* TRIAL " + (i+1) + " of " + NUM_TRIALS + " ...");
               
View Full Code Here

        ParsedPigScript parsedPigScript = igServer.parse(pigScriptFilename);

        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        if (!skipInstrumentation) {
            for (String alias: parsedPigScript.aliases()) {
                monitorClasses.put(alias, new ClassWithArgs(NOPMonitorAgent.class));
            }
        }
        parsedPigScript.trace(NOPCoordinator.class, monitorClasses);
    }
View Full Code Here

        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);
    }
View Full Code Here

        int fieldNo = Integer.parseInt(args[2]);            // which field to check for nulls
       
        if (!parsedPigScript.aliases().contains(alias)) throw new IllegalArgumentException("Invalid alias.");

        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        monitorClasses.put(alias, new ClassWithArgs(RIMonitorAgent.class, fieldNo));
        parsedPigScript.trace(RICoordinator.class, monitorClasses);
    }
View Full Code Here

        List<String> upstreamAliases = parsedPigScript.inEdges(testAlias);
        if (upstreamAliases.size() != 1) throw new IllegalArgumentException("Unable to perform testing of given alias.");
        String prevAlias = upstreamAliases.iterator().next();
       
        Map<String, ClassWithArgs> monitorClasses = new HashMap<String, ClassWithArgs>();
        monitorClasses.put(prevAlias, new ClassWithArgs(GLMonitorAgent1.class, sampleRate));
        monitorClasses.put(testAlias, new ClassWithArgs(GLMonitorAgent2.class));
        parsedPigScript.trace(new ClassWithArgs(GLCoordinator.class, goldenLogicClass), monitorClasses);
       
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.penny.ClassWithArgs

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.