You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/10/10 09:49:55 UTC

[GitHub] [incubator-uniffle] zuston opened a new pull request, #259: [Refactor] Optimize creating shuffle handlers

zuston opened a new pull request, #259:
URL: https://github.com/apache/incubator-uniffle/pull/259

   <!--
   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://github.com/Tencent/Firestorm/blob/master/CONTRIBUTING.md
     2. Ensure you have added or run the appropriate tests for your PR
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]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.
   -->
   
   ### What changes were proposed in this pull request?
   [Refactor] Optimize creating shuffle handlers
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   When creating shuffle handler, the code is too duplicate and complex.
   <!--
   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.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   UTs


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1275492983

   Do u mind merging this ? @jerqi 


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] codecov-commenter commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1273093722

   # [Codecov](https://codecov.io/gh/apache/incubator-uniffle/pull/259?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#259](https://codecov.io/gh/apache/incubator-uniffle/pull/259?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7eb1b5e) into [master](https://codecov.io/gh/apache/incubator-uniffle/commit/5875eb37e8e038d72afd7483c4d4807d05d9e08a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5875eb3) will **increase** coverage by `0.47%`.
   > The diff coverage is `20.28%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #259      +/-   ##
   ============================================
   + Coverage     59.18%   59.66%   +0.47%     
   - Complexity     1343     1350       +7     
   ============================================
     Files           163      163              
     Lines          8837     8781      -56     
     Branches        835      837       +2     
   ============================================
   + Hits           5230     5239       +9     
   + Misses         3339     3272      -67     
   - Partials        268      270       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-uniffle/pull/259?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...uniffle/storage/factory/ShuffleHandlerFactory.java](https://codecov.io/gh/apache/incubator-uniffle/pull/259/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL2ZhY3RvcnkvU2h1ZmZsZUhhbmRsZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...a/org/apache/uniffle/storage/util/StorageType.java](https://codecov.io/gh/apache/incubator-uniffle/pull/259/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL3V0aWwvU3RvcmFnZVR5cGUuamF2YQ==) | `100.00% <100.00%> (+100.00%)` | :arrow_up: |
   | [...rg/apache/uniffle/storage/common/LocalStorage.java](https://codecov.io/gh/apache/incubator-uniffle/pull/259/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL2NvbW1vbi9Mb2NhbFN0b3JhZ2UuamF2YQ==) | `42.75% <0.00%> (-2.07%)` | :arrow_down: |
   | [...org/apache/uniffle/server/ShuffleFlushManager.java](https://codecov.io/gh/apache/incubator-uniffle/pull/259/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlRmx1c2hNYW5hZ2VyLmphdmE=) | `76.66% <0.00%> (-1.67%)` | :arrow_down: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1274233622

   > > We have the method `isMemoryShuffleEnabled` in the MR client and Spark client, you can modify them, too.
   > 
   > Done
   
   You only modify the spark2 client. How about spark3 and mr?


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] frankliee commented on a diff in pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
frankliee commented on code in PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#discussion_r991747276


##########
storage/src/main/java/org/apache/uniffle/storage/util/StorageType.java:
##########
@@ -18,10 +18,33 @@
 package org.apache.uniffle.storage.util;
 
 public enum StorageType {
-  HDFS,
-  LOCALFILE,
-  LOCALFILE_HDFS,
-  MEMORY_LOCALFILE,
-  MEMORY_HDFS,
-  MEMORY_LOCALFILE_HDFS
+  MEMORY(1),
+  LOCALFILE(2),
+  HDFS(4),
+  LOCALFILE_HDFS(6),
+  MEMORY_LOCALFILE(3),
+  MEMORY_HDFS(5),
+  MEMORY_LOCALFILE_HDFS(7);

Review Comment:
   Why this order?



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1274350139

   > > > We have the method `isMemoryShuffleEnabled` in the MR client and Spark client, you can modify them, too.
   > > 
   > > 
   > > Done
   > 
   > You only modify the spark2 client. How about spark3 and mr?
   
   Updated. I forgot it.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1275493367

   > Do u mind merging this ? @jerqi
   
   merged.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1273235894

   We have the method `isMemoryShuffleEnabled` in the MR client and Spark client, you can modify them, too.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#discussion_r991760065


##########
storage/src/main/java/org/apache/uniffle/storage/util/StorageType.java:
##########
@@ -18,10 +18,33 @@
 package org.apache.uniffle.storage.util;
 
 public enum StorageType {
-  HDFS,
-  LOCALFILE,
-  LOCALFILE_HDFS,
-  MEMORY_LOCALFILE,
-  MEMORY_HDFS,
-  MEMORY_LOCALFILE_HDFS
+  MEMORY(1),
+  LOCALFILE(2),
+  HDFS(4),
+  LOCALFILE_HDFS(6),
+  MEMORY_LOCALFILE(3),
+  MEMORY_HDFS(5),
+  MEMORY_LOCALFILE_HDFS(7);

Review Comment:
   Just follow the original order



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1274095077

   > We have the method `isMemoryShuffleEnabled` in the MR client and Spark client, you can modify them, too.
   
   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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi merged pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
jerqi merged PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1273059704

   PTAL @jerqi @frankliee 


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #259: [Refactor] Optimize creating shuffle handlers

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #259:
URL: https://github.com/apache/incubator-uniffle/pull/259#issuecomment-1274401583

   Flaky test: https://github.com/apache/incubator-uniffle/actions/runs/3225484333/jobs/5277849404


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org