incubator-uniffle icon indicating copy to clipboard operation
incubator-uniffle copied to clipboard

[Improvement] Refactor the writer code with builder pattern

Open pegasas opened this issue 2 years ago • 4 comments

What changes were proposed in this pull request?

(Please outline the changes and how this PR fixes the issue.)

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, describe the bug.)

Fix: https://github.com/apache/incubator-uniffle/issues/1090

Does this PR introduce any user-facing change?

(Please list the user-facing changes introduced by your change, including

  1. Change in user-facing APIs.
  2. Addition or removal of property keys.)

No.

How was this patch tested?

(Please test your changes, and provide instructions on how to test it:

  1. If you add a feature or fix a bug, add a test to cover your changes.
  2. If you fix a flaky test, repeat it for many times to prove it works.)

pegasas avatar Aug 31 '23 17:08 pegasas

Codecov Report

Merging #1185 (cdaf100) into master (164e0d0) will increase coverage by 1.01%. The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #1185      +/-   ##
============================================
+ Coverage     53.63%   54.65%   +1.01%     
- Complexity     2581     2582       +1     
============================================
  Files           391      371      -20     
  Lines         22407    20082    -2325     
  Branches       1875     1875              
============================================
- Hits          12018    10975    -1043     
+ Misses         9683     8471    -1212     
+ Partials        706      636      -70     
Files Changed Coverage Δ
...che/uniffle/client/impl/ShuffleReadClientImpl.java 62.13% <0.00%> (-16.23%) :arrow_down:

... and 22 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Sep 01 '23 06:09 codecov-commenter

Is this ready for review?

zuston avatar Sep 04 '23 06:09 zuston

Hi, @zuston ,

I am trying to figure out your reason for builder mode on shuffle reader/writer. Any hints or guidance from your side?

For example, Should I abandon all previous constructor methods and refactor into builder mode?

pegasas avatar Sep 04 '23 06:09 pegasas

Hi, @zuston ,

I am trying to figure out your reason for builder mode on shuffle reader/writer. Any hints or guidance from your side?

For example, Should I abandon all previous constructor methods and refactor into builder mode?

Feel free to refactor and follow your heart

zuston avatar Sep 05 '23 02:09 zuston