@InterfaceAudience.Public @InterfaceStability.Stable 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-opExceptionpublic org.apache.hadoop.mapreduce.OutputFormat getOutputFormat()
throws IOException
getOutputFormat in interface org.apache.pig.StoreFuncInterfacegetOutputFormat in class org.apache.pig.StoreFuncIOExceptionpublic void setStoreLocation(String location, org.apache.hadoop.mapreduce.Job job) throws IOException
setStoreLocation in interface org.apache.pig.StoreFuncInterfacesetStoreLocation in class org.apache.pig.StoreFunclocation - databaseName.tableNameIOExceptionpublic void storeSchema(org.apache.pig.ResourceSchema schema,
String arg1,
org.apache.hadoop.mapreduce.Job job)
throws IOException
IOExceptionpublic void cleanupOnFailure(String location, org.apache.hadoop.mapreduce.Job job) throws IOException
cleanupOnFailure in interface org.apache.pig.StoreFuncInterfaceIOExceptionpublic void checkSchema(org.apache.pig.ResourceSchema resourceSchema)
throws IOException
checkSchema in interface org.apache.pig.StoreFuncInterfacecheckSchema in class org.apache.pig.StoreFuncIOExceptionprotected HCatSchema convertPigSchemaToHCatSchema(org.apache.pig.impl.logicalLayer.schema.Schema pigSchema, HCatSchema tableSchema) throws org.apache.pig.impl.logicalLayer.FrontendException
org.apache.pig.impl.logicalLayer.FrontendExceptionpublic static boolean removeTupleFromBag(HCatFieldSchema hcatFieldSchema, org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema bagFieldSchema) throws HCatException
HCatExceptionpublic void prepareToWrite(org.apache.hadoop.mapreduce.RecordWriter writer)
throws IOException
prepareToWrite in interface org.apache.pig.StoreFuncInterfaceprepareToWrite in class org.apache.pig.StoreFuncIOExceptionpublic void putNext(org.apache.pig.data.Tuple tuple)
throws IOException
putNext in interface org.apache.pig.StoreFuncInterfaceputNext in class org.apache.pig.StoreFuncIOExceptionpublic String relToAbsPathForStoreLocation(String location, org.apache.hadoop.fs.Path curDir) throws IOException
relToAbsPathForStoreLocation in interface org.apache.pig.StoreFuncInterfacerelToAbsPathForStoreLocation in class org.apache.pig.StoreFuncIOExceptionpublic void setStoreFuncUDFContextSignature(String signature)
setStoreFuncUDFContextSignature in interface org.apache.pig.StoreFuncInterfacesetStoreFuncUDFContextSignature in class org.apache.pig.StoreFuncprotected 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.FrontendExceptionHCatExceptionpublic void storeStatistics(org.apache.pig.ResourceStatistics stats,
String arg1,
org.apache.hadoop.mapreduce.Job job)
throws IOException
storeStatistics in interface org.apache.pig.StoreMetadataIOExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.