Examples of incrCounter()


Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

    * Mocks the Reporter.incrCounter, but adds buffering.
    * See org.apache.hadoop.mapred.Reporter's incrCounter.
    */
    public void incrCounter(String group, String counterName, long incr) {
        PigStatusReporter reporter = PigStatusReporter.getInstance();
        if (reporter != null && reporter.incrCounter(group, counterName, incr)) { // common case
            if (counterStringMap_.size() > 0) {
                for (Map.Entry<Pair<String, String>, Long> entry : counterStringMap_.entrySet()) {
                    reporter.incrCounter(entry.getKey().first, entry.getKey().second, entry.getValue());
                }
                counterStringMap_.clear();
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

    public void incrCounter(String group, String counterName, long incr) {
        PigStatusReporter reporter = PigStatusReporter.getInstance();
        if (reporter != null && reporter.incrCounter(group, counterName, incr)) { // common case
            if (counterStringMap_.size() > 0) {
                for (Map.Entry<Pair<String, String>, Long> entry : counterStringMap_.entrySet()) {
                    reporter.incrCounter(entry.getKey().first, entry.getKey().second, entry.getValue());
                }
                counterStringMap_.clear();
            }
            return;
        }
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

    * Mocks the Reporter.incrCounter, but adds buffering.
    * See org.apache.hadoop.mapred.Reporter's incrCounter.
    */
    public void incrCounter(Enum<?> key, long incr) {
        PigStatusReporter reporter = PigStatusReporter.getInstance();
        if (reporter != null && reporter.incrCounter(key, incr)) { // common case
            if (counterEnumMap_.size() > 0) {
                for (Map.Entry<Enum<?>, Long> entry : counterEnumMap_.entrySet()) {
                    reporter.getCounter(entry.getKey()).increment(entry.getValue());
                }
                counterEnumMap_.clear();
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

        throws InterruptedException, IOException {
            context.write(null, tuple);
            try {
                PigStatusReporter reporter = PigStatusReporter.getInstance();
                if (reporter != null) {
                    reporter.incrCounter(
                            JobControlCompiler.PIG_MAP_RANK_NAME
                            + context.getJobID().toString(), taskID, 1);
                }
            } catch (Exception ex) {
                log.error("Error on incrementer of PigMapCounter");
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

            try {
                PigStatusReporter reporter = PigStatusReporter.getInstance();
                if (reporter != null) {

                    if(leaf instanceof POCounter){
                        reporter.incrCounter(
                                JobControlCompiler.PIG_MAP_RANK_NAME
                                + context.getJobID().toString(), taskID, increment);
                    }

                }
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

                }
            }

            PigStatusReporter reporter = PigStatusReporter.getInstance();
            if (reporter != null) {
                reporter.incrCounter(
                        JobControlCompiler.PIG_MAP_RANK_NAME
                        + context.getJobID().toString(), taskID, 0);
            }
        }
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

        public void collect(Context context, Tuple tuple)
        throws InterruptedException, IOException {
            context.write(null, tuple);
            PigStatusReporter reporter = PigStatusReporter.getInstance();
            if (reporter != null) {
                reporter.incrCounter(
                        JobControlCompiler.PIG_MAP_RANK_NAME
                        + context.getJobID().toString(), taskID, 1);
            }
        }
    }
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

         **/
        public static void incrementCounter(Long increment) {
            PigStatusReporter reporter = PigStatusReporter.getInstance();
            if (reporter != null) {
                if(leaf instanceof POCounter){
                    reporter.incrCounter(
                            JobControlCompiler.PIG_MAP_RANK_NAME
                            + context.getJobID().toString(), taskID, increment);
                }
            }
        }
View Full Code Here

Examples of org.apache.pig.tools.pigstats.PigStatusReporter.incrCounter()

                if (convertedKey!=null) {
                    ((Map)result).put(convertedKey.toString(), convertedValue);
                } else {
                    PigStatusReporter reporter = PigStatusReporter.getInstance();
                    if (reporter != null) {
                       reporter.incrCounter(PigWarning.UDF_WARNING_1, 1);
                    }
                }
            }
            break;
        case LIST:
View Full Code Here

Examples of org.archive.mapred.ARCReporter.incrCounter()

    // Otherwise, the below casts fail.
    String url = key.toString();
    ARCRecord rec = (ARCRecord) ((ObjectWritable) value).get();
    ARCReporter reporter = (ARCReporter) r;
   
    reporter.incrCounter(Counter.TOTALFILES, 1);   
        if (!isIndex(rec)) {  // If it is the first record skip it so there are no errors from this record.
          reporter.incrCounter(Counter.ISINDEX, 1);
            return;
        }
       
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.