Skip to content

Instantly share code, notes, and snippets.

@prodeezy
Created February 14, 2014 12:42
Show Gist options
  • Save prodeezy/9000365 to your computer and use it in GitHub Desktop.
Save prodeezy/9000365 to your computer and use it in GitHub Desktop.
@Override
public TupleEntryIterator openForRead(FlowProcess<JobConf> flowProcess,
RecordReader input)
throws IOException {
System.out.println("[CustomTap] => openForRead()");
this.table = new HTable(flowProcess.getConfigCopy(), tableName) ;
System.out.println("Set scan filters based record reader...");
TableRecordReader scanBasedRecordReader = new TableRecordReader();
scanBasedRecordReader.setHTable(this.table);
scanBasedRecordReader.setScan(tableScan);
TupleEntryIterator storeTableScanIterator = new HadoopTupleEntrySchemeIterator( flowProcess,
this,
scanBasedRecordReader );
return storeTableScanIterator;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment