Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Apr 14, 2021

What changes were proposed in this pull request?

This PR refactors three parts of the comments in HiveClientImpl.withHiveState

One is about the following comment.

// The classloader in clientLoader could be changed after addJar, always use the latest                                                           
// classloader.

The comment was added in SPARK-10810 (#8909) because IsolatedClientLoader.classLoader was declared as var.
But the field is now val and cannot be changed after instanciation.
So, the comment can confuse developers.

One is about the following code and comment.

// classloader. We explicitly set the context class loader since "conf.setClassLoader" does
// not do that, and the Hive client libraries may need to load classes defined by the client's
// class loader.
Thread.currentThread().setContextClassLoader(clientLoader.classLoader)

It's not trivial why this part is necessary and it's difficult when we can remove this code in the future.
So, I revised the comment by adding the reference of the related JIRA.

And the last one is about the following code and comment.

// Replace conf in the thread local Hive with current conf
Hive.get(conf)

It's also not trivial why this part is necessary.
I revised the comment by adding the reference of the related discussion.

Why are the changes needed?

To make code more readable.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

It's just a comment refactoring so I add no new test.

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41914/

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Test build #137334 has finished for PR 32162 at commit 867b8ad.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@github-actions github-actions bot added the SQL label Apr 14, 2021
@github-actions
Copy link

Test build #750330910 for PR 32162 at commit badeb87.

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41962/

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41962/

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Test build #137385 has finished for PR 32162 at commit badeb87.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • public class VectorizedBLAS extends F2jBLAS
  • trait AnalysisOnlyCommand extends Command
  • implicit class MetadataColumnHelper(attr: Attribute)
  • case class WriteToDataSourceV2(
  • case class WriteToMicroBatchDataSource(

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 checked that the references have correct context.
Merged to master.

@dongjoon-hyun
Copy link
Member

Thank you, @sarutak .

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants