use of org.apache.parquet.hadoop.mapred.Container in project parquet-mr by apache.
the class ParquetValueScheme method source.
@SuppressWarnings("unchecked")
@Override
public boolean source(FlowProcess<? extends JobConf> fp, SourceCall<Object[], RecordReader> sc) throws IOException {
Container<T> value = (Container<T>) sc.getInput().createValue();
boolean hasNext = sc.getInput().next(null, value);
if (!hasNext) {
return false;
}
// Skip nulls
if (value == null) {
return true;
}
sc.getIncomingEntry().setTuple(new Tuple(value.get()));
return true;
}
use of org.apache.parquet.hadoop.mapred.Container in project parquet-mr by apache.
the class ParquetValueScheme method source.
@SuppressWarnings("unchecked")
@Override
public boolean source(FlowProcess<JobConf> fp, SourceCall<Object[], RecordReader> sc) throws IOException {
Container<T> value = (Container<T>) sc.getInput().createValue();
boolean hasNext = sc.getInput().next(null, value);
if (!hasNext) {
return false;
}
// Skip nulls
if (value == null) {
return true;
}
sc.getIncomingEntry().setTuple(new Tuple(value.get()));
return true;
}