public class ParquetLoader extends LoadFuncMetadataWrapper implements LoadPushDown
LoadPushDown.OperatorSet, LoadPushDown.RequiredField, LoadPushDown.RequiredFieldList, LoadPushDown.RequiredFieldResponse
Constructor and Description |
---|
ParquetLoader() |
ParquetLoader(java.lang.String requestedSchemaStr) |
Modifier and Type | Method and Description |
---|---|
java.util.List<LoadPushDown.OperatorSet> |
getFeatures()
Determine the operators that can be pushed to the loader.
|
java.util.List<java.lang.String> |
getShipFiles()
Allow a LoadFunc to specify a list of files located locally and would like to ship to backend
(through distributed cache).
|
LoadPushDown.RequiredFieldResponse |
pushProjection(LoadPushDown.RequiredFieldList requiredFieldList)
Indicate to the loader fields that will be needed.
|
void |
setLocation(java.lang.String location,
org.apache.hadoop.mapreduce.Job job)
Communicate to the loader the location of the object(s) being loaded.
|
getPartitionKeys, getSchema, getStatistics, setLoadFunc, setPartitionFilter
getInputFormat, getLoadCaster, getMethodName, getNext, loadFunc, prepareToRead, relativeToAbsolutePath, setLoadFunc, setUDFContextSignature
getAbsolutePath, getCacheFiles, getPathStrings, join, warn
public ParquetLoader() throws FrontendException
FrontendException
public ParquetLoader(java.lang.String requestedSchemaStr) throws FrontendException
FrontendException
public void setLocation(java.lang.String location, org.apache.hadoop.mapreduce.Job job) throws java.io.IOException
LoadFunc
LoadFunc.relativeToAbsolutePath(String, Path)
. Implementations
should use this method to communicate the location (and any other information)
to its underlying InputFormat through the Job object.
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.setLocation
in class LoadFuncWrapper
location
- Location as returned by
LoadFunc.relativeToAbsolutePath(String, Path)
job
- the Job
object
store or retrieve earlier stored information from the UDFContext
java.io.IOException
- if the location is not valid.public java.util.List<LoadPushDown.OperatorSet> getFeatures()
LoadPushDown
getFeatures
in interface LoadPushDown
public LoadPushDown.RequiredFieldResponse pushProjection(LoadPushDown.RequiredFieldList requiredFieldList) throws FrontendException
LoadPushDown
pushProjection
in interface LoadPushDown
requiredFieldList
- RequiredFieldList indicating which columns will be needed.
This structure is read only. User cannot make change to it inside pushProjection.FrontendException
public java.util.List<java.lang.String> getShipFiles()
LoadFunc
FuncUtils
for utility function to facilitate it
The default implementation returns null.getShipFiles
in class LoadFunc
Copyright © 2007-2017 The Apache Software Foundation