Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Catch NPEs in RMContainerAllocator#handleJobPriorityChange for compat…
Browse files Browse the repository at this point in the history
…ibility with older clusters
  • Loading branch information
sjrand committed Jul 28, 2020
1 parent 3413ab5 commit 37d2816
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,17 @@ private void handleUpdatedNodes(AllocateResponse response) {
}

private void handleJobPriorityChange(AllocateResponse response) {
Priority priorityFromResponse = Priority.newInstance(response
.getApplicationPriority().getPriority());
Priority priority = Priority.newInstance(0);
try {
priority = Priority.newInstance(response
.getApplicationPriority().getPriority());
} catch (Exception e) {
// palantir-hadoop only: ignore NPEs for compatibility with older clusters, along with
// any other exceptions to reduce iteration cycles
}

// Update the job priority to Job directly.
getJob().setJobPriority(priorityFromResponse);
getJob().setJobPriority(priority);
}

@Private
Expand Down
1 change: 1 addition & 0 deletions palantir/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Based on Apache Hadoop tag `release-2.9.2-RC0`.
* Manual backport of [HADOOP-15938](https://issues.apache.org/jira/browse/HADOOP-15938)
* Comment out s3guard quantile creation in S3AInstrumentation as more aggressive version of [HADOOP-16278](https://issues.apache.org/jira/browse/HADOOP-16278)
* Use wildfly-openssl in Azure Blob Store connector
* Catch NPEs in RMContainerAllocator#handleJobPriorityChange for compatibility with older clusters

# 2.9.2-palantir.9

Expand Down

0 comments on commit 37d2816

Please sign in to comment.