private CombineInputPartitionTupleEntryIterator createPartitionEntryIterator( FlowProcess<? extends Configuration> flowProcess, RecordReader input, String parentIdentifier ) throws IOException { TupleEntrySchemeIterator schemeIterator = createTupleEntrySchemeIterator( flowProcess, parent, null, input ); return new CombineInputPartitionTupleEntryIterator( flowProcess, getSourceFields(), partition, parentIdentifier, schemeIterator ); } }
@Override public Tuple next() { String currentFile = getCurrentFile(); if( this.currentFile == null || !this.currentFile.equals( currentFile ) ) { this.currentFile = currentFile; try { String childIdentifier = new Path( currentFile ).getParent().toString(); // drop part-xxxx partition.toTuple( childIdentifier.substring( parentIdentifier.length() + 1 ), partitionEntry ); } catch( Exception exception ) { throw new TapException( "unable to parse partition given parent: " + parentIdentifier + " and child: " + currentFile, exception ); } base = TupleViews.createOverride( sourceFields, partitionEntry.getFields() ); TupleViews.reset( base, Tuple.size( sourceFields.size() ), partitionEntry.getTuple() ); view = TupleViews.createOverride( sourceFields, childIterator.getFields() ); } Tuple tuple = childIterator.next().getTuple(); TupleViews.reset( view, base, tuple ); return view; }
@Override public Tuple next() { String currentFile = getCurrentFile(); if( this.currentFile == null || !this.currentFile.equals( currentFile ) ) { this.currentFile = currentFile; try { String childIdentifier = new Path( currentFile ).getParent().toString(); // drop part-xxxx partition.toTuple( childIdentifier.substring( parentIdentifier.length() + 1 ), partitionEntry ); } catch( Exception exception ) { throw new TapException( "unable to parse partition given parent: " + parentIdentifier + " and child: " + currentFile, exception ); } base = TupleViews.createOverride( sourceFields, partitionEntry.getFields() ); TupleViews.reset( base, Tuple.size( sourceFields.size() ), partitionEntry.getTuple() ); view = TupleViews.createOverride( sourceFields, childIterator.getFields() ); } Tuple tuple = childIterator.next().getTuple(); TupleViews.reset( view, base, tuple ); return view; }
private CombineInputPartitionTupleEntryIterator createPartitionEntryIterator( FlowProcess<? extends Configuration> flowProcess, RecordReader input, String parentIdentifier ) throws IOException { TupleEntrySchemeIterator schemeIterator = createTupleEntrySchemeIterator( flowProcess, parent, null, input ); return new CombineInputPartitionTupleEntryIterator( flowProcess, getSourceFields(), partition, parentIdentifier, schemeIterator ); } }