From b59f064c8fdbdc070847d34c412be3b180a01066 Mon Sep 17 00:00:00 2001 From: "feng.zhu" Date: Thu, 17 Oct 2019 11:23:58 +0800 Subject: [PATCH] [kap] #15091, remove default database check when init sparkcontext --- assembly/pom.xml | 2 +- common/network-common/pom.xml | 2 +- common/network-shuffle/pom.xml | 2 +- common/network-yarn/pom.xml | 2 +- common/sketch/pom.xml | 2 +- common/tags/pom.xml | 2 +- common/unsafe/pom.xml | 2 +- core/pom.xml | 2 +- examples/pom.xml | 2 +- external/docker-integration-tests/pom.xml | 2 +- external/flume-assembly/pom.xml | 2 +- external/flume-sink/pom.xml | 2 +- external/flume/pom.xml | 2 +- external/kafka-0-10-assembly/pom.xml | 2 +- external/kafka-0-10-sql/pom.xml | 2 +- external/kafka-0-10/pom.xml | 2 +- external/kafka-0-8-assembly/pom.xml | 2 +- external/kafka-0-8/pom.xml | 2 +- external/kinesis-asl-assembly/pom.xml | 2 +- external/kinesis-asl/pom.xml | 2 +- external/spark-ganglia-lgpl/pom.xml | 2 +- graphx/pom.xml | 2 +- launcher/pom.xml | 2 +- mllib-local/pom.xml | 2 +- mllib/pom.xml | 2 +- pom.xml | 2 +- repl/pom.xml | 2 +- resource-managers/mesos/pom.xml | 2 +- resource-managers/yarn/pom.xml | 2 +- sql/catalyst/pom.xml | 2 +- sql/core/pom.xml | 2 +- .../org/apache/spark/sql/internal/SharedState.scala | 12 ------------ sql/hive-thriftserver/pom.xml | 2 +- sql/hive/pom.xml | 2 +- streaming/pom.xml | 2 +- tools/pom.xml | 2 +- 36 files changed, 35 insertions(+), 47 deletions(-) diff --git a/assembly/pom.xml b/assembly/pom.xml index cb5c94d6bbf55..64ae79af5783b 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/common/network-common/pom.xml b/common/network-common/pom.xml index f3f8bed4294eb..c830785e15802 100644 --- a/common/network-common/pom.xml +++ b/common/network-common/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/common/network-shuffle/pom.xml b/common/network-shuffle/pom.xml index 084cc8c40151b..c0190810cdd5e 100644 --- a/common/network-shuffle/pom.xml +++ b/common/network-shuffle/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/common/network-yarn/pom.xml b/common/network-yarn/pom.xml index d950215c8bd13..6a25055ccb8e9 100644 --- a/common/network-yarn/pom.xml +++ b/common/network-yarn/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/common/sketch/pom.xml b/common/sketch/pom.xml index 948040e7f00d7..4aa986b621bb1 100644 --- a/common/sketch/pom.xml +++ b/common/sketch/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/common/tags/pom.xml b/common/tags/pom.xml index 73d7ecd0e9883..d20813db1b28e 100644 --- a/common/tags/pom.xml +++ b/common/tags/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/common/unsafe/pom.xml b/common/unsafe/pom.xml index 3d407da5f7371..ac50a7d08c520 100644 --- a/common/unsafe/pom.xml +++ b/common/unsafe/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/core/pom.xml b/core/pom.xml index d2be114f7d895..230879c6ea642 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/examples/pom.xml b/examples/pom.xml index 75f59202f9011..1bfabcf6c01f8 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/external/docker-integration-tests/pom.xml b/external/docker-integration-tests/pom.xml index 037c216884b14..49519a02b8425 100644 --- a/external/docker-integration-tests/pom.xml +++ b/external/docker-integration-tests/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/flume-assembly/pom.xml b/external/flume-assembly/pom.xml index 6e00d1610a3eb..c11b769846940 100644 --- a/external/flume-assembly/pom.xml +++ b/external/flume-assembly/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/flume-sink/pom.xml b/external/flume-sink/pom.xml index 3ee0bc92d6021..74083c75ca975 100644 --- a/external/flume-sink/pom.xml +++ b/external/flume-sink/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/flume/pom.xml b/external/flume/pom.xml index 7331905e37431..7cca502e5386f 100644 --- a/external/flume/pom.xml +++ b/external/flume/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kafka-0-10-assembly/pom.xml b/external/kafka-0-10-assembly/pom.xml index 2e35f2db073f7..744198e625e25 100644 --- a/external/kafka-0-10-assembly/pom.xml +++ b/external/kafka-0-10-assembly/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kafka-0-10-sql/pom.xml b/external/kafka-0-10-sql/pom.xml index 626b8ccbbba4c..3e636092c8b2f 100644 --- a/external/kafka-0-10-sql/pom.xml +++ b/external/kafka-0-10-sql/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kafka-0-10/pom.xml b/external/kafka-0-10/pom.xml index 606164b389577..0d36bd2ebadf2 100644 --- a/external/kafka-0-10/pom.xml +++ b/external/kafka-0-10/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kafka-0-8-assembly/pom.xml b/external/kafka-0-8-assembly/pom.xml index 871d8fe7346a8..768a8f5a606af 100644 --- a/external/kafka-0-8-assembly/pom.xml +++ b/external/kafka-0-8-assembly/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kafka-0-8/pom.xml b/external/kafka-0-8/pom.xml index 1848b2dc3e0b6..a29883e2366d6 100644 --- a/external/kafka-0-8/pom.xml +++ b/external/kafka-0-8/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kinesis-asl-assembly/pom.xml b/external/kinesis-asl-assembly/pom.xml index f83ddb1cfbcaf..a9867040474ee 100644 --- a/external/kinesis-asl-assembly/pom.xml +++ b/external/kinesis-asl-assembly/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/kinesis-asl/pom.xml b/external/kinesis-asl/pom.xml index fb45262fa1a03..bc148de4c90e2 100644 --- a/external/kinesis-asl/pom.xml +++ b/external/kinesis-asl/pom.xml @@ -20,7 +20,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/external/spark-ganglia-lgpl/pom.xml b/external/spark-ganglia-lgpl/pom.xml index 369ea0527b9f7..50d60c853f1a7 100644 --- a/external/spark-ganglia-lgpl/pom.xml +++ b/external/spark-ganglia-lgpl/pom.xml @@ -20,7 +20,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/graphx/pom.xml b/graphx/pom.xml index 50dee03279e6c..4eaf66b1b84b3 100644 --- a/graphx/pom.xml +++ b/graphx/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/launcher/pom.xml b/launcher/pom.xml index 05f2ffcef8b5f..90ee5b72c4486 100644 --- a/launcher/pom.xml +++ b/launcher/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/mllib-local/pom.xml b/mllib-local/pom.xml index de795e36b449a..5ba3ebee4c5f8 100644 --- a/mllib-local/pom.xml +++ b/mllib-local/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/mllib/pom.xml b/mllib/pom.xml index a4d963fb640f6..c22ca7c32149f 100644 --- a/mllib/pom.xml +++ b/mllib/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/pom.xml b/pom.xml index a0f0b57228d16..2ab2a1d326bf4 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 pom Spark Project Parent POM http://spark.apache.org/ diff --git a/repl/pom.xml b/repl/pom.xml index 2212279e18c43..7639edb25cfca 100644 --- a/repl/pom.xml +++ b/repl/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/resource-managers/mesos/pom.xml b/resource-managers/mesos/pom.xml index a89379244609a..bd631461426ee 100644 --- a/resource-managers/mesos/pom.xml +++ b/resource-managers/mesos/pom.xml @@ -20,7 +20,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/resource-managers/yarn/pom.xml b/resource-managers/yarn/pom.xml index e1448a4e1110e..fbeb52498bce1 100644 --- a/resource-managers/yarn/pom.xml +++ b/resource-managers/yarn/pom.xml @@ -20,7 +20,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/sql/catalyst/pom.xml b/sql/catalyst/pom.xml index e2a9ea064def3..d3cebaf84a2c1 100644 --- a/sql/catalyst/pom.xml +++ b/sql/catalyst/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/sql/core/pom.xml b/sql/core/pom.xml index 760d0d6b0748f..4aeb63e3c834e 100644 --- a/sql/core/pom.xml +++ b/sql/core/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala b/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala index 7202f1222d10f..6baac8243210b 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala @@ -96,18 +96,6 @@ private[sql] class SharedState(val sparkContext: SparkContext) extends Logging { sparkContext.conf, sparkContext.hadoopConfiguration) - val defaultDbDefinition = CatalogDatabase( - SessionCatalog.DEFAULT_DATABASE, - "default database", - CatalogUtils.stringToURI(warehousePath), - Map()) - // Create default database if it doesn't exist - if (!externalCatalog.databaseExists(SessionCatalog.DEFAULT_DATABASE)) { - // There may be another Spark application creating default database at the same time, here we - // set `ignoreIfExists = true` to avoid `DatabaseAlreadyExists` exception. - externalCatalog.createDatabase(defaultDbDefinition, ignoreIfExists = true) - } - // Make sure we propagate external catalog events to the spark listener bus externalCatalog.addListener(new ExternalCatalogEventListener { override def onEvent(event: ExternalCatalogEvent): Unit = { diff --git a/sql/hive-thriftserver/pom.xml b/sql/hive-thriftserver/pom.xml index fdf4dfcc8d6d2..33e4faef10f34 100644 --- a/sql/hive-thriftserver/pom.xml +++ b/sql/hive-thriftserver/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/sql/hive/pom.xml b/sql/hive/pom.xml index 21fe3debcb4a6..1dfa7cc92648c 100644 --- a/sql/hive/pom.xml +++ b/sql/hive/pom.xml @@ -22,7 +22,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../../pom.xml diff --git a/streaming/pom.xml b/streaming/pom.xml index 0bd541c789fe9..d0711d011060b 100644 --- a/streaming/pom.xml +++ b/streaming/pom.xml @@ -21,7 +21,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml diff --git a/tools/pom.xml b/tools/pom.xml index 5b214b3a4c5f7..c0552cb0e492d 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -20,7 +20,7 @@ org.apache.spark spark-parent_2.11 - 2.2.1-kylin-r6 + 2.2.1-kylin-r7 ../pom.xml