MAPREDUCE-7430 FileSystemCount enumeration changes will cause mapreduce application failure during upgrade
This commit is contained in:
parent
ca3526da92
commit
a58011dd86
|
@ -311,11 +311,14 @@ public abstract class FileSystemCounterGroup<C extends Counter>
|
||||||
String scheme = WritableUtils.readString(in); // scheme
|
String scheme = WritableUtils.readString(in); // scheme
|
||||||
int numCounters = WritableUtils.readVInt(in); // #counter
|
int numCounters = WritableUtils.readVInt(in); // #counter
|
||||||
for (int j = 0; j < numCounters; ++j) {
|
for (int j = 0; j < numCounters; ++j) {
|
||||||
findCounter(scheme, enums[WritableUtils.readVInt(in)]) // key
|
int countTypeIndex = WritableUtils.readVInt(in);
|
||||||
|
if (countTypeIndex < enums.length) {
|
||||||
|
findCounter(scheme, enums[countTypeIndex]) // key
|
||||||
.setValue(WritableUtils.readVLong(in)); // value
|
.setValue(WritableUtils.readVLong(in)); // value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterator<C> iterator() {
|
public Iterator<C> iterator() {
|
||||||
|
|
Loading…
Reference in New Issue