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

[HUDI-8786] Running intellij code cleanup #12524

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vinothchandar
Copy link
Member

Change Logs

  • final modified added as needed
  • eliminate unnecessary .toString()
  • Move out of StringBuilder for toString, since the compiler will do it anyway
  • Bunch of simplifications

All the changes are auto generated.

Impact

None

Risk level (write none, low medium or high below)

low

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@vinothchandar vinothchandar changed the title [DRAFT] Running intellij code cleanup [HUDI-8786] Running intellij code cleanup Dec 19, 2024
@github-actions github-actions bot added the size:XL PR with lines of changes > 1000 label Dec 19, 2024
 - On top, fixed to make checkstyle happy
@@ -33,9 +33,9 @@ public class WorkloadStat implements Serializable {

private long numUpdates = 0L;

private HashMap<String, Pair<String, Long>> insertLocationToCount;
private final HashMap<String, Pair<String, Long>> insertLocationToCount;
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, for Java serialization and deserialization to work in Spark, these member variables cannot be final.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think for any class that already has final variables, it is safe to add additional final variables. Otherwise, we need to be careful around the Serializable.

.setBootstrapFilePath(slice.getBaseFile().map(bf -> bf.getBootstrapBaseFile().map(bbf -> bbf.getPath()).orElse(StringUtils.EMPTY_STRING)).orElse(StringUtils.EMPTY_STRING))
.build()).collect(Collectors.toList());
return slices.stream().map(slice -> {
new HoodieSliceInfo();
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant

Copy link
Member Author

Choose a reason for hiding this comment

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

dont follow. checkstyle was failing due to bad indentation.

@hudi-bot
Copy link

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL PR with lines of changes > 1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants