Skip to content

Commit 3961736

Browse files
committed
Use 127.0.0.1
1 parent 0095db0 commit 3961736

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/SparkConnect/SparkSession.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ public actor SparkSession {
165165
return config("spark.sql.catalogImplementation", "hive")
166166
}
167167

168-
/// Create a new ``SparkSession``. If `spark.remote` is not given, `sc://localhost:15002` is used.
168+
/// Create a new ``SparkSession``. If `spark.remote` is not given, `sc://127.0.0.1:15002` is used.
169169
/// - Returns: A newly created `SparkSession`.
170170
func create() async throws -> SparkSession {
171-
let session = SparkSession(sparkConf["spark.remote"] ?? "sc://localhost:15002")
171+
let session = SparkSession(sparkConf["spark.remote"] ?? "sc://127.0.0.1:15002")
172172
let response = try await session.client.connect(session.sessionID)
173173
await session.setVersion(response.sparkVersion.version)
174174
let isSuccess = try await session.client.setConf(map: sparkConf)

Tests/SparkConnectTests/BuilderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct BuilderTests {
2828
func builderDefault() async throws {
2929
let spark = try await SparkSession.builder.getOrCreate()
3030
#expect(await spark.client.clientType == "swift")
31-
#expect(await spark.client.url.host() == "localhost")
31+
#expect(await spark.client.url.host() == "127.0.0.1")
3232
#expect(await spark.client.url.port == 15002)
3333
await spark.stop()
3434
}

0 commit comments

Comments
 (0)