Configuration conf = new Configuration();
Path path = new Path(uri);
FileSystem fs = FileSystem.get(URI.create(uri), conf);
SequenceFile.Writer writer = null;
boolean isSparse = H2OHelper.isSparse(frame);
ValueString vstr = new ValueString();
if (labels != null) {
writer = SequenceFile.createWriter(fs, conf, path, Text.class, VectorWritable.class);
} else {
writer = SequenceFile.createWriter(fs, conf, path, IntWritable.class, VectorWritable.class);