public class EsStorage extends LoadFunc implements LoadMetadata, LoadPushDown, StoreFuncInterface, StoreMetadata
A = LOAD 'twitter/_search?q=kimchy' USING org.elasticsearch.hadoop.pig.ESStorage();
STORE A INTO 'The ElasticSearch host/port can be specified through Hadoop properties (see package description) or passed to the' USING org.elasticsearch.hadoop.pig.ESStorage();
EsStorage(String...)
constructor.LoadPushDown.OperatorSet, LoadPushDown.RequiredField, LoadPushDown.RequiredFieldList, LoadPushDown.RequiredFieldResponse
Constructor and Description |
---|
EsStorage() |
EsStorage(String... configuration) |
getAbsolutePath, getCacheFiles, getLoadCaster, getPathStrings, getShipFiles, join, warn
public EsStorage()
public EsStorage(String... configuration)
public String relToAbsPathForStoreLocation(String location, Path curDir) throws IOException
relToAbsPathForStoreLocation
in interface StoreFuncInterface
IOException
public void setStoreFuncUDFContextSignature(String signature)
setStoreFuncUDFContextSignature
in interface StoreFuncInterface
public void checkSchema(ResourceSchema s) throws IOException
checkSchema
in interface StoreFuncInterface
IOException
public void setStoreLocation(String location, Job job) throws IOException
setStoreLocation
in interface StoreFuncInterface
IOException
public OutputFormat<Object,Map<Writable,Writable>> getOutputFormat() throws IOException
getOutputFormat
in interface StoreFuncInterface
IOException
public void prepareToWrite(RecordWriter writer) throws IOException
prepareToWrite
in interface StoreFuncInterface
IOException
public void putNext(Tuple t) throws IOException
putNext
in interface StoreFuncInterface
IOException
public void cleanupOnFailure(String location, Job job) throws IOException
cleanupOnFailure
in interface StoreFuncInterface
IOException
public void cleanupOnSuccess(String location, Job job) throws IOException
cleanupOnSuccess
in interface StoreFuncInterface
IOException
public void storeStatistics(ResourceStatistics stats, String location, Job job) throws IOException
storeStatistics
in interface StoreMetadata
IOException
public void storeSchema(ResourceSchema schema, String location, Job job) throws IOException
storeSchema
in interface StoreMetadata
IOException
public void setLocation(String location, Job job) throws IOException
setLocation
in class LoadFunc
IOException
public String relativeToAbsolutePath(String location, Path curDir) throws IOException
relativeToAbsolutePath
in class LoadFunc
IOException
public InputFormat getInputFormat() throws IOException
getInputFormat
in class LoadFunc
IOException
public void prepareToRead(RecordReader reader, PigSplit split) throws IOException
prepareToRead
in class LoadFunc
IOException
public Tuple getNext() throws IOException
getNext
in class LoadFunc
IOException
public List<LoadPushDown.OperatorSet> getFeatures()
getFeatures
in interface LoadPushDown
public LoadPushDown.RequiredFieldResponse pushProjection(LoadPushDown.RequiredFieldList requiredFieldList) throws FrontendException
pushProjection
in interface LoadPushDown
FrontendException
public ResourceSchema getSchema(String location, Job job) throws IOException
getSchema
in interface LoadMetadata
IOException
public ResourceStatistics getStatistics(String location, Job job) throws IOException
getStatistics
in interface LoadMetadata
IOException
public String[] getPartitionKeys(String location, Job job) throws IOException
getPartitionKeys
in interface LoadMetadata
IOException
public void setPartitionFilter(Expression partitionFilter) throws IOException
setPartitionFilter
in interface LoadMetadata
IOException
public void setUDFContextSignature(String signature)
setUDFContextSignature
in class LoadFunc