-
Notifications
You must be signed in to change notification settings - Fork 6
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
ALS-6511: Add PFB result type #116
Conversation
@@ -17,7 +23,19 @@ | |||
public class AsyncResult implements Runnable, Comparable<AsyncResult>{ |
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.
This class was a huge pain. I tried to improve it but I'm not super happy with how this turned out. But at least this supports multi value exporting, to some degree
import java.util.stream.Stream; | ||
|
||
@Component | ||
public class PfbProcessor implements HpdsProcessor { |
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.
This is somewhat similar to the QueryProcessor which generates the CSVs, but since PFB needs to write row by row, we batch the rows and then transform the column-based data to row based data before writing
import org.apache.commons.csv.CSVPrinter; | ||
import org.apache.commons.csv.CSVRecord; | ||
|
||
import de.siegmar.fastcsv.writer.CsvWriter; | ||
import edu.harvard.hms.dbmi.avillach.hpds.data.phenotype.ColumnMeta; | ||
|
||
public class ResultStoreStream extends InputStream { |
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.
A lot of these changes are removing an obsolete concept that was no longer in use. The important part is making the writer more generic
import java.util.*; | ||
import java.util.stream.Collectors; | ||
|
||
public class PfbWriter implements ResultWriter { |
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.
This is the class responsible for creating the PFB file, using Java's avro library
No description provided.