Package com.yahoo.vespa.hadoop.pig
Class VespaStorage
java.lang.Object
org.apache.pig.StoreFunc
com.yahoo.vespa.hadoop.pig.VespaStorage
- All Implemented Interfaces:
org.apache.pig.StoreFuncInterface
public class VespaStorage
extends org.apache.pig.StoreFunc
A small Pig UDF wrapper around the Vespa http client for
feeding data into a Vespa endpoint.
- Author:
- lesters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Serializable>
Tstatic String
void
checkSchema
(org.apache.pig.ResourceSchema resourceSchema) void
cleanupOnFailure
(String s, org.apache.hadoop.mapreduce.Job job) void
cleanupOnSuccess
(String s, org.apache.hadoop.mapreduce.Job job) org.apache.hadoop.mapreduce.OutputFormat
void
prepareToWrite
(org.apache.hadoop.mapreduce.RecordWriter recordWriter) void
putNext
(org.apache.pig.data.Tuple tuple) relToAbsPathForStoreLocation
(String endpoint, org.apache.hadoop.fs.Path path) void
void
setStoreLocation
(String endpoint, org.apache.hadoop.mapreduce.Job job) Methods inherited from class org.apache.pig.StoreFunc
cleanupOnFailureImpl, warn
-
Constructor Details
-
VespaStorage
public VespaStorage() -
VespaStorage
-
-
Method Details
-
getOutputFormat
- Specified by:
getOutputFormat
in interfaceorg.apache.pig.StoreFuncInterface
- Specified by:
getOutputFormat
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
setStoreLocation
public void setStoreLocation(String endpoint, org.apache.hadoop.mapreduce.Job job) throws IOException - Specified by:
setStoreLocation
in interfaceorg.apache.pig.StoreFuncInterface
- Specified by:
setStoreLocation
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
prepareToWrite
public void prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter recordWriter) throws IOException - Specified by:
prepareToWrite
in interfaceorg.apache.pig.StoreFuncInterface
- Specified by:
prepareToWrite
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
putNext
- Specified by:
putNext
in interfaceorg.apache.pig.StoreFuncInterface
- Specified by:
putNext
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
checkSchema
- Specified by:
checkSchema
in interfaceorg.apache.pig.StoreFuncInterface
- Overrides:
checkSchema
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
relToAbsPathForStoreLocation
public String relToAbsPathForStoreLocation(String endpoint, org.apache.hadoop.fs.Path path) throws IOException - Specified by:
relToAbsPathForStoreLocation
in interfaceorg.apache.pig.StoreFuncInterface
- Overrides:
relToAbsPathForStoreLocation
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
setStoreFuncUDFContextSignature
- Specified by:
setStoreFuncUDFContextSignature
in interfaceorg.apache.pig.StoreFuncInterface
- Overrides:
setStoreFuncUDFContextSignature
in classorg.apache.pig.StoreFunc
-
cleanupOnFailure
- Specified by:
cleanupOnFailure
in interfaceorg.apache.pig.StoreFuncInterface
- Overrides:
cleanupOnFailure
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
cleanupOnSuccess
- Specified by:
cleanupOnSuccess
in interfaceorg.apache.pig.StoreFuncInterface
- Overrides:
cleanupOnSuccess
in classorg.apache.pig.StoreFunc
- Throws:
IOException
-
base64Serialize
- Throws:
IOException
-
base64Deserialize
- Throws:
IOException
-