Hi Guys,
I was investigating related issue in Sqoop project(http://sqoop.apache.org/). Basically we are reporting number of written filesystem bytes back to the user and on Hadoop 0.23/2.x we're always getting 0. I've noticed that there was some refactorization in FileSystem counter related code and found this issue requesting backward compatibility.

I therefore believe that this counter should be renamed in order to provide backward compatibility. I might fix this discrepancy in Sqoop, but I believe that other projects/users might also be affected and therefore it would be better to fix it in upstream. I wanted to reopen this ticket, but apparently I do not have enough privileges to do so. Could I ask anyone with proper privileges to do that or should I create new JIRA instead?

Jarek Jarcec Cecho
added a comment - 13/Aug/12 08:03 Hi Guys,
I was investigating related issue in Sqoop project( http://sqoop.apache.org/ ). Basically we are reporting number of written filesystem bytes back to the user and on Hadoop 0.23/2.x we're always getting 0. I've noticed that there was some refactorization in FileSystem counter related code and found this issue requesting backward compatibility.
Included patch seems to be adding counter "FileSystemCounter":
hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java:84
legacyMap.put( "FileSystemCounter" , FileSystemCounter.class.getName());
But it appears that original name is "FileSystemCounters" (Notice the plural "s" at the end of name):
src/mapred/org/apache/hadoop/mapred/Task.java:91 (0.20.2)
protected static final String FILESYSTEM_COUNTER_GROUP = "FileSystemCounters" ;
src/mapred/org/apache/hadoop/mapred/Task.java:109 (1.0.3)
protected static final String FILESYSTEM_COUNTER_GROUP = "FileSystemCounters" ;
I therefore believe that this counter should be renamed in order to provide backward compatibility. I might fix this discrepancy in Sqoop, but I believe that other projects/users might also be affected and therefore it would be better to fix it in upstream. I wanted to reopen this ticket, but apparently I do not have enough privileges to do so. Could I ask anyone with proper privileges to do that or should I create new JIRA instead?

Jarek Jarcec Cecho
added a comment - 13/Aug/12 08:10 I've provided fix to rename the backward compatible name to the original name that is present in Hadoop 0.20 and Hadoop 1.0.3.
I've also checked linked Pig sources to see if this change won't break them. They seems to have special classes for handling differences between hadoop versions:
shims/src/hadoop23/org/apache/pig/backend/hadoop/executionengine/shims/HadoopShims.java:83
static public String getFsCounterGroupName() {
return "org.apache.hadoop.mapreduce.FileSystemCounter" ;
}
shims/src/hadoop20/org/apache/pig/backend/hadoop/executionengine/shims/HadoopShims.java:85
static public String getFsCounterGroupName() {
return "FileSystemCounters" ;
}
I therefore believe that this change will not affect pig.