public class HiveColumnarStorage extends PigStorage
LoadPushDown.OperatorSet, LoadPushDown.RequiredField, LoadPushDown.RequiredFieldList, LoadPushDown.RequiredFieldResponse
caster, 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(java.io.OutputStream out,
java.lang.Object field) |
void |
putNext(Tuple t)
Write a tuple to the data store.
|
void |
setStoreLocation(java.lang.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, storeStatistics
getSplitComparable
getAbsolutePath, getCacheFiles, getLoadCaster, getPathStrings, getShipFiles, join, relativeToAbsolutePath, warn
public org.apache.hadoop.mapreduce.OutputFormat getOutputFormat()
StoreFuncInterface
getOutputFormat
in interface StoreFuncInterface
getOutputFormat
in class PigStorage
OutputFormat
associated with StoreFuncInterfacepublic void setStoreLocation(java.lang.String location, org.apache.hadoop.mapreduce.Job job) throws java.io.IOException
StoreFuncInterface
StoreFuncInterface
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 StoreFuncInterface
setStoreLocation
in class PigStorage
location
- Location returned by
StoreFuncInterface.relToAbsPathForStoreLocation(String, Path)
job
- The Job
objectjava.io.IOException
- if the location is not valid.public void checkSchema(ResourceSchema s) throws java.io.IOException
StoreFuncInterface
checkSchema
in interface StoreFuncInterface
checkSchema
in class PigStorage
s
- to be checkedjava.io.IOException
- 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 java.io.IOException
StoreFuncInterface
putNext
in interface StoreFuncInterface
putNext
in class PigStorage
t
- the tuple to store.java.io.IOException
- if an exception occurs during the writepublic void putField(java.io.OutputStream out, java.lang.Object field) throws java.io.IOException
java.io.IOException
Copyright © 2007-2012 The Apache Software Foundation