public class VespaStorage
extends org.apache.pig.StoreFunc
Modifier and Type | Field and Description |
---|---|
private boolean |
createDocOp |
private VespaDocumentOperation.Operation |
operation |
(package private) Properties |
properties |
private static String |
PROPERTY_CREATE_DOC_OP |
private static String |
PROPERTY_ID_TEMPLATE |
private static String |
PROPERTY_OPERATION |
private static String |
PROPERTY_RESOURCE_SCHEMA |
private org.apache.hadoop.mapreduce.RecordWriter |
recordWriter |
private org.apache.pig.ResourceSchema |
resourceSchema |
private String |
signature |
private String |
template |
Constructor and Description |
---|
VespaStorage() |
VespaStorage(String... params) |
Modifier and Type | Method and Description |
---|---|
static <T extends Serializable> |
base64Deserialize(String s) |
static String |
base64Serialize(Object o) |
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) |
private String |
createDocumentOperation(org.apache.pig.data.Tuple tuple) |
org.apache.hadoop.mapreduce.OutputFormat |
getOutputFormat() |
private org.apache.pig.ResourceSchema |
getResourceSchema() |
private Properties |
getUDFProperties() |
void |
prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter recordWriter) |
void |
putNext(org.apache.pig.data.Tuple tuple) |
String |
relToAbsPathForStoreLocation(String endpoint,
org.apache.hadoop.fs.Path path) |
private void |
setResourceSchema(org.apache.pig.ResourceSchema schema) |
void |
setStoreFuncUDFContextSignature(String s) |
void |
setStoreLocation(String endpoint,
org.apache.hadoop.mapreduce.Job job) |
private final boolean createDocOp
private final String template
private final VespaDocumentOperation.Operation operation
private String signature
private org.apache.hadoop.mapreduce.RecordWriter recordWriter
private org.apache.pig.ResourceSchema resourceSchema
private static final String PROPERTY_CREATE_DOC_OP
private static final String PROPERTY_ID_TEMPLATE
private static final String PROPERTY_OPERATION
private static final String PROPERTY_RESOURCE_SCHEMA
Properties properties
public VespaStorage()
public VespaStorage(String... params)
public org.apache.hadoop.mapreduce.OutputFormat getOutputFormat() throws IOException
getOutputFormat
in interface org.apache.pig.StoreFuncInterface
getOutputFormat
in class org.apache.pig.StoreFunc
IOException
public void setStoreLocation(String endpoint, org.apache.hadoop.mapreduce.Job job) throws IOException
setStoreLocation
in interface org.apache.pig.StoreFuncInterface
setStoreLocation
in class org.apache.pig.StoreFunc
IOException
public void prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter recordWriter) throws IOException
prepareToWrite
in interface org.apache.pig.StoreFuncInterface
prepareToWrite
in class org.apache.pig.StoreFunc
IOException
public void putNext(org.apache.pig.data.Tuple tuple) throws IOException
putNext
in interface org.apache.pig.StoreFuncInterface
putNext
in class org.apache.pig.StoreFunc
IOException
public void checkSchema(org.apache.pig.ResourceSchema resourceSchema) throws IOException
checkSchema
in interface org.apache.pig.StoreFuncInterface
checkSchema
in class org.apache.pig.StoreFunc
IOException
public String relToAbsPathForStoreLocation(String endpoint, org.apache.hadoop.fs.Path path) throws IOException
relToAbsPathForStoreLocation
in interface org.apache.pig.StoreFuncInterface
relToAbsPathForStoreLocation
in class org.apache.pig.StoreFunc
IOException
public void setStoreFuncUDFContextSignature(String s)
setStoreFuncUDFContextSignature
in interface org.apache.pig.StoreFuncInterface
setStoreFuncUDFContextSignature
in class org.apache.pig.StoreFunc
public void cleanupOnFailure(String s, org.apache.hadoop.mapreduce.Job job) throws IOException
cleanupOnFailure
in interface org.apache.pig.StoreFuncInterface
cleanupOnFailure
in class org.apache.pig.StoreFunc
IOException
public void cleanupOnSuccess(String s, org.apache.hadoop.mapreduce.Job job) throws IOException
cleanupOnSuccess
in interface org.apache.pig.StoreFuncInterface
cleanupOnSuccess
in class org.apache.pig.StoreFunc
IOException
private org.apache.pig.ResourceSchema getResourceSchema() throws IOException
IOException
private void setResourceSchema(org.apache.pig.ResourceSchema schema) throws IOException
IOException
private Properties getUDFProperties()
private String createDocumentOperation(org.apache.pig.data.Tuple tuple) throws IOException
IOException
public static String base64Serialize(Object o) throws IOException
IOException
public static <T extends Serializable> T base64Deserialize(String s) throws IOException
IOException
Copyright © 2018. All rights reserved.