org.elasticsearch.hadoop.cascading
Class EsTap
java.lang.Object
cascading.tap.Tap<Object,Object,Object>
org.elasticsearch.hadoop.cascading.EsTap
- All Implemented Interfaces:
- FlowElement, Serializable
public class EsTap
- extends Tap<Object,Object,Object>
Cascading Tap backed by ElasticSearch. Can be used as a source and/or sink, for both local and Hadoop (local or not) flows.
If no fields are specified or are associated with the incoming tuple, the Tap will create name each field "field[num]" - this allows the document to be parsed by ES but will most likely conflict with the
existing mapping for the given index.
- See Also:
- Serialized Form
Constructor Summary |
EsTap(String resource)
|
EsTap(String resource,
Fields fields)
|
EsTap(String host,
int port,
String resource)
|
EsTap(String host,
int port,
String resource,
String query)
|
EsTap(String host,
int port,
String resource,
String query,
Fields fields)
|
EsTap(String resource,
String query)
|
EsTap(String resource,
String query,
Fields fields)
|
Methods inherited from class cascading.tap.Tap |
commitResource, createResource, deleteResource, equals, getConfigDef, getFullIdentifier, getFullIdentifier, getModifiedTime, getScheme, getSinkFields, getSinkMode, getSourceFields, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isKeep, isReplace, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, taps |
EsTap
public EsTap(String resource)
EsTap
public EsTap(String resource,
String query)
EsTap
public EsTap(String host,
int port,
String resource)
EsTap
public EsTap(String host,
int port,
String resource,
String query)
EsTap
public EsTap(String resource,
Fields fields)
EsTap
public EsTap(String resource,
String query,
Fields fields)
EsTap
public EsTap(String host,
int port,
String resource,
String query,
Fields fields)
flowConfInit
public void flowConfInit(Flow<Object> flow)
- Overrides:
flowConfInit
in class Tap<Object,Object,Object>
isSink
public boolean isSink()
- Overrides:
isSink
in class Tap<Object,Object,Object>
isSource
public boolean isSource()
- Overrides:
isSource
in class Tap<Object,Object,Object>
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifier
in class Tap<Object,Object,Object>
sourceConfInit
public void sourceConfInit(FlowProcess<Object> flowProcess,
Object conf)
- Overrides:
sourceConfInit
in class Tap<Object,Object,Object>
sinkConfInit
public void sinkConfInit(FlowProcess<Object> flowProcess,
Object conf)
- Overrides:
sinkConfInit
in class Tap<Object,Object,Object>
openForRead
public TupleEntryIterator openForRead(FlowProcess<Object> flowProcess,
Object input)
throws IOException
- Specified by:
openForRead
in class Tap<Object,Object,Object>
- Throws:
IOException
openForWrite
public TupleEntryCollector openForWrite(FlowProcess<Object> flowProcess,
Object output)
throws IOException
- Specified by:
openForWrite
in class Tap<Object,Object,Object>
- Throws:
IOException
createResource
public boolean createResource(Object conf)
throws IOException
- Specified by:
createResource
in class Tap<Object,Object,Object>
- Throws:
IOException
deleteResource
public boolean deleteResource(Object conf)
throws IOException
- Specified by:
deleteResource
in class Tap<Object,Object,Object>
- Throws:
IOException
resourceExists
public boolean resourceExists(Object conf)
throws IOException
- Specified by:
resourceExists
in class Tap<Object,Object,Object>
- Throws:
IOException
getModifiedTime
public long getModifiedTime(Object conf)
throws IOException
- Specified by:
getModifiedTime
in class Tap<Object,Object,Object>
- Throws:
IOException
isEquivalentTo
public boolean isEquivalentTo(FlowElement element)
- Specified by:
isEquivalentTo
in interface FlowElement
- Overrides:
isEquivalentTo
in class Tap<Object,Object,Object>
toString
public String toString()
- Overrides:
toString
in class Tap<Object,Object,Object>