Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

SharedState.externalCatalog is marked as a lazy val but actually it's not lazy. We access externalCatalog while initializing SharedState and thus eliminate the effort of lazy val. When creating ExternalCatalog we will try to connect to the metastore and may throw an error, so it makes sense to make it a lazy val in SharedState.

How was this patch tested?

existing tests.

@cloud-fan
Copy link
Contributor Author

cc @gatorsmile

@SparkQA
Copy link

SparkQA commented Jun 2, 2017

Test build #77676 has finished for PR 18187 at commit 7d7331c.

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

@dongjoon-hyun
Copy link
Member

+1, LGTM.

@cloud-fan
Copy link
Contributor Author

thanks for the review, merging to master/2.2!

@asfgit asfgit closed this in d1b80ab Jun 2, 2017
asfgit pushed a commit that referenced this pull request Jun 2, 2017
## What changes were proposed in this pull request?

`SharedState.externalCatalog` is marked as a `lazy val` but actually it's not lazy. We access `externalCatalog` while initializing `SharedState` and thus eliminate the effort of `lazy val`. When creating `ExternalCatalog` we will try to connect to the metastore and may throw an error, so it makes sense to make it a `lazy val` in `SharedState`.

## How was this patch tested?

existing tests.

Author: Wenchen Fan <[email protected]>

Closes #18187 from cloud-fan/minor.

(cherry picked from commit d1b80ab)
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants