Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-21771][SQL]remove useless hive client in SparkSQLEnv #18983

Closed
wants to merge 1 commit into from
Closed

[SPARK-21771][SQL]remove useless hive client in SparkSQLEnv #18983

wants to merge 1 commit into from

Conversation

yaooqinn
Copy link
Member

What changes were proposed in this pull request?

Once a meta hive client is created, it generates its SessionState which creates a lot of session related directories, some deleteOnExit, some does not. if a hive client is useless we may not create it at the very start.

How was this patch tested?

N/A

cc @hvanhovell @cloud-fan

Once a meta hive client is created, it generates its SessionState which creates a lot of session related directories, some deleteOnExit, some does not. if a hive client is useless we may not create it at the very start.
@yaooqinn
Copy link
Member Author

yaooqinn commented Sep 4, 2017

cc @hvanhovell

@jiangxb1987
Copy link
Contributor

@hvanhovell Is there any specific reason that we still need to create a new metadataHive and redirect its output in SparkSQLEnv.init() ?

@gatorsmile
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Jan 18, 2018

Test build #86361 has finished for PR 18983 at commit 62611cd.

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

@jiangxb1987
Copy link
Contributor

Seems it should be okay to remove all the metadataHive things here.

@yaooqinn
Copy link
Member Author

besides, redirecting output here only is needed when there is an instance of a CliSessionState, otherwise, it will be done during the SessionState initializing in HiveClientImpl

@cloud-fan
Copy link
Contributor

LGTM, although I'm not very familiar with the thrift server code...

@gatorsmile
Copy link
Member

cc @liufengdb

@liufengdb
Copy link

LGTM! It is only created once though.

Frankly, we should completely remove the implementation of newSession() method.

@gatorsmile
Copy link
Member

Thanks! Merged to master/2.3

asfgit pushed a commit that referenced this pull request Jan 19, 2018
## What changes were proposed in this pull request?

Once a meta hive client is created, it generates its SessionState which creates a lot of session related directories, some deleteOnExit, some does not. if a hive client is useless we may not create it at the very start.

## How was this patch tested?
N/A

cc hvanhovell cloud-fan

Author: Kent Yao <11215016@zju.edu.cn>

Closes #18983 from yaooqinn/patch-1.

(cherry picked from commit 793841c)
Signed-off-by: gatorsmile <gatorsmile@gmail.com>
@asfgit asfgit closed this in 793841c Jan 19, 2018
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.

6 participants