Skip to content

Conversation

@WeiWenda
Copy link
Collaborator

@WeiWenda WeiWenda commented Sep 25, 2019

What changes were proposed in this pull request
If user's .hiverc contains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of local SparkSession's XSQLSessionCatalog in the beginning. When some sql causes SparkSession restart to run on yarn, the old XSQLSessionCatalog is passed to new started SparkSession. It's meaning that funA has existed in functionRegistry. So we should not run .hiverc again after SparkSession is restarted.

@WeiWenda WeiWenda added the bug Something isn't working label Sep 25, 2019
@beliefer
Copy link
Collaborator

Could you add What changes were proposed in this pull request? ? you can reference the other PR.

@beliefer
Copy link
Collaborator

beliefer commented Sep 25, 2019

.hiverc -> .hiverc
XSQLSessionCatalog
SparkSession

sc = spark.sparkContext
processInitFile(conf)
// we shouldn't load .hiverc twice
// processInitFile(conf)
Copy link
Collaborator

Choose a reason for hiding this comment

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

processInitFile is only used for load .hiverc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

processInitFile is only used for load .hiverc?

Yes

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should change coment as 'Don't call processInitFile again to avoid load .hiverc twice.'

beliefer pushed a commit that referenced this pull request Sep 29, 2019
…45

**What changes were proposed in this pull request**
If user's `.hiverc` contains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of local `SparkSession`'s `XSQLSessionCatalog` in the beginning. When some sql causes `SparkSession` restart to run on yarn,  the old `XSQLSessionCatalog` is passed to new started `SparkSession`. It's meaning that funA has existed in functionRegistry. So we should not run `.hiverc` again after SparkSession is restarted.
beliefer pushed a commit that referenced this pull request Sep 29, 2019
…45

**What changes were proposed in this pull request**
If user's `.hiverc` contains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of local `SparkSession`'s `XSQLSessionCatalog` in the beginning. When some sql causes `SparkSession` restart to run on yarn,  the old `XSQLSessionCatalog` is passed to new started `SparkSession`. It's meaning that funA has existed in functionRegistry. So we should not run `.hiverc` again after SparkSession is restarted.
@beliefer
Copy link
Collaborator

Thanks! Merged to master and branch-0.6

@beliefer beliefer closed this Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants