Skip to content

Commit

Permalink
Fix a missed usage of MAX_PARTITION_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 12, 2015
1 parent e3b8855 commit c2ce78e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public UnsafeShuffleWriter(
TaskContext taskContext,
SparkConf sparkConf) throws IOException {
final int numPartitions = handle.dependency().partitioner().numPartitions();
if (numPartitions > PackedRecordPointer.MAXIMUM_PARTITION_ID) {
if (numPartitions > UnsafeShuffleManager.MAX_SHUFFLE_OUTPUT_PARTITIONS()) {
throw new IllegalArgumentException(
"UnsafeShuffleWriter can only be used for shuffles with at most " +
PackedRecordPointer.MAXIMUM_PARTITION_ID + " reduce partitions");
UnsafeShuffleManager.MAX_SHUFFLE_OUTPUT_PARTITIONS() + " reduce partitions");
}
this.blockManager = blockManager;
this.shuffleBlockResolver = shuffleBlockResolver;
Expand Down

0 comments on commit c2ce78e

Please sign in to comment.