Issue Details (XML | Word | Printable)

Key: HADOOP-1328
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tom White
Reporter: Runping Qi
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Hadoop Streaming needs to provide a way for the stream plugin to update global counters

Created: 04/May/07 09:37 PM   Updated: 08/Jul/09 05:05 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works hadoop-1328-v2.patch 2008-03-24 05:09 PM Tom White 7 kB
Text File Licensed for inclusion in ASF works hadoop-1328-v3.patch 2008-04-04 11:10 AM Tom White 7 kB
Text File Licensed for inclusion in ASF works hadoop-1328-v4.patch 2008-04-16 02:47 PM Tom White 7 kB
Text File Licensed for inclusion in ASF works hadoop-1328-v5.patch 2008-06-02 09:37 AM Tom White 7 kB
Text File Licensed for inclusion in ASF works hadoop-1328.patch 2008-03-13 03:21 PM Tom White 7 kB
Issue Links:
Blocker
 

Hadoop Flags: Reviewed
Release Note:
Introduced a way for a streaming process to update global counters and status using stderr stream to emit information. Use "reporter:counter:<group>,<counter>,<amount> " to update a counter. Use "reporter:status:<message>" to update status.
Resolution Date: 04/Jun/08 08:21 PM


 Description  « Hide
Sometimes, the stream plugin may want to create/update its own global counters.
There is no way to do so currently.
One possible way to enable that is to use the stderr output of the stream process.
The stream process can emit the global counter update information (such as GLOCAL_COUNTER COUNTER_NAME NUM)
to the stderr of the process. The Stderr handling thread can call the global counter API whenever it encounters the global counter update information line.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tom White added a comment - 13/Mar/08 03:21 PM
This patch adds support for counters in streaming. Scripts write lines to standard error of the form:

counter:<group>,<counter>,<amount>

For example, in python you might write

sys.stderr.write("counter:counters,linecount,1\n")


Tom White added a comment - 24/Mar/08 05:09 PM
I've generalized this slightly to support status updates by the same mechanism. There is a (configurable) prefix that allows you to access the reporter via stderr. To increment a counter:

reporter:counter:<group>,<counter>,<amount>

And to set the status:

reporter:status:<message>


Amareshwari Sriramadasu added a comment - 01/Apr/08 10:41 AM
+1

Tom White added a comment - 04/Apr/08 11:10 AM
Updated to apply to trunk following changes in HADOOP-3089.

Tom White added a comment - 16/Apr/08 02:47 PM
Synced with trunk.

Tom White added a comment - 02/Jun/08 09:37 AM
Synced with trunk.

Hadoop QA added a comment - 03/Jun/08 09:29 PM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12383210/hadoop-1328-v5.patch
against trunk revision 662813.

+1 @author. The patch does not contain any @author tags.

+1 tests included. The patch appears to include 9 new or modified tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2549/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2549/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2549/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2549/console

This message is automatically generated.


Owen O'Malley added a comment - 04/Jun/08 08:21 PM
I just committed this. Thanks, Tom!