You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by bi...@apache.org on 2013/03/01 07:20:19 UTC
svn commit: r1451477 - in /pig/trunk: CHANGES.txt
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
Author: billgraham
Date: Fri Mar 1 06:20:18 2013
New Revision: 1451477
URL: http://svn.apache.org/r1451477
Log:
PIG-3002: Pig client should handle CountersExceededException (jarcec via billgraham)
Modified:
pig/trunk/CHANGES.txt
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1451477&r1=1451476&r2=1451477&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri Mar 1 06:20:18 2013
@@ -28,6 +28,8 @@ PIG-3174: Remove rpm and deb artifacts
IMPROVEMENTS
+PIG-3002: Pig client should handle CountersExceededException (jarcec via billgraham)
+
PIG-3189: Remove ivy/pig.pom and improve build mvn targets (billgraham)
PIG-3192: Better call to action to download Pig in docs (rjurney via jcoveney)
Modified: pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java?rev=1451477&r1=1451476&r2=1451477&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java (original)
+++ pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java Fri Mar 1 06:20:18 2013
@@ -694,21 +694,25 @@ public class MapReduceLauncher extends L
nullCounterCount++;
aggMap.put(PigWarning.NULL_COUNTER_COUNT, nullCounterCount);
}
- for (Enum e : PigWarning.values()) {
- if (e != PigWarning.NULL_COUNTER_COUNT) {
- Long currentCount = aggMap.get(e);
- currentCount = (currentCount == null ? 0 : currentCount);
- // This code checks if the counters is null, if it is,
- // we need to report to the user that the number
- // of warning aggregations may not be correct. In fact,
- // Counters should not be null, it is
- // a hadoop bug, once this bug is fixed in hadoop, the
- // null handling code should never be hit.
- // See Pig-943
- if (counters != null)
- currentCount += counters.getCounter(e);
- aggMap.put(e, currentCount);
+ try {
+ for (Enum e : PigWarning.values()) {
+ if (e != PigWarning.NULL_COUNTER_COUNT) {
+ Long currentCount = aggMap.get(e);
+ currentCount = (currentCount == null ? 0 : currentCount);
+ // This code checks if the counters is null, if it is,
+ // we need to report to the user that the number
+ // of warning aggregations may not be correct. In fact,
+ // Counters should not be null, it is
+ // a hadoop bug, once this bug is fixed in hadoop, the
+ // null handling code should never be hit.
+ // See Pig-943
+ if (counters != null)
+ currentCount += counters.getCounter(e);
+ aggMap.put(e, currentCount);
+ }
}
+ } catch (Exception e) {
+ log.warn("Exception getting counters.", e);
}
}
} catch (IOException ioe) {