Skip to content

Commit 4da4ea5

Browse files
authored
Merge pull request #287597 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents f095de0 + 7e176ab commit 4da4ea5

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

articles/synapse-analytics/spark/apache-spark-external-metastore.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ Azure Synapse Analytics allows Apache Spark pools in the same workspace to share
2121

2222
The feature works with Spark 3.1. The following table shows the supported Hive Metastore versions for each Spark version.
2323

24-
|Spark Version|HMS 0.13.X|HMS 1.2.X|HMS 2.1.X|HMS 2.3.x|HMS 3.1.X|
25-
|--|--|--|--|--|--|
26-
|2.4|Yes|Yes|Yes|Yes|No|
27-
|3.1|Yes|Yes|Yes|Yes|Yes|
24+
|Spark Version|HMS 2.3.x|HMS 3.1.X|
25+
|--|--|--|
26+
|3.3|Yes|Yes|
2827

2928

3029
## Set up linked service to Hive Metastore
@@ -97,9 +96,11 @@ Here are the configurations and descriptions:
9796
9897
|Spark config|Description|
9998
|--|--|
100-
|`spark.sql.hive.metastore.version`|Supported versions: <ul><li>`0.13`</li><li>`1.2`</li><li>`2.1`</li><li>`2.3`</li><li>`3.1`</li></ul> Make sure you use the first 2 parts without the 3rd part|
101-
|`spark.sql.hive.metastore.jars`|<ul><li>Version 0.13: `/opt/hive-metastore/lib-0.13/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*` </li><li>Version 1.2: `/opt/hive-metastore/lib-1.2/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*` </li><li>Version 2.1: `/opt/hive-metastore/lib-2.1/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*` </li><li>Version 2.3: `/opt/hive-metastore/lib-2.3/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*` </li><li>Version 3.1: `/opt/hive-metastore/lib-3.1/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*`</li></ul>|
99+
|`spark.sql.hive.metastore.version`|Supported versions: <ul><li>`2.3`</li><li>`3.1`</li></ul> Make sure you use the first 2 parts without the 3rd part|
100+
|`spark.sql.hive.metastore.jars`|<ul><li>Version 2.3: `/opt/hive-metastore/lib-2.3/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*` </li><li>Version 3.1: `/opt/hive-metastore/lib-3.1/*:/usr/hdp/current/hadoop-client/lib/*:/usr/hdp/current/hadoop-client/*`</li></ul>|
102101
|`spark.hadoop.hive.synapse.externalmetastore.linkedservice.name`|Name of your linked service|
102+
|`spark.sql.hive.metastore.sharedPrefixes`|`com.mysql.jdbc,com.microsoft.sqlserver,com.microsoft.vegas`|
103+
103104

104105
### Configure at Spark pool level
105106
When creating the Spark pool, under **Additional Settings** tab, put below configurations in a text file and upload it in **Apache Spark configuration** section. You can also use the context menu for an existing Spark pool, choose Apache Spark configuration to add these configurations.
@@ -112,14 +113,16 @@ Update metastore version and linked service name, and save below configs in a te
112113
spark.sql.hive.metastore.version <your hms version, Make sure you use the first 2 parts without the 3rd part>
113114
spark.hadoop.hive.synapse.externalmetastore.linkedservice.name <your linked service name>
114115
spark.sql.hive.metastore.jars /opt/hive-metastore/lib-<your hms version, 2 parts>/*:/usr/hdp/current/hadoop-client/lib/*
116+
spark.sql.hive.metastore.sharedPrefixes com.mysql.jdbc,com.microsoft.sqlserver,com.microsoft.vegas
115117
```
116118

117-
Here is an example for metastore version 2.1 with linked service named as HiveCatalog21:
119+
Here is an example for metastore version 2.3 with linked service named as HiveCatalog21:
118120

119121
```properties
120-
spark.sql.hive.metastore.version 2.1
122+
spark.sql.hive.metastore.version 2.3
121123
spark.hadoop.hive.synapse.externalmetastore.linkedservice.name HiveCatalog21
122-
spark.sql.hive.metastore.jars /opt/hive-metastore/lib-2.1/*:/usr/hdp/current/hadoop-client/lib/*
124+
spark.sql.hive.metastore.jars /opt/hive-metastore/lib-2.3/*:/usr/hdp/current/hadoop-client/lib/*
125+
spark.sql.hive.metastore.sharedPrefixes com.mysql.jdbc,com.microsoft.sqlserver,com.microsoft.vegas
123126
```
124127

125128
### Configure at Spark session level
@@ -131,7 +134,8 @@ For notebook session, you can also configure the Spark session in notebook using
131134
"conf":{
132135
"spark.sql.hive.metastore.version":"<your hms version, 2 parts>",
133136
"spark.hadoop.hive.synapse.externalmetastore.linkedservice.name":"<your linked service name>",
134-
"spark.sql.hive.metastore.jars":"/opt/hive-metastore/lib-<your hms version, 2 parts>/*:/usr/hdp/current/hadoop-client/lib/*"
137+
"spark.sql.hive.metastore.jars":"/opt/hive-metastore/lib-<your hms version, 2 parts>/*:/usr/hdp/current/hadoop-client/lib/*",
138+
"spark.sql.hive.metastore.sharedPrefixes":"com.mysql.jdbc,com.microsoft.sqlserver,com.microsoft.vegas"
135139
}
136140
}
137141
```

0 commit comments

Comments
 (0)