File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ def test_log_info_with_exception(self):
7171 self .assertTrue ("msg" in log_json ["exception" ])
7272 self .assertTrue ("stacktrace" in log_json ["exception" ])
7373
74- def test_log_warn (self ):
75- self .logger .warn ("This is an warn log" , user = "test_user_warn" , action = "test_action_warn" )
74+ def test_log_warning (self ):
75+ self .logger .warning ("This is an warn log" , user = "test_user_warn" , action = "test_action_warn" )
7676 log_json = json .loads (self .handler .stream .getvalue ().strip ())
7777
7878 self .assertEqual (log_json ["msg" ], "This is an warn log" )
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ def target() -> None:
212212 with attempt :
213213 self ._stub .ReleaseExecute (request , metadata = self ._metadata )
214214 except Exception as e :
215- logger .warn (f"ReleaseExecute failed with exception: { e } ." )
215+ logger .warning (f"ReleaseExecute failed with exception: { e } ." )
216216
217217 with self ._lock :
218218 if self ._release_thread_pool_instance is not None :
@@ -239,7 +239,7 @@ def target() -> None:
239239 with attempt :
240240 self ._stub .ReleaseExecute (request , metadata = self ._metadata )
241241 except Exception as e :
242- logger .warn (f"ReleaseExecute failed with exception: { e } ." )
242+ logger .warning (f"ReleaseExecute failed with exception: { e } ." )
243243
244244 with self ._lock :
245245 if self ._release_thread_pool_instance is not None :
Original file line number Diff line number Diff line change @@ -1901,7 +1901,7 @@ def _schema(self) -> StructType:
19011901 try :
19021902 self ._cached_schema_serialized = CPickleSerializer ().dumps (self ._schema )
19031903 except Exception as e :
1904- logger .warn (f"DataFrame schema pickle dumps failed with exception: { e } ." )
1904+ logger .warning (f"DataFrame schema pickle dumps failed with exception: { e } ." )
19051905 self ._cached_schema_serialized = None
19061906 return self ._cached_schema
19071907
@@ -1913,7 +1913,7 @@ def schema(self) -> StructType:
19131913 try :
19141914 return CPickleSerializer ().loads (self ._cached_schema_serialized )
19151915 except Exception as e :
1916- logger .warn (f"DataFrame schema pickle loads failed with exception: { e } ." )
1916+ logger .warning (f"DataFrame schema pickle loads failed with exception: { e } ." )
19171917 # In case of pickle ser/de failure, fallback to deepcopy approach.
19181918 return copy .deepcopy (_schema )
19191919
Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ def __del__(self) -> None:
733733 metadata = session .client ._builder .metadata ()
734734 channel (req , metadata = metadata ) # type: ignore[arg-type]
735735 except Exception as e :
736- logger .warn (f"RemoveRemoteCachedRelation failed with exception: { e } ." )
736+ logger .warning (f"RemoveRemoteCachedRelation failed with exception: { e } ." )
737737
738738
739739class Hint (LogicalPlan ):
Original file line number Diff line number Diff line change @@ -943,12 +943,12 @@ def stop(self) -> None:
943943 try :
944944 self .client .release_session ()
945945 except Exception as e :
946- logger .warn (f"session.stop(): Session could not be released. Error: ${ e } " )
946+ logger .warning (f"session.stop(): Session could not be released. Error: ${ e } " )
947947
948948 try :
949949 self .client .close ()
950950 except Exception as e :
951- logger .warn (f"session.stop(): Client could not be closed. Error: ${ e } " )
951+ logger .warning (f"session.stop(): Client could not be closed. Error: ${ e } " )
952952
953953 if self is SparkSession ._default_session :
954954 SparkSession ._default_session = None
@@ -964,7 +964,7 @@ def stop(self) -> None:
964964 try :
965965 PySparkSession ._activeSession .stop ()
966966 except Exception as e :
967- logger .warn (
967+ logger .warning (
968968 "session.stop(): Local Spark Connect Server could not be stopped. "
969969 f"Error: ${ e } "
970970 )
You can’t perform that action at this time.
0 commit comments