You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Ngone51 (via GitHub)" <gi...@apache.org> on 2023/09/26 01:30:53 UTC

[GitHub] [spark] Ngone51 opened a new pull request, #43112: [SPARK-45310] Report shuffle block status should respect shuffle service during decommission migration

Ngone51 opened a new pull request, #43112:
URL: https://github.com/apache/spark/pull/43112

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   Currently, when migrating a shuffle block during decommission, its location type would be changed from shuffle service (if enabled) to the executor. This is of course not the expected behavior. We should still use the external shuffle service to fetch the migrated shuffle blocks. This PR fixes this issue by respecting the shuffle service when reporting the shuffle blocks.
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   Bug fix/improvment.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   
   Unit test.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   
   No.
   


-- 
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


Re: [PR] [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #43112:
URL: https://github.com/apache/spark/pull/43112#issuecomment-1756712004

   Thank you for pinging me. I will take a look tonight, @Ngone51 .


-- 
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


Re: [PR] [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration
URL: https://github.com/apache/spark/pull/43112


-- 
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] Ngone51 commented on a diff in pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration

Posted by "Ngone51 (via GitHub)" <gi...@apache.org>.
Ngone51 commented on code in PR #43112:
URL: https://github.com/apache/spark/pull/43112#discussion_r1336859200


##########
core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
##########
@@ -527,7 +527,9 @@ private[spark] class BlockManager(
       logInfo(s"external shuffle service port = $externalShuffleServicePort")
       shuffleServerId = BlockManagerId(executorId, blockTransferService.hostName,
         externalShuffleServicePort)
-      if (!isDriver) {
+      // Do not try to register with the external shuffle server under testing since none of
+      // test modes (local, local-cluster) enables shuffle service.
+      if (!isDriver && !Utils.isTesting) {

Review Comment:
   It turns out some tests rely on this creation failure for testing purposes. I added a separate testing conf (`spark.testing.skipESSRegister`) to keep the default 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] Ngone51 commented on a diff in pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration

Posted by "Ngone51 (via GitHub)" <gi...@apache.org>.
Ngone51 commented on code in PR #43112:
URL: https://github.com/apache/spark/pull/43112#discussion_r1336600007


##########
core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
##########
@@ -527,7 +527,9 @@ private[spark] class BlockManager(
       logInfo(s"external shuffle service port = $externalShuffleServicePort")
       shuffleServerId = BlockManagerId(executorId, blockTransferService.hostName,
         externalShuffleServicePort)
-      if (!isDriver) {
+      // Do not try to register with the external shuffle server under testing since none of
+      // test modes (local, local-cluster) enables shuffle service.
+      if (!isDriver && !Utils.isTesting) {

Review Comment:
   Without this, the test can't run due to the `BlockManager` creation will fail on this.



-- 
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] dongjoon-hyun commented on a diff in pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #43112:
URL: https://github.com/apache/spark/pull/43112#discussion_r1336578008


##########
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala:
##########
@@ -133,12 +133,12 @@ class BlockManagerSuite extends SparkFunSuite with Matchers with PrivateMethodTe
     val bmSecurityMgr = new SecurityManager(bmConf, encryptionKey)
     val serializerManager = new SerializerManager(serializer, bmConf, encryptionKey)
     val transfer = transferService.getOrElse(new NettyBlockTransferService(
-      conf, securityMgr, serializerManager, "localhost", "localhost", 0, 1))
+      bmConf, securityMgr, serializerManager, "localhost", "localhost", 0, 1))

Review Comment:
   Is this an improvement to add a new test case or a bug, @Ngone51 ?



-- 
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


Re: [PR] [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration [spark]

Posted by "Ngone51 (via GitHub)" <gi...@apache.org>.
Ngone51 commented on PR #43112:
URL: https://github.com/apache/spark/pull/43112#issuecomment-1756700180

   @dongjoon-hyun @holdenk Please take a look, thanks!


-- 
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


Re: [PR] [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration [spark]

Posted by "Ngone51 (via GitHub)" <gi...@apache.org>.
Ngone51 commented on PR #43112:
URL: https://github.com/apache/spark/pull/43112#issuecomment-1757017113

   Thanks @dongjoon-hyun 


-- 
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] dongjoon-hyun commented on a diff in pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #43112:
URL: https://github.com/apache/spark/pull/43112#discussion_r1336578594


##########
core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
##########
@@ -527,7 +527,9 @@ private[spark] class BlockManager(
       logInfo(s"external shuffle service port = $externalShuffleServicePort")
       shuffleServerId = BlockManagerId(executorId, blockTransferService.hostName,
         externalShuffleServicePort)
-      if (!isDriver) {
+      // Do not try to register with the external shuffle server under testing since none of
+      // test modes (local, local-cluster) enables shuffle service.
+      if (!isDriver && !Utils.isTesting) {

Review Comment:
   This looks orthogonal. Shall we make a new JIRA and merge independently?



-- 
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] Ngone51 commented on a diff in pull request #43112: [SPARK-45310][CORE] Report shuffle block status should respect shuffle service during decommission migration

Posted by "Ngone51 (via GitHub)" <gi...@apache.org>.
Ngone51 commented on code in PR #43112:
URL: https://github.com/apache/spark/pull/43112#discussion_r1336601652


##########
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala:
##########
@@ -133,12 +133,12 @@ class BlockManagerSuite extends SparkFunSuite with Matchers with PrivateMethodTe
     val bmSecurityMgr = new SecurityManager(bmConf, encryptionKey)
     val serializerManager = new SerializerManager(serializer, bmConf, encryptionKey)
     val transfer = transferService.getOrElse(new NettyBlockTransferService(
-      conf, securityMgr, serializerManager, "localhost", "localhost", 0, 1))
+      bmConf, securityMgr, serializerManager, "localhost", "localhost", 0, 1))

Review Comment:
   It's a bug. `makeBlockManager` should use `testConf` instead of global `conf` when `testConf` exists.



-- 
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