public class MergeOp extends Object
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
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 |
public static final OperationMode OperationModeDef
OperationMode.FIFOpublic 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' bufferspublic static final String RankFieldNameDef
operationMode is set to OperationMode.Sortpublic MergeOp(URI[] locators, StatsContainer stats)
MergeOp with the default operation mode and the default timeout used both for readers and the writerlocators - The locators of the inputs that will be mergedstats - Statisticspublic MergeOp(URI[] locators, OperationMode operationMode, StatsContainer stats)
MergeOp with configurable operation mode and the default timeout used both for readers and the writerlocators - The locators of the inputs that will be mergedoperationMode - The operation mode. One of OperationMode.FIFO and OperationMode.FirstAvailablestats - Statisticspublic MergeOp(URI[] locators, OperationMode operationMode, long timeout, TimeUnit timeUnit, StatsContainer stats)
MergeOp with configurable operation mode and timeoutlocators - 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 - Statisticspublic MergeOp(URI[] locators, OperationMode operationMode, long timeout, TimeUnit timeUnit, int bufferCapacity, StatsContainer stats)
MergeOp with configurable operation mode and timeoutlocators - 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 - Statisticspublic void setRankFieldName(String rankFieldName)
operationMode is set to OperationMode.SortrankFieldName - The name of the field which contains the record rankpublic void setQuery(String query)
Copyright © 2017. All Rights Reserved.