Skip to content

Commit dd8d127

Browse files
JoshRosenMaxGekk
authored andcommitted
[SPARK-49650][SQL][DOCS] Updates references to deprecated Hive JDBC client params in tests and docs
### What changes were proposed in this pull request? This PR updates unit tests and docs to update references to long-deprecated Hive JDBC client connection string parameters. The current docs and some test code are using parameters that have been deprecated for nearly a decade since https://issues.apache.org/jira/browse/HIVE-6972 / apache/hive@07082e8 , so I think it's safe to clean up the usages now. ### Why are the changes needed? While looking at some hive-thriftserver unit tests logs, I saw repeated spam of ``` 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: ***** JDBC param deprecation ***** 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: The use of hive.server2.transport.mode is deprecated. 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: Please use transportMode like so: jdbc:hive2://<host>:<port>/dbName;transportMode=<transport_mode_value> 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: ***** JDBC param deprecation ***** 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: The use of hive.server2.thrift.http.path is deprecated. 20/06/05 06:35:55.442 pool-1-thread-1 WARN Utils: Please use httpPath like so: jdbc:hive2://<host>:<port>/dbName;httpPath=<http_path_value> ``` ### Does this PR introduce _any_ user-facing change? No, it's just a test + documentation change, recommending syntax which has been long-supported (some tests were [already using the new parameters](https://github.com/apache/spark/blob/d3eb99f79e508d62fdb7e9bc595f0240ac021df5/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SharedThriftServer.scala#L81-L85)). ### How was this patch tested? Existing tests (let's wait to confirm that they pass in CI). ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48114 from JoshRosen/avoid-using-deprecated-hive-params. Lead-authored-by: Josh Rosen <[email protected]> Co-authored-by: Josh Rosen <[email protected]> Signed-off-by: Max Gekk <[email protected]>
1 parent db84681 commit dd8d127

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/sql-distributed-sql-engine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Use the following setting to enable HTTP mode as system property or in `hive-sit
8383

8484
To test, use beeline to connect to the JDBC/ODBC server in http mode with:
8585

86-
beeline> !connect jdbc:hive2://<host>:<port>/<database>?hive.server2.transport.mode=http;hive.server2.thrift.http.path=<http_endpoint>
86+
beeline> !connect jdbc:hive2://<host>:<port>/<database>;transportMode=http;httpPath=<http_endpoint>
8787

8888
If you closed a session and do CTAS, you must set `fs.%s.impl.disable.cache` to true in `hive-site.xml`.
8989
See more details in [[SPARK-21067]](https://issues.apache.org/jira/browse/SPARK-21067).
@@ -94,4 +94,4 @@ To use the Spark SQL command line interface (CLI) from the shell:
9494

9595
./bin/spark-sql
9696

97-
For details, please refer to [Spark SQL CLI](sql-distributed-sql-engine-spark-sql-cli.html)
97+
For details, please refer to [Spark SQL CLI](sql-distributed-sql-engine-spark-sql-cli.html)

sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,9 +1430,9 @@ abstract class HiveThriftServer2TestBase extends SparkFunSuite with BeforeAndAft
14301430

14311431
protected def jdbcUri(database: String = "default"): String = if (mode == ServerMode.http) {
14321432
s"""jdbc:hive2://$localhost:$serverPort/
1433-
|$database?
1434-
|hive.server2.transport.mode=http;
1435-
|hive.server2.thrift.http.path=cliservice;
1433+
|$database;
1434+
|transportMode=http;
1435+
|httpPath=cliservice;?
14361436
|${hiveConfList}#${hiveVarList}
14371437
""".stripMargin.split("\n").mkString.trim
14381438
} else {

0 commit comments

Comments
 (0)