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

Changing access level to protected so that subclasses can access it #421

Merged
merged 1 commit into from
Jul 18, 2018

Conversation

ovj
Copy link
Contributor

@ovj ovj commented Jul 16, 2018

We use custom implementations of WriteStatus for overriding markSuccess() and markFailure() methods. But we don't want to override all the other methods and would want to reuse existing data-structures. This change is only changing the access level for these data members.

@CLAassistant
Copy link

CLAassistant commented Jul 16, 2018

CLA assistant check
All committers have signed the CLA.

@ovj
Copy link
Contributor Author

ovj commented Jul 16, 2018

@vinothchandar @bvaradar @n3nash @jianxu Can one of you please look at it?

@@ -45,8 +45,8 @@

private HoodieWriteStat stat = null;

private long totalRecords = 0;
private long totalErrorRecords = 0;
protected long totalRecords = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add setters for these 2 attributes instead of changing access restrictions ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so add both setters and getters? LGTM.

@ovj
Copy link
Contributor Author

ovj commented Jul 16, 2018

@bvaradar updated diff.

Copy link
Contributor

@bvaradar bvaradar left a comment

Choose a reason for hiding this comment

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

Also, can you sign the CLA ?

@@ -31,11 +31,11 @@
*/
public class WriteStatus implements Serializable {

private final HashMap<HoodieKey, Throwable> errors = new HashMap<>();
protected final HashMap<HoodieKey, Throwable> errors = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you still need protected access ? These container attributes have getters with which you can update the container ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really. Sg. Done.

@n3nash
Copy link
Contributor

n3nash commented Jul 17, 2018

LGTM otherwise.

Copy link
Contributor

@bvaradar bvaradar left a comment

Choose a reason for hiding this comment

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

Looks good. @vinothchandar - Ready to merge

@vinothchandar vinothchandar merged commit f62890c into apache:master Jul 18, 2018
@ovj
Copy link
Contributor Author

ovj commented Jul 19, 2018

Thank you all.

@ovj ovj deleted the write_status branch July 19, 2018 20:40
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Dec 15, 2023
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.

5 participants