[SPARK-36096][CORE] Grouping exception in core/resource#33554
[SPARK-36096][CORE] Grouping exception in core/resource#33554dgd-contributor wants to merge 6 commits intoapache:masterfrom
Conversation
|
Can one of the admins verify this patch? |
c28c66e to
2cf6690
Compare
| new SparkException("Checkpoint dir must be specified.") | ||
| } | ||
|
|
||
| def acquireAnAddressNotExistError(resourceName: String, address: String): Throwable = { |
There was a problem hiding this comment.
acquireNonExistingAddressError
| s"address $address doesn't exist.") | ||
| } | ||
|
|
||
| def acquireAnAddressNotAvailableError(resourceName: String, address: String): Throwable = { |
There was a problem hiding this comment.
acquireUnavailableAddressError
| s"$resourceName address $address is not available.") | ||
| } | ||
|
|
||
| def releaseAnAddressNotExistError(resourceName: String, address: String): Throwable = { |
There was a problem hiding this comment.
releaseNonExistingAddressError
| s"address $address doesn't exist.") | ||
| } | ||
|
|
||
| def releaseAnAddressNotAssignedError(resourceName: String, address: String): Throwable = { |
There was a problem hiding this comment.
releaseUnassignedAddressError
| "doesn't exist!") | ||
| } | ||
|
|
||
| def expectUseResourceButNotSpecifyADiscoveryScriptError(resourceName: String): Throwable = { |
There was a problem hiding this comment.
noDiscoveryScriptSpecifiedError
| new SparkException(s"You must specify an amount for ${str}") | ||
| } | ||
|
|
||
| def tasksSupportFractionalResourceError(componentName: String): Throwable = { |
There was a problem hiding this comment.
fractionalResourcesUnsupportedError
| s"Only tasks support fractional resources, please check your $componentName settings") | ||
| } | ||
|
|
||
| def ParsingResourceFileError(resourcesFile: String, e: Throwable): Throwable = { |
There was a problem hiding this comment.
failToParseResourceFileError
| new SparkException(s"Error parsing resources file $resourcesFile", e) | ||
| } | ||
|
|
||
| def conditionOfTheNumberOfCoresPerExecutorError(execCores: Int, taskCpus: Int): Throwable = { |
There was a problem hiding this comment.
numCoresPerExecutorLessThanNumCPUsPerTaskError
| s"${str}") | ||
| } | ||
|
|
||
| def adjustConfigurationError( |
There was a problem hiding this comment.
adjustConfigurationofCoresError
| """.stripMargin.replaceAll("\n", " ")) | ||
| } | ||
|
|
||
| def adjustConfigurationError( |
There was a problem hiding this comment.
adjustConfigurationOfResourceError
|
cc @mridulm @cloud-fan can you review this |
|
Thanks for your reviews. As we and @HyukjinKwon discussed contributing by sharing accounts, we will close this PR and recreate another by individual account. Please see PR #34192 |
What changes were proposed in this pull request?
This PR group exception messages in core/src/main/scala/org/apache/spark/resource
Why are the changes needed?
It will largely help with standardization of error messages and its maintenance.
Does this PR introduce any user-facing change?
No. Error messages remain unchanged.
How was this patch tested?
No new tests - pass all original tests to make sure it doesn't break any existing behavior.