-
Notifications
You must be signed in to change notification settings - Fork 123
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
new phase updateLabel implementation #58 #102
Conversation
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.
Comments on overriding classes and methods
setZinggOptions(ZinggOptions.UPDATE_LABEL); | ||
} | ||
|
||
public void execute() throws ZinggClientException { |
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.
rename getUnmarkedRecords in labeller to getRecordsToProcess, call that in execute. In this class, override that method so that you do not have to override execute here
return; | ||
} | ||
|
||
private void updateLabellerStat(int selectedOption, int existingType) { |
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.
have one method updateLabellerstat(selectedOption, existingType, increment) in base class and call that with increment +1 there or -1 here
updateLabellerStat(selectedOption); | ||
} | ||
|
||
void writeLabelledOutput(Dataset<Row> records, SaveMode mode) { |
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.
define method getPipeForRecordsTowrite in base class. override it here with SaveMode. call it in writeLAbelledOutput in base class.
return; | ||
} | ||
|
||
List<Column> displayCols = DSUtil.getFieldDefColumns(lines, args, false); |
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.
displaycols is redundant, we use df.show so i doubt if it being used. please check
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, overall is there a way to abstract the logic - reading and quitting at 9, displaying some stuff, accepting user input, doing some action(update/mark) in the base class and only override the relevant methods in the update labeller class?
Implementation of LabelUpdater extended from labeller.
Output/Prints are similar in both the phases
Marked Records are replaced
Local Branch has been fetched from 0.3.1