Search in sources :

Example 1 with RecordIdReader

use of org.apache.asterix.external.indexing.RecordIdReader in project asterixdb by apache.

the class LookupAdapterFactory method createAdapter.

public LookupAdapter<T> createAdapter(IHyracksTaskContext ctx, int partition, RecordDescriptor inRecDesc, ExternalFileIndexAccessor snapshotAccessor, IFrameWriter writer) throws HyracksDataException {
    try {
        IRecordDataParser<T> dataParser = dataParserFactory.createRecordParser(ctx);
        ILookupRecordReader<? extends T> reader = readerFactory.createRecordReader(ctx, partition, snapshotAccessor);
        reader.configure(configuration);
        RecordIdReader ridReader = RecordIdReaderFactory.create(configuration, ridFields);
        return new LookupAdapter<>(dataParser, reader, inRecDesc, ridReader, retainInput, retainMissing, isMissingWriterFactory, ctx, writer);
    } catch (Exception e) {
        throw new HyracksDataException(e);
    }
}
Also used : RecordIdReader(org.apache.asterix.external.indexing.RecordIdReader) LookupAdapter(org.apache.asterix.external.dataset.adapter.LookupAdapter) AlgebricksException(org.apache.hyracks.algebricks.common.exceptions.AlgebricksException) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException)

Aggregations

LookupAdapter (org.apache.asterix.external.dataset.adapter.LookupAdapter)1 RecordIdReader (org.apache.asterix.external.indexing.RecordIdReader)1 AlgebricksException (org.apache.hyracks.algebricks.common.exceptions.AlgebricksException)1 HyracksDataException (org.apache.hyracks.api.exceptions.HyracksDataException)1