dataproc-spark-connect 1.0.0rc7__py2.py3-none-any.whl → 1.0.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataproc-spark-connect
3
- Version: 1.0.0rc7
3
+ Version: 1.0.2
4
4
  Summary: Dataproc client library for Spark Connect
5
5
  Home-page: https://github.com/GoogleCloudDataproc/dataproc-spark-connect-python
6
6
  Author: Google LLC
@@ -10,7 +10,7 @@ License-File: LICENSE
10
10
  Requires-Dist: google-api-core>=2.19
11
11
  Requires-Dist: google-cloud-dataproc>=5.18
12
12
  Requires-Dist: packaging>=20.0
13
- Requires-Dist: pyspark-client~=4.0.0
13
+ Requires-Dist: pyspark[connect]~=4.0.0
14
14
  Requires-Dist: tqdm>=4.67
15
15
  Requires-Dist: websockets>=14.0
16
16
  Dynamic: author
@@ -1,13 +1,13 @@
1
- dataproc_spark_connect-1.0.0rc7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1
+ dataproc_spark_connect-1.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
2
  google/cloud/dataproc_spark_connect/__init__.py,sha256=dIqHNWVWWrSuRf26x11kX5e9yMKSHCtmI_GBj1-FDdE,1101
3
3
  google/cloud/dataproc_spark_connect/environment.py,sha256=o5WRKI1vyIaxZ8S2UhtDer6pdi4CXYRzI9Xdpq5hVkQ,2771
4
4
  google/cloud/dataproc_spark_connect/exceptions.py,sha256=iwaHgNabcaxqquOpktGkOWKHMf8hgdPQJUgRnIbTXVs,970
5
5
  google/cloud/dataproc_spark_connect/pypi_artifacts.py,sha256=gd-VMwiVP-EJuPp9Vf9Shx8pqps3oSKp0hBcSSZQS-A,1575
6
- google/cloud/dataproc_spark_connect/session.py,sha256=ntkuGzONtC3vXooUnHlHwhY32HP0hB4O9Ze-LVCAlKk,55470
6
+ google/cloud/dataproc_spark_connect/session.py,sha256=nmkwHAwg5PmP4ZXlxiQpQX3NhR678Ru90GHSSvIGwCg,56586
7
7
  google/cloud/dataproc_spark_connect/client/__init__.py,sha256=6hCNSsgYlie6GuVpc5gjFsPnyeMTScTpXSPYqp1fplY,615
8
8
  google/cloud/dataproc_spark_connect/client/core.py,sha256=GRc4OCTBvIvdagjxOPoDO22vLtt8xDSerdREMRDeUBY,4659
9
9
  google/cloud/dataproc_spark_connect/client/proxy.py,sha256=qUZXvVY1yn934vE6nlO495XUZ53AUx9O74a9ozkGI9U,8976
10
- dataproc_spark_connect-1.0.0rc7.dist-info/METADATA,sha256=eln8dtAOo-JrzHyxOdLoTLc0a0MyvLQk9ZfGXySiSRY,6841
11
- dataproc_spark_connect-1.0.0rc7.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
12
- dataproc_spark_connect-1.0.0rc7.dist-info/top_level.txt,sha256=_1QvSJIhFAGfxb79D6DhB7SUw2X6T4rwnz_LLrbcD3c,7
13
- dataproc_spark_connect-1.0.0rc7.dist-info/RECORD,,
10
+ dataproc_spark_connect-1.0.2.dist-info/METADATA,sha256=Hfx8Bf5h1XriYTfwKK6jIKYCfMafCAhs0fgl58qoxOg,6840
11
+ dataproc_spark_connect-1.0.2.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
12
+ dataproc_spark_connect-1.0.2.dist-info/top_level.txt,sha256=_1QvSJIhFAGfxb79D6DhB7SUw2X6T4rwnz_LLrbcD3c,7
13
+ dataproc_spark_connect-1.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -39,6 +39,7 @@ from google.api_core.exceptions import (
39
39
  PermissionDenied,
40
40
  )
41
41
  from google.api_core.future.polling import POLLING_PREDICATE
42
+ from google.auth.exceptions import DefaultCredentialsError
42
43
  from google.cloud.dataproc_spark_connect.client import DataprocChannelBuilder
43
44
  from google.cloud.dataproc_spark_connect.exceptions import DataprocSparkConnectException
44
45
  from google.cloud.dataproc_spark_connect.pypi_artifacts import PyPiArtifacts
@@ -456,6 +457,15 @@ class DataprocSparkSession(SparkSession):
456
457
  raise DataprocSparkConnectException(
457
458
  f"Error while creating Dataproc Session: {e.message}"
458
459
  )
460
+ except DefaultCredentialsError as e:
461
+ stop_create_session_pbar_event.set()
462
+ if create_session_pbar_thread.is_alive():
463
+ create_session_pbar_thread.join()
464
+ DataprocSparkSession._active_s8s_session_id = None
465
+ DataprocSparkSession._active_session_uses_custom_id = False
466
+ raise DataprocSparkConnectException(
467
+ "Credentials error while creating Dataproc Session (see https://docs.cloud.google.com/docs/authentication/provide-credentials-adc for more info)"
468
+ ) from e
459
469
  except Exception as e:
460
470
  stop_create_session_pbar_event.set()
461
471
  if create_session_pbar_thread.is_alive():
@@ -592,6 +602,16 @@ class DataprocSparkSession(SparkSession):
592
602
  session = PySparkSQLSession.builder.getOrCreate()
593
603
  return session # type: ignore
594
604
 
605
+ if self._project_id is None:
606
+ raise DataprocSparkConnectException(
607
+ f"Error while creating Dataproc Session: project ID is not set"
608
+ )
609
+
610
+ if self._region is None:
611
+ raise DataprocSparkConnectException(
612
+ f"Error while creating Dataproc Session: location is not set"
613
+ )
614
+
595
615
  # Handle custom session ID by setting it early and letting existing logic handle it
596
616
  if self._custom_session_id:
597
617
  self._handle_custom_session_id()