-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
@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; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
@bvaradar updated diff. |
There was a problem hiding this 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<>(); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. Sg. Done.
LGTM otherwise. |
There was a problem hiding this 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
Thank you all. |
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.