org.apache.hadoop.hive.ql.io.parquet.read
Class DataWritableReadSupport

java.lang.Object
  extended by parquet.hadoop.api.ReadSupport<org.apache.hadoop.io.ArrayWritable>
      extended by org.apache.hadoop.hive.ql.io.parquet.read.DataWritableReadSupport

public class DataWritableReadSupport
extends parquet.hadoop.api.ReadSupport<org.apache.hadoop.io.ArrayWritable>

A MapWritableReadSupport Manages the translation between Hive and Parquet


Nested Class Summary
 
Nested classes/interfaces inherited from class parquet.hadoop.api.ReadSupport
parquet.hadoop.api.ReadSupport.ReadContext
 
Field Summary
static String HIVE_SCHEMA_KEY
           
 
Fields inherited from class parquet.hadoop.api.ReadSupport
PARQUET_READ_SCHEMA
 
Constructor Summary
DataWritableReadSupport()
           
 
Method Summary
 parquet.hadoop.api.ReadSupport.ReadContext init(org.apache.hadoop.conf.Configuration configuration, Map<String,String> keyValueMetaData, parquet.schema.MessageType fileSchema)
          It creates the readContext for Parquet side with the requested schema during the init phase.
 parquet.io.api.RecordMaterializer<org.apache.hadoop.io.ArrayWritable> prepareForRead(org.apache.hadoop.conf.Configuration configuration, Map<String,String> keyValueMetaData, parquet.schema.MessageType fileSchema, parquet.hadoop.api.ReadSupport.ReadContext readContext)
          It creates the hive read support to interpret data from parquet to hive
 
Methods inherited from class parquet.hadoop.api.ReadSupport
getSchemaForRead, getSchemaForRead, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIVE_SCHEMA_KEY

public static final String HIVE_SCHEMA_KEY
See Also:
Constant Field Values
Constructor Detail

DataWritableReadSupport

public DataWritableReadSupport()
Method Detail

init

public parquet.hadoop.api.ReadSupport.ReadContext init(org.apache.hadoop.conf.Configuration configuration,
                                                       Map<String,String> keyValueMetaData,
                                                       parquet.schema.MessageType fileSchema)
It creates the readContext for Parquet side with the requested schema during the init phase.

Overrides:
init in class parquet.hadoop.api.ReadSupport<org.apache.hadoop.io.ArrayWritable>
Parameters:
configuration - needed to get the wanted columns
keyValueMetaData - // unused
fileSchema - parquet file schema
Returns:
the parquet ReadContext

prepareForRead

public parquet.io.api.RecordMaterializer<org.apache.hadoop.io.ArrayWritable> prepareForRead(org.apache.hadoop.conf.Configuration configuration,
                                                                                            Map<String,String> keyValueMetaData,
                                                                                            parquet.schema.MessageType fileSchema,
                                                                                            parquet.hadoop.api.ReadSupport.ReadContext readContext)
It creates the hive read support to interpret data from parquet to hive

Specified by:
prepareForRead in class parquet.hadoop.api.ReadSupport<org.apache.hadoop.io.ArrayWritable>
Parameters:
configuration - // unused
keyValueMetaData -
fileSchema - // unused
readContext - containing the requested schema and the schema of the hive table
Returns:
Record Materialize for Hive


Copyright © 2014 The Apache Software Foundation. All rights reserved.