Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Provides utility classes for creating thread factories #49

Merged
merged 2 commits into from Jul 12, 2022

Conversation

smallzhongfeng
Copy link
Contributor

What changes were proposed in this pull request?

Provides tool classes for creating thread factories

Why are the changes needed?

Make the code more standardized and beautiful

Does this PR introduce any user-facing change?

No

How was this patch tested?

Use the original test class

@@ -0,0 +1,15 @@
package org.apache.uniffle.common.util;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add license header? Because our project need to follow Apache 2.0 license.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

public static ThreadFactory getThreadFactory(String factoryName) {
return new ThreadFactoryBuilder().setDaemon(true).setNameFormat(factoryName).build();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add new line? Otherwise, there will be a format warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 31th line. Could you add a new line at the end of file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #49 (eb3b6ec) into master (d653cd2) will decrease coverage by 1.42%.
The diff coverage is 76.92%.

@@             Coverage Diff              @@
##             master      #49      +/-   ##
============================================
- Coverage     55.39%   53.97%   -1.43%     
+ Complexity     1108     1021      -87     
============================================
  Files           145      137       -8     
  Lines          7778     7403     -375     
  Branches        749      719      -30     
============================================
- Hits           4309     3996     -313     
+ Misses         3230     3180      -50     
+ Partials        239      227      -12     
Impacted Files Coverage Δ
...java/org/apache/uniffle/common/rpc/GrpcServer.java 0.00% <0.00%> (ø)
...va/org/apache/uniffle/common/util/ThreadUtils.java 0.00% <0.00%> (ø)
...g/apache/hadoop/mapred/SortWriteBufferManager.java 79.89% <100.00%> (-0.22%) ⬇️
...he/uniffle/client/impl/ShuffleWriteClientImpl.java 25.98% <100.00%> (ø)
...e/uniffle/coordinator/AccessCandidatesChecker.java 85.50% <100.00%> (ø)
...apache/uniffle/coordinator/ApplicationManager.java 80.82% <100.00%> (ø)
.../apache/uniffle/coordinator/ClientConfManager.java 91.54% <100.00%> (-1.41%) ⬇️
...ache/uniffle/coordinator/SimpleClusterManager.java 88.29% <100.00%> (ø)
...org/apache/uniffle/server/ShuffleFlushManager.java 78.40% <100.00%> (+1.70%) ⬆️
.../org/apache/uniffle/server/ShuffleTaskManager.java 64.40% <100.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d653cd2...eb3b6ec. Read the comment docs.

@colinmjj
Copy link

LGTM, depend on CI

@jerqi
Copy link
Contributor

jerqi commented Jul 12, 2022

@smallzhongfeng Could you resolve the conflict?

@smallzhongfeng
Copy link
Contributor Author

smallzhongfeng commented Jul 12, 2022

@smallzhongfeng Could you resolve the conflict?

Done ! Could you review it? @jerqi

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution @smallzhongfeng

@jerqi jerqi merged commit 0f6a896 into apache:master Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants