public class HiveColumnarStorage extends PigStorage
LoadPushDown.OperatorSet, LoadPushDown.RequiredField, LoadPushDown.RequiredFieldList, LoadPushDown.RequiredFieldResponsecaster, in, mLog, mRequiredColumns, schema, signature, writer| Constructor and Description |
|---|
HiveColumnarStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkSchema(ResourceSchema s)
Set the schema for data to be stored.
|
org.apache.hadoop.mapreduce.OutputFormat |
getOutputFormat()
Return the OutputFormat associated with StoreFuncInterface.
|
void |
putField(OutputStream out,
Object field) |
void |
putNext(Tuple t)
Write a tuple to the data store.
|
void |
setStoreLocation(String location,
org.apache.hadoop.mapreduce.Job job)
Communicate to the storer the location where the data needs to be stored.
|
cleanupOnFailure, cleanupOnSuccess, cleanupOutput, equals, equals, getFeatures, getInputFormat, getNext, getPartitionKeys, getSchema, getStatistics, hashCode, prepareToRead, prepareToWrite, pushProjection, readField, relToAbsPathForStoreLocation, setLocation, setPartitionFilter, setStoreFuncUDFContextSignature, setUDFContextSignature, shouldOverwrite, storeSchema, storeStatisticsgetSplitComparablegetAbsolutePath, getCacheFiles, getLoadCaster, getPathStrings, getShipFiles, join, relativeToAbsolutePath, warnpublic org.apache.hadoop.mapreduce.OutputFormat getOutputFormat()
StoreFuncInterfacegetOutputFormat in interface StoreFuncInterfacegetOutputFormat in class PigStorageOutputFormat associated with StoreFuncInterfacepublic void setStoreLocation(String location, org.apache.hadoop.mapreduce.Job job) throws IOException
StoreFuncInterfaceStoreFuncInterface here is the
return value of StoreFuncInterface.relToAbsPathForStoreLocation(String, Path)
This method will be called in the frontend and backend multiple times. Implementations
should bear in mind that this method is called multiple times and should
ensure there are no inconsistent side effects due to the multiple calls.
StoreFuncInterface.checkSchema(ResourceSchema) will be called before any call to
StoreFuncInterface.setStoreLocation(String, Job).setStoreLocation in interface StoreFuncInterfacesetStoreLocation in class PigStoragelocation - Location returned by
StoreFuncInterface.relToAbsPathForStoreLocation(String, Path)job - The Job objectIOException - if the location is not valid.public void checkSchema(ResourceSchema s) throws IOException
StoreFuncInterfacecheckSchema in interface StoreFuncInterfacecheckSchema in class PigStorages - to be checkedIOException - if this schema is not acceptable. It should include
a detailed error message indicating what is wrong with the schema.public void putNext(Tuple t) throws IOException
StoreFuncInterfaceputNext in interface StoreFuncInterfaceputNext in class PigStoraget - the tuple to store.IOException - if an exception occurs during the writepublic void putField(OutputStream out, Object field) throws IOException
IOExceptionCopyright © 2007-2017 The Apache Software Foundation