Streamline logging when there is a failure #439
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when there is a failure on an operation (e.g.,
spark.Read().Json(path)
becausepath was invalid
), the JVM side pollutes the logs by printing out unnecessary info such as all the methods belonging to a class of the object in action.This PR proposes to streamline the logging and now it will print out more descriptive one ERROR log line for such a failure:
20/03/03 17:14:34 ERROR DotnetBackendHandler: Failed to execute 'json' on 'org.apache.spark.sql.DataFrameReader' with args=([Type=scala.collection.mutable.WrappedArray.ofRef, Value: WrappedArray(aslkdf)])
The C# side logging remains the same, and you can turn on printing "all methods" by setting the log level to DEBUG.