5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-05 02:22:35 +08:00

SQOOP-1036: Sqoop2: JobClient.getCounters can return NULL

(Jarek Jarcec Cecho via Kate Ting)
This commit is contained in:
Kate Ting 2013-05-11 20:46:45 -04:00
parent 66dd617da2
commit a52993a934

View File

@ -402,6 +402,10 @@ protected SubmissionStatus convertMapreduceState(int status) {
private Counters convertMapreduceCounters(org.apache.hadoop.mapred.Counters hadoopCounters) {
Counters sqoopCounters = new Counters();
if(hadoopCounters == null) {
return sqoopCounters;
}
for(org.apache.hadoop.mapred.Counters.Group hadoopGroup : hadoopCounters) {
CounterGroup sqoopGroup = new CounterGroup(hadoopGroup.getName());
for(org.apache.hadoop.mapred.Counters.Counter hadoopCounter : hadoopGroup) {