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

[POAE7-858] disable RDD cache related PMem intialization as default and add PMem related logic in SparkEnv #18

Merged
merged 4 commits into from
Mar 8, 2021

Conversation

yma11
Copy link
Contributor

@yma11 yma11 commented Mar 1, 2021

What changes were proposed in this pull request?

disable RDD cache related PMem intialization as default and add PMem related logic in SparkEnv

How was this patch tested?

Q64 tested

@@ -0,0 +1,509 @@
/*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per discussed, let's divide this into two steps: 1. commit Spark files as it is; 2. update our changes. This can reduce a little bit maintenance effort from version to version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate PR submitted. Let's merge this one after that one merged.

@@ -35,7 +35,7 @@ public PMemReaderForUnsafeExternalSorter(
this.numRecordsRemaining = numRecords - position/2;
this.taskMetrics = taskMetrics;
int readBufferSize = SparkEnv.get() == null? 8 * 1024 * 1024 :
(int) SparkEnv.get().conf().get(package$.MODULE$.MEMORY_SPILL_PMEM_READ_BUFFERSIZE());
(int) (long) SparkEnv.get().conf().get(package$.MODULE$.MEMORY_SPILL_PMEM_READ_BUFFERSIZE());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is referring other similar usages in Vanilla Spark.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, didn't think up why they didn't use a getLong API? That seems better.

@winningsix winningsix merged commit 6a5b99c into oap-project:master Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants