|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.uoa.di.madgik.searchlibrary.operatorlibrary.merge.MergeOp
public class MergeOp
Operator class used to create a merged ResultSet output from the contents of an array of input ResultSet
| Field Summary | |
|---|---|
static int |
BufferCapacityDef
The default capacity of the RecordWriters and, if applicable, of all IRecordReaders' buffers |
static OperationMode |
OperationModeDef
The default operation mode. |
static String |
RankFieldNameDef
The default name of the field which contains the record rank. |
static long |
TimeoutDef
The default timeout used by the IRecordWriter and all IRecordReaders. |
static TimeUnit |
TimeUnitDef
The default timeout unit used by the RecordWriter and all IRecordReaders. |
| Constructor Summary | |
|---|---|
MergeOp(URI[] locators,
OperationMode operationMode,
long timeout,
TimeUnit timeUnit,
int bufferCapacity,
StatsContainer stats)
Creates a new MergeOp with configurable operation mode and timeout |
|
MergeOp(URI[] locators,
OperationMode operationMode,
long timeout,
TimeUnit timeUnit,
StatsContainer stats)
Creates a new MergeOp with configurable operation mode and timeout |
|
MergeOp(URI[] locators,
OperationMode operationMode,
StatsContainer stats)
Creates a new MergeOp with configurable operation mode and the default timeout used both for readers and the writer |
|
MergeOp(URI[] locators,
StatsContainer stats)
Creates a new MergeOp with the default operation mode and the default timeout used both for readers and the writer |
|
| Method Summary | |
|---|---|
URI |
compute()
Performs the merging operation |
void |
setQuery(String query)
|
void |
setRankFieldName(String rankFieldName)
Sets the name of the field which contains the record rank Used only if operationMode is set to OperationMode.Sort |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final OperationMode OperationModeDef
OperationMode.FIFO
public static final long TimeoutDef
IRecordWriter and all IRecordReaders. Currently set to 60.
public static final TimeUnit TimeUnitDef
RecordWriter and all IRecordReaders. The current default unit is seconds.
public static final int BufferCapacityDef
RecordWriters and, if applicable, of all IRecordReaders' buffers
public static final String RankFieldNameDef
operationMode is set to OperationMode.Sort
| Constructor Detail |
|---|
public MergeOp(URI[] locators,
StatsContainer stats)
MergeOp with the default operation mode and the default timeout used both for readers and the writer
locators - The locators of the inputs that will be mergedstats - Statistics
public MergeOp(URI[] locators,
OperationMode operationMode,
StatsContainer stats)
MergeOp with configurable operation mode and the default timeout used both for readers and the writer
locators - The locators of the inputs that will be mergedoperationMode - The operation mode. One of OperationMode.FIFO and OperationMode.FirstAvailablestats - Statistics
public MergeOp(URI[] locators,
OperationMode operationMode,
long timeout,
TimeUnit timeUnit,
StatsContainer stats)
MergeOp with configurable operation mode and timeout
locators - The locators of the inputs that will be mergedoperationMode - The operation mode. One of OperationMode.FIFO and OperationMode.FirstAvailabletimeout - The timeout that will be used by the RecordWriter and all ForwardReaderstimeUnit - The timeout unit that will be used by the RecordWriter and all ForwardReadersstats - Statistics
public MergeOp(URI[] locators,
OperationMode operationMode,
long timeout,
TimeUnit timeUnit,
int bufferCapacity,
StatsContainer stats)
MergeOp with configurable operation mode and timeout
locators - The locators of the inputs that will be mergedoperationMode - The operation mode. One of OperationMode.FIFO and OperationMode.FirstAvailabletimeout - The timeout that will be used by the RecordWriter and all ForwardReaderstimeUnit - The timeout unit that will be used by the RecordWriter and all ForwardReadersbufferCapacity - The capacity of the buffer which will be used by the RecordWriter and all ForwardReaders (if applicable)stats - Statistics| Method Detail |
|---|
public void setRankFieldName(String rankFieldName)
operationMode is set to OperationMode.Sort
rankFieldName - The name of the field which contains the record rankpublic void setQuery(String query)
public URI compute()
throws Exception
Exception - An unrecoverable for the operation error ocurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||