@InterfaceAudience.Public @InterfaceStability.Evolving public class HCatStorer extends org.apache.pig.StoreFunc
Modifier and Type | Class and Description |
---|---|
static class |
HCatBaseStorer.OOR_VALUE_OPT_VALUES
valid values for ON_OOR_VALUE_OPT
|
Modifier and Type | Field and Description |
---|---|
protected static String |
COMPUTED_OUTPUT_SCHEMA |
protected HCatSchema |
computedSchema |
static String |
INNER_SIGNATURE |
static String |
INNER_SIGNATURE_PREFIX |
protected List<String> |
partitionKeys |
protected Map<String,String> |
partitions |
protected static String |
PIG_SCHEMA |
protected org.apache.pig.impl.logicalLayer.schema.Schema |
pigSchema |
protected String |
sign |
Constructor and Description |
---|
HCatStorer() |
HCatStorer(String partSpecs) |
HCatStorer(String partSpecs,
String pigSchema) |
HCatStorer(String partSpecs,
String pigSchema,
String optString) |
Modifier and Type | Method and Description |
---|---|
void |
checkSchema(org.apache.pig.ResourceSchema resourceSchema) |
void |
cleanupOnFailure(String location,
org.apache.hadoop.mapreduce.Job job) |
protected HCatSchema |
convertPigSchemaToHCatSchema(org.apache.pig.impl.logicalLayer.schema.Schema pigSchema,
HCatSchema tableSchema)
Constructs HCatSchema from pigSchema.
|
protected void |
doSchemaValidations(org.apache.pig.impl.logicalLayer.schema.Schema pigSchema,
HCatSchema tblSchema) |
org.apache.hadoop.mapreduce.OutputFormat |
getOutputFormat() |
void |
prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter writer) |
void |
putNext(org.apache.pig.data.Tuple tuple) |
String |
relToAbsPathForStoreLocation(String location,
org.apache.hadoop.fs.Path curDir) |
static boolean |
removeTupleFromBag(HCatFieldSchema hcatFieldSchema,
org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema bagFieldSchema) |
void |
setStoreFuncUDFContextSignature(String signature) |
void |
setStoreLocation(String location,
org.apache.hadoop.mapreduce.Job job) |
void |
storeSchema(org.apache.pig.ResourceSchema schema,
String arg1,
org.apache.hadoop.mapreduce.Job job) |
void |
storeStatistics(org.apache.pig.ResourceStatistics stats,
String arg1,
org.apache.hadoop.mapreduce.Job job) |
public static final String INNER_SIGNATURE
public static final String INNER_SIGNATURE_PREFIX
protected static final String COMPUTED_OUTPUT_SCHEMA
protected org.apache.pig.impl.logicalLayer.schema.Schema pigSchema
protected HCatSchema computedSchema
protected static final String PIG_SCHEMA
protected String sign
public HCatStorer(String partSpecs, String pigSchema, String optString) throws Exception
optString
- may empty str (not null), in which case it's no-opException
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 location, org.apache.hadoop.mapreduce.Job job) throws IOException
setStoreLocation
in interface org.apache.pig.StoreFuncInterface
setStoreLocation
in class org.apache.pig.StoreFunc
location
- databaseName.tableNameIOException
public void storeSchema(org.apache.pig.ResourceSchema schema, String arg1, org.apache.hadoop.mapreduce.Job job) throws IOException
IOException
public void cleanupOnFailure(String location, org.apache.hadoop.mapreduce.Job job) throws IOException
cleanupOnFailure
in interface org.apache.pig.StoreFuncInterface
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
protected HCatSchema convertPigSchemaToHCatSchema(org.apache.pig.impl.logicalLayer.schema.Schema pigSchema, HCatSchema tableSchema) throws org.apache.pig.impl.logicalLayer.FrontendException
org.apache.pig.impl.logicalLayer.FrontendException
public static boolean removeTupleFromBag(HCatFieldSchema hcatFieldSchema, org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema bagFieldSchema) throws HCatException
HCatException
public void prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter writer) 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 String relToAbsPathForStoreLocation(String location, org.apache.hadoop.fs.Path curDir) throws IOException
relToAbsPathForStoreLocation
in interface org.apache.pig.StoreFuncInterface
relToAbsPathForStoreLocation
in class org.apache.pig.StoreFunc
IOException
public void setStoreFuncUDFContextSignature(String signature)
setStoreFuncUDFContextSignature
in interface org.apache.pig.StoreFuncInterface
setStoreFuncUDFContextSignature
in class org.apache.pig.StoreFunc
protected void doSchemaValidations(org.apache.pig.impl.logicalLayer.schema.Schema pigSchema, HCatSchema tblSchema) throws org.apache.pig.impl.logicalLayer.FrontendException, HCatException
org.apache.pig.impl.logicalLayer.FrontendException
HCatException
public void storeStatistics(org.apache.pig.ResourceStatistics stats, String arg1, org.apache.hadoop.mapreduce.Job job) throws IOException
storeStatistics
in interface org.apache.pig.StoreMetadata
IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.