You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/12/24 02:38:45 UTC
[GitHub] [hadoop] Daniel-009497 commented on a diff in pull request #5255: MAPREDUCE-7430 FileSystemCount enumeration changes will cause mapreduce application failure during upgrade
Daniel-009497 commented on code in PR #5255:
URL: https://github.com/apache/hadoop/pull/5255#discussion_r1056717417
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/FileSystemCounterGroup.java:
##########
@@ -311,8 +311,11 @@ public void readFields(DataInput in) throws IOException {
String scheme = WritableUtils.readString(in); // scheme
int numCounters = WritableUtils.readVInt(in); // #counter
for (int j = 0; j < numCounters; ++j) {
- findCounter(scheme, enums[WritableUtils.readVInt(in)]) // key
+ int countTypeIndex = WritableUtils.readVInt(in);
+ if(countTypeIndex < enums.length) {
Review Comment:
> nit: can you add a space between if and (
@steveloughran
Thanks for review, fixed as you mentioned.
I have try to write a UT but it's not that easy to construct the scenario,
Just simple fix, I think it is ok without UT.
Pls help to merge once the pipeline is done,
Thanks a lot
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org