Skip to content

Conversation

@sev7e0
Copy link
Contributor

@sev7e0 sev7e0 commented Sep 24, 2019

What changes were proposed in this pull request?

When I use ProcfsMetricsGetterSuite for testing, always throw out java.lang.NullPointerException. I think there is a problem with locating new ProcfsMetricsGetter, which will lead to SparkEnv not being initialized in time. This leads to java.lang.NullPointerException when the method is executed.

Why are the changes needed?

For test.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Local testing

@SparkQA
Copy link

SparkQA commented Sep 24, 2019

Test build #4883 has started for PR 25918 at commit 45012d1.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Looks OK to me pending tests. The change makes sense even if it wasn't solving a problem; no need for that to be an instance variable.

@sev7e0
Copy link
Contributor Author

sev7e0 commented Sep 24, 2019

Thanks for your reviewing! @srowen

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29230][CORE][TEST] Fix NullPointerException in the test class ProcfsMetricsGetterSuite [SPARK-29230][CORE][TEST] Fix NPE in ProcfsMetricsGetterSuite Sep 24, 2019
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. I also verified this. NPE happens when we use IntelliJ and this PR fixes that.
Merged to master.

@dongjoon-hyun
Copy link
Member

Thank you, @sev7e0 and @srowen .

@dongjoon-hyun
Copy link
Member

And, welcome to the Apache Spark community, @sev7e0 . You are added to the Apache Spark contributor group and https://issues.apache.org/jira/browse/SPARK-29230 is assigned to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants