gr.uoa.di.madgik.searchlibrary.operatorlibrary.join
Class JoinWorker
java.lang.Object
java.lang.Thread
gr.uoa.di.madgik.searchlibrary.operatorlibrary.join.JoinWorker
- All Implemented Interfaces:
- Runnable
public class JoinWorker
- extends Thread
Helper thread class used to perform the join operation
- Author:
- UoA
|
Constructor Summary |
JoinWorker(gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> leftReader,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> rightReader,
String leftKeyFieldName,
String rightKeyFieldName,
DefinitionIndexResolver defResolver,
int[] keyIndices,
RecordGenerationPolicy recordGenerationPolicy,
long timeout,
TimeUnit timeUnit,
StatsContainer stats,
String uid)
Creates a new JoinWorker |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
JoinWorker
public JoinWorker(gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> leftReader,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> rightReader,
String leftKeyFieldName,
String rightKeyFieldName,
DefinitionIndexResolver defResolver,
int[] keyIndices,
RecordGenerationPolicy recordGenerationPolicy,
long timeout,
TimeUnit timeUnit,
StatsContainer stats,
String uid)
- Creates a new
JoinWorker
- Parameters:
writer - The IRecordWriter to write records toleftReader - The reader for the left inputrightReader - The reader for the right inputleftKeyFieldName - The name of the Field originating from the left RandomReader and containing the key to base the join onrightKeyFieldName - The name of the Field originating from the right RandomReader and containing the key to base the join onkeyIndex - The index of the join key in the RecordDefinition of the producerrecordGenerationPolicy - The record generation policy that should be usedtimeout - The timeout to be used both by the RandomReaders and the IRecordWritertimeUnit - The time unit of the timeout that will be usedstats - statisticsuid - A unique identifier for this operation
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
- See Also:
Runnable.run()
checkJoin
public void checkJoin(JoinElement tmp,
HashJoin join1,
HashJoin join2,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> leftReader,
gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> rightReader,
Object synch,
BlockingQueue<JoinElement> queue,
EventHandler eventHandler,
BooleanHolder stopNotifier)
- Checks if the provided elements must be joined and places it in the respective hash table
- Parameters:
tmp - The element to checkjoin1 - The Hash table for the left inputjoin2 - The Hash table for the right inputleftReader - The left input readerrightReader - The right input readersynch - An object used to synchronize readersqueue - The record queue from which records are retrievedeventHandler - The event handler used to propagate eventsstopNotifier - An object used to signify the end of processing
Copyright © 2013. All Rights Reserved.