Skip to content

[SPARK-15959] [SQL] Add the support of hive.metastore.warehouse.dir back#13679

Closed
yhuai wants to merge 4 commits intoapache:masterfrom
yhuai:hiveWarehouseDir
Closed

[SPARK-15959] [SQL] Add the support of hive.metastore.warehouse.dir back#13679
yhuai wants to merge 4 commits intoapache:masterfrom
yhuai:hiveWarehouseDir

Conversation

@yhuai
Copy link
Contributor

@yhuai yhuai commented Jun 15, 2016

What changes were proposed in this pull request?

This PR adds the support of conf hive.metastore.warehouse.dir back. With this patch, the way of setting the warehouse dir is described as follows:

  • If spark.sql.warehouse.dir is set, hive.metastore.warehouse.dir will be automatically set to the value of spark.sql.warehouse.dir. The warehouse dir is effectively set to the value of spark.sql.warehouse.dir.
  • If spark.sql.warehouse.dir is not set but hive.metastore.warehouse.dir is set, spark.sql.warehouse.dir will be automatically set to the value of hive.metastore.warehouse.dir. The warehouse dir is effectively set to the value of hive.metastore.warehouse.dir.
  • If neither spark.sql.warehouse.dir nor hive.metastore.warehouse.dir is set, hive.metastore.warehouse.dir will be automatically set to the default value of spark.sql.warehouse.dir. The warehouse dir is effectively set to the default value of spark.sql.warehouse.dir.

How was this patch tested?

set hive.metastore.warehouse.dir in HiveSparkSubmitSuite.

JIRA: https://issues.apache.org/jira/browse/SPARK-15959

@yhuai
Copy link
Contributor Author

yhuai commented Jun 15, 2016

cc @rxin @gatorsmile @andrewor14 for review

@rxin
Copy link
Contributor

rxin commented Jun 15, 2016

Can we put this in sql/core so it is not Hive specific?

}

logInfo(s"Warehouse path is '${tempConf.warehousePath}'.")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rxin How about this version? This block is moved to SharedState from HiveSharedState.

Copy link
Member

Choose a reason for hiding this comment

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

You know, I like this change. : )

@SparkQA
Copy link

SparkQA commented Jun 15, 2016

Test build #60553 has finished for PR 13679 at commit bc22e61.

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

@gatorsmile
Copy link
Member

Have a very general question. Based on my understanding, we should introduce our own SQLConf parameter if any HiveConf parameter can control Spark internal behavior. Now, this PR is a very good example to show how to resolve the potential conflicts.

If my above understanding is right, should we create a more general way for handling all the similar cases? Thank you!

@SparkQA
Copy link

SparkQA commented Jun 15, 2016

Test build #60558 has finished for PR 13679 at commit bd5992d.

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

@yhuai
Copy link
Contributor Author

yhuai commented Jun 15, 2016

@gatorsmile What are other confs?

@gatorsmile
Copy link
Member

For example, hive.exec.stagingdir, hive.exec.dynamic.partition, hive.exec.dynamic.partition.mode and so on.

@rxin
Copy link
Contributor

rxin commented Jun 15, 2016

I am not sure if we need those at all...

@rxin
Copy link
Contributor

rxin commented Jun 15, 2016

LGTM - merging in master/2.0.

asfgit pushed a commit that referenced this pull request Jun 15, 2016
## What changes were proposed in this pull request?
This PR adds the support of conf `hive.metastore.warehouse.dir` back. With this patch, the way of setting the warehouse dir is described as follows:
* If `spark.sql.warehouse.dir` is set, `hive.metastore.warehouse.dir` will be automatically set to the value of `spark.sql.warehouse.dir`. The warehouse dir is effectively set to the value of `spark.sql.warehouse.dir`.
* If `spark.sql.warehouse.dir` is not set but `hive.metastore.warehouse.dir` is set, `spark.sql.warehouse.dir` will be automatically set to the value of `hive.metastore.warehouse.dir`. The warehouse dir is effectively set to the value of `hive.metastore.warehouse.dir`.
* If neither `spark.sql.warehouse.dir` nor `hive.metastore.warehouse.dir` is set, `hive.metastore.warehouse.dir` will be automatically set to the default value of `spark.sql.warehouse.dir`. The warehouse dir is effectively set to the default value of `spark.sql.warehouse.dir`.

## How was this patch tested?
`set hive.metastore.warehouse.dir` in `HiveSparkSubmitSuite`.

JIRA: https://issues.apache.org/jira/browse/SPARK-15959

Author: Yin Huai <yhuai@databricks.com>

Closes #13679 from yhuai/hiveWarehouseDir.

(cherry picked from commit e1585cc)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@asfgit asfgit closed this in e1585cc Jun 15, 2016
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