You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/10/13 00:25:00 UTC
[jira] [Commented] (MAPREDUCE-7454) missing checking for null when acquiring appId for a null jobId
[ https://issues.apache.org/jira/browse/MAPREDUCE-7454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029369#comment-18029369 ]
ASF GitHub Bot commented on MAPREDUCE-7454:
-------------------------------------------
github-actions[bot] commented on PR #6049:
URL: https://github.com/apache/hadoop/pull/6049#issuecomment-3395512700
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again.
Thanks all for your contribution.
> missing checking for null when acquiring appId for a null jobId
> ---------------------------------------------------------------
>
> Key: MAPREDUCE-7454
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7454
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: ConfX
> Priority: Critical
> Labels: pull-request-available
> Attachments: reproduce.sh
>
>
> h2. What happened?
> null pointer exception is triggered when trying to acquire appId for a null jobId
> h2. Where's the bug?
> In line 90 of JobResourceUploader.java:
> {code:java}
> private ApplicationId jobIDToAppId(JobID jobId) {
> return ApplicationId.newInstance(Long.parseLong(jobId.getJtIdentifier()),
> jobId.getId());
> }
> {code}
> Here the jobId is not checked before generating the `ApplicationId` for it.
> h2. How to reproduce?
> 1. set {{mapreduce.job.sharedcache.mode=archives, mapreduce.framework.name=yarn, yarn.sharedcache.enabled=true}}
> 2. run {{org.apache.hadoop.mapreduce.TestJobResourceUploader#testErasureCodingDisabled}}
> and observe this exception:
> {code:java}
> java.lang.NullPointerException
> at org.apache.hadoop.mapreduce.JobResourceUploader.jobIDToAppId(JobResourceUploader.java:91)
> at org.apache.hadoop.mapreduce.JobResourceUploader.initSharedCache(JobResourceUploader.java:79)
> at org.apache.hadoop.mapreduce.JobResourceUploader.uploadResources(JobResourceUploader.java:134)
> at org.apache.hadoop.mapreduce.TestJobResourceUploader.testErasureCodingSetting(TestJobResourceUploader.java:442)
> at org.apache.hadoop.mapreduce.TestJobResourceUploader.testErasureCodingDisabled(TestJobResourceUploader.java:380)
> {code}
> For an easy reproduction, run the {{reproduce.sh}} in the attachment.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org