Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Aug 15, 2017

What changes were proposed in this pull request?

This PR changes the codes to lazily init hive metastore client so that we can create SparkSession without talking to the hive metastore sever.

It's pretty helpful when you set a hive metastore server but it's down. You can still start the Spark shell to debug.

How was this patch tested?

The new unit test.

@zsxwing
Copy link
Member Author

zsxwing commented Aug 15, 2017

cc @yhuai

@@ -0,0 +1,57 @@
/*
Copy link
Member Author

Choose a reason for hiding this comment

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

This test is in hive-thriftserver is because tests in the hive project use a shared singleton HiveContext and I cannot create a new one in the same project.

@yhuai
Copy link
Contributor

yhuai commented Aug 15, 2017

lgtm

@SparkQA
Copy link

SparkQA commented Aug 15, 2017

Test build #80651 has finished for PR 18944 at commit 9eb9149.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Aug 15, 2017

retest this please

@SparkQA
Copy link

SparkQA commented Aug 15, 2017

Test build #80655 has finished for PR 18944 at commit 9eb9149.

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

@gatorsmile
Copy link
Member

Thanks! Merging to master.

@asfgit asfgit closed this in 12411b5 Aug 15, 2017
@zsxwing zsxwing deleted the hive-lazy-init branch August 15, 2017 06:55
ghost pushed a commit to dbtsai/spark that referenced this pull request Mar 2, 2018
… read and write data frames

## What changes were proposed in this pull request?

apache#18944 added one patch, which allowed a spark session to be created when the hive metastore server is down. However, it did not allow running any commands with the spark session. This brings troubles to the user who only wants to read / write data frames without metastore setup.

## How was this patch tested?

Added some unit tests to read and write data frames based on the original HiveMetastoreLazyInitializationSuite.

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Feng Liu <[email protected]>

Closes apache#20681 from liufengdb/completely-lazy.
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.

4 participants