|
17 | 17 | # specific language governing permissions and limitations |
18 | 18 | # under the License. |
19 | 19 | # |
20 | | -# Idempotent setup for regression tests. Run manually or let run.sh auto-run. |
| 20 | +################################### |
| 21 | +# Idempotent setup for spark regression tests. Run manually or let run.sh auto-run. |
21 | 22 | # |
22 | 23 | # Warning - first time setup may download large amounts of files |
23 | 24 | # Warning - may clobber conf/spark-defaults.conf |
| 25 | +# Warning - it will set the SPARK_HOME environment variable with the spark setup |
| 26 | +# |
| 27 | +# The script can be called independently like following |
| 28 | +# ./setup.sh --sparkVersion ${SPARK_VERSION} --scalaVersion ${SCALA_VERSION} --jar ${JAR_PATH} |
| 29 | +# Required Parameters: |
| 30 | +# --sparkVersion : the spark version to setup |
| 31 | +# --scalaVersion : the scala version of spark to setup |
| 32 | +# --jar : path to the local Polaris Spark client jar |
| 33 | +# |
24 | 34 |
|
25 | 35 | set -x |
26 | 36 |
|
@@ -131,12 +141,15 @@ spark.sql.variable.substitute true |
131 | 141 | spark.driver.extraJavaOptions -Dderby.system.home=${DERBY_HOME} |
132 | 142 |
|
133 | 143 | spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions,io.delta.sql.DeltaSparkSessionExtension |
| 144 | +# this configuration is needed for delta table |
134 | 145 | spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog |
135 | 146 | spark.sql.catalog.polaris=org.apache.polaris.spark.SparkCatalog |
136 | | -spark.sql.catalog.polaris.type=rest |
137 | 147 | spark.sql.catalog.polaris.uri=http://${POLARIS_HOST:-localhost}:8181/api/catalog |
| 148 | +# this configuration is used |
138 | 149 | spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials |
139 | 150 | spark.sql.catalog.polaris.client.region=us-west-2 |
| 151 | +# configuration required to ensure DataSourceV2 load works correctly for |
| 152 | +# different table formats |
140 | 153 | spark.sql.sources.useV1SourceList='' |
141 | 154 | EOF |
142 | 155 | echo 'Success!' |
|
0 commit comments