You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/27 03:14:09 UTC
[GitHub] [spark] dgd-contributor opened a new pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
dgd-contributor opened a new pull request #33530:
URL: https://github.com/apache/spark/pull/33530
### What changes were proposed in this pull request?
This PR group exception messages in core/src/main/scala/org/apache/spark/storage
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33530:
URL: https://github.com/apache/spark/pull/33530#issuecomment-887176776
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #33530:
URL: https://github.com/apache/spark/pull/33530#issuecomment-894090097
thanks, merging to master!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dgd-contributor commented on pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
dgd-contributor commented on pull request #33530:
URL: https://github.com/apache/spark/pull/33530#issuecomment-888730748
@allisonwang-db I've rebase and resolve all of your suggestions. Can you re-review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan closed pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #33530:
URL: https://github.com/apache/spark/pull/33530
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] allisonwang-db commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r678580293
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
Review comment:
unrecognizedBlockIdError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
Review comment:
cannotSaveBlockOnDecommissionedExecutorError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for async. reregistration", t)
+ }
+
+ def unexpectedShuffleBlockWithUnsupportedResolverError(
+ shuffleManager: ShuffleManager,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Unexpected shuffle block ${blockId} with unsupported shuffle " +
+ s"resolver ${shuffleManager.shuffleBlockResolver}")
+ }
+
+ def failedStoreBlockOnBlockManagerError(
+ blockManagerId: BlockManagerId,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Failure while trying to store block $blockId on $blockManagerId.")
+ }
+
+ def readLockedBlockNotFoundError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId was not found even though it's read-locked")
+ }
+
+ def failedBlockGetEvenHeldALockError(blockId: BlockId): Throwable = {
+ new SparkException(s"get() failed for block $blockId even though we held a lock")
+ }
+
+ def blockNotFoundError(blockId: BlockId): Throwable = {
+ new BlockNotFoundException(blockId.toString)
+ }
+
+ def interruptedError(): Throwable = {
+ new InterruptedException()
+ }
+
+ def blockStatusQueryReturnedNullError(blockId: BlockId): Throwable = {
+ new SparkException(s"BlockManager returned null for BlockStatus query: $blockId")
+ }
+
+ def unexpectedResultBlockManagerMasterEndpointError(): Throwable = {
+ new SparkException("BlockManagerMasterEndpoint returned false, expected true.")
+ }
+
+ def failedCreateDirectoryError(path: String, maxAttempts: Int): Throwable = {
Review comment:
failToCreateDirectoryError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for async. reregistration", t)
+ }
+
+ def unexpectedShuffleBlockWithUnsupportedResolverError(
+ shuffleManager: ShuffleManager,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Unexpected shuffle block ${blockId} with unsupported shuffle " +
+ s"resolver ${shuffleManager.shuffleBlockResolver}")
+ }
+
+ def failedStoreBlockOnBlockManagerError(
+ blockManagerId: BlockManagerId,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Failure while trying to store block $blockId on $blockManagerId.")
+ }
+
+ def readLockedBlockNotFoundError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId was not found even though it's read-locked")
+ }
+
+ def failedBlockGetEvenHeldALockError(blockId: BlockId): Throwable = {
+ new SparkException(s"get() failed for block $blockId even though we held a lock")
+ }
+
+ def blockNotFoundError(blockId: BlockId): Throwable = {
+ new BlockNotFoundException(blockId.toString)
+ }
+
+ def interruptedError(): Throwable = {
+ new InterruptedException()
+ }
+
+ def blockStatusQueryReturnedNullError(blockId: BlockId): Throwable = {
+ new SparkException(s"BlockManager returned null for BlockStatus query: $blockId")
+ }
+
+ def unexpectedResultBlockManagerMasterEndpointError(): Throwable = {
Review comment:
unexpectedBlockManagerMasterEndpointResultError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for async. reregistration", t)
+ }
+
+ def unexpectedShuffleBlockWithUnsupportedResolverError(
+ shuffleManager: ShuffleManager,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Unexpected shuffle block ${blockId} with unsupported shuffle " +
+ s"resolver ${shuffleManager.shuffleBlockResolver}")
+ }
+
+ def failedStoreBlockOnBlockManagerError(
+ blockManagerId: BlockManagerId,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Failure while trying to store block $blockId on $blockManagerId.")
+ }
+
+ def readLockedBlockNotFoundError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId was not found even though it's read-locked")
+ }
+
+ def failedBlockGetEvenHeldALockError(blockId: BlockId): Throwable = {
Review comment:
failToGetBlockWithLockError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
Review comment:
unableToRegisterWithExternalShuffleServerError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
Review comment:
`waitingForReplicationToFinishError(e: Throwable)`
nit: remove the white space after `t`
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for async. reregistration", t)
+ }
+
+ def unexpectedShuffleBlockWithUnsupportedResolverError(
+ shuffleManager: ShuffleManager,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Unexpected shuffle block ${blockId} with unsupported shuffle " +
+ s"resolver ${shuffleManager.shuffleBlockResolver}")
+ }
+
+ def failedStoreBlockOnBlockManagerError(
+ blockManagerId: BlockManagerId,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Failure while trying to store block $blockId on $blockManagerId.")
+ }
+
+ def readLockedBlockNotFoundError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId was not found even though it's read-locked")
+ }
+
+ def failedBlockGetEvenHeldALockError(blockId: BlockId): Throwable = {
+ new SparkException(s"get() failed for block $blockId even though we held a lock")
+ }
+
+ def blockNotFoundError(blockId: BlockId): Throwable = {
+ new BlockNotFoundException(blockId.toString)
+ }
+
+ def interruptedError(): Throwable = {
+ new InterruptedException()
+ }
+
+ def blockStatusQueryReturnedNullError(blockId: BlockId): Throwable = {
+ new SparkException(s"BlockManager returned null for BlockStatus query: $blockId")
+ }
+
+ def unexpectedResultBlockManagerMasterEndpointError(): Throwable = {
+ new SparkException("BlockManagerMasterEndpoint returned false, expected true.")
+ }
+
+ def failedCreateDirectoryError(path: String, maxAttempts: Int): Throwable = {
+ new IOException(
+ s"Failed to create directory ${path} with permission 770 after $maxAttempts attempts!")
+ }
+
+ def unsupportedOperationError(): Throwable = {
+ new UnsupportedOperationException()
+ }
+
+ def noSuchElementError(): Throwable = {
+ new NoSuchElementException()
+ }
+
+ def fetchFailedError(
+ bmAddress: BlockManagerId,
+ shuffleId: Int,
+ mapId: Long,
+ mapIndex: Int,
+ reduceId: Int,
+ message: String,
+ cause: Throwable = null): Throwable = {
+ new FetchFailedException(bmAddress, shuffleId, mapId, mapIndex, reduceId, message, cause)
+ }
+
+ def failedGetNonShuffleBlockError(blockId: BlockId, e: Throwable): Throwable = {
Review comment:
failToGetNonShuffleBlockError
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
Review comment:
nit: extra white space
##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.errors
+
+import java.io.IOException
+
+import org.apache.spark.SparkException
+import org.apache.spark.shuffle.{FetchFailedException, ShuffleManager}
+import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException, UnrecognizedBlockId}
+
+object SparkCoreErrors {
+ def failedParseBlockIdError(name: String): Throwable = {
+ new UnrecognizedBlockId(name)
+ }
+
+ def taskHasNotLockedBlockError(currentTaskAttemptId: Long, blockId: BlockId): Throwable = {
+ new SparkException(s"Task $currentTaskAttemptId has not locked block $blockId for writing")
+ }
+
+ def blockDoesNotExistError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId does not exist")
+ }
+
+ def cannotSaveBlockOnDecommissionExecutorError(blockId: BlockId): Throwable = {
+ new SparkException(s"Block $blockId cannot be saved on decommissioned executor")
+ }
+
+ def waitingForReplicationFinishError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for replication to finish", t)
+ }
+
+ def unableRegisterWithExternalShuffleServerError(t : scala.Throwable): Throwable = {
+ new SparkException(s"Unable to register with external shuffle server due to : ${t.getMessage}",
+ t)
+ }
+
+ def waitingForAsyncReregistrationError(t : scala.Throwable): Throwable = {
+ new SparkException("Error occurred while waiting for async. reregistration", t)
+ }
+
+ def unexpectedShuffleBlockWithUnsupportedResolverError(
+ shuffleManager: ShuffleManager,
+ blockId: BlockId): Throwable = {
+ new SparkException(s"Unexpected shuffle block ${blockId} with unsupported shuffle " +
+ s"resolver ${shuffleManager.shuffleBlockResolver}")
+ }
+
+ def failedStoreBlockOnBlockManagerError(
Review comment:
failToStoreBlockOnBlockManagerError
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dgd-contributor commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
dgd-contributor commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r683414607
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -270,7 +271,7 @@ private[spark] class BlockManager(
// Don't reject broadcast blocks since they may be stored during task exec and
// don't need to be migrated.
if (isDecommissioning() && !blockId.isBroadcast) {
- throw new BlockSavedOnDecommissionedBlockManagerException(blockId)
Review comment:
Done!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] allisonwang-db commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r682868967
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -270,7 +271,7 @@ private[spark] class BlockManager(
// Don't reject broadcast blocks since they may be stored during task exec and
// don't need to be migrated.
if (isDecommissioning() && !blockId.isBroadcast) {
- throw new BlockSavedOnDecommissionedBlockManagerException(blockId)
Review comment:
Good catch. Yes let's keep the original exception classes and avoid changing them during the grouping process. We can make separate PRs in the future to improve quality.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r681648532
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -270,7 +271,7 @@ private[spark] class BlockManager(
// Don't reject broadcast blocks since they may be stored during task exec and
// don't need to be migrated.
if (isDecommissioning() && !blockId.isBroadcast) {
- throw new BlockSavedOnDecommissionedBlockManagerException(blockId)
Review comment:
I think the principle is we should not change the exception class?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dgd-contributor commented on pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
dgd-contributor commented on pull request #33530:
URL: https://github.com/apache/spark/pull/33530#issuecomment-889628639
cc @cloud-fan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] allisonwang-db commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r682868967
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -270,7 +271,7 @@ private[spark] class BlockManager(
// Don't reject broadcast blocks since they may be stored during task exec and
// don't need to be migrated.
if (isDecommissioning() && !blockId.isBroadcast) {
- throw new BlockSavedOnDecommissionedBlockManagerException(blockId)
Review comment:
Good catch. Yes let's keep the original exception classes and avoid changing them during the grouping process. We can make separate PRs in the future to improve quality.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dgd-contributor commented on a change in pull request #33530: [SPARK-36098][CORE] Grouping exception in core/storage
Posted by GitBox <gi...@apache.org>.
dgd-contributor commented on a change in pull request #33530:
URL: https://github.com/apache/spark/pull/33530#discussion_r682229477
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -270,7 +271,7 @@ private[spark] class BlockManager(
// Don't reject broadcast blocks since they may be stored during task exec and
// don't need to be migrated.
if (isDecommissioning() && !blockId.isBroadcast) {
- throw new BlockSavedOnDecommissionedBlockManagerException(blockId)
Review comment:
this exception class is only used once, I don't know should we keep it or not?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org