org.apache.hadoop.hive.ql.io
Class FlatFileInputFormat.SerializationContextFromConf<S>

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.FlatFileInputFormat.SerializationContextFromConf<S>
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FlatFileInputFormat.SerializationContext<S>
Enclosing class:
FlatFileInputFormat<T>

public static class FlatFileInputFormat.SerializationContextFromConf<S>
extends Object
implements FlatFileInputFormat.SerializationContext<S>

An implementation of FlatFileInputFormat.SerializationContext that reads the Serialization class and specific subclass to be deserialized from the JobConf.


Field Summary
static String SerializationSubclassKey
          The JobConf keys for the Class that is being deserialized.
 
Constructor Summary
FlatFileInputFormat.SerializationContextFromConf()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
 Class<S> getRealClass()
          Produces the specific class to deserialize.
 org.apache.hadoop.io.serializer.Serialization<S> getSerialization()
          Looks up and instantiates the Serialization Object Important to note here that we are not relying on the Hadoop SerializationFactory part of the Serialization framework.
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SerializationSubclassKey

public static final String SerializationSubclassKey
The JobConf keys for the Class that is being deserialized.

See Also:
Constant Field Values
Constructor Detail

FlatFileInputFormat.SerializationContextFromConf

public FlatFileInputFormat.SerializationContextFromConf()
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

getRealClass

public Class<S> getRealClass()
                      throws IOException
Description copied from interface: FlatFileInputFormat.SerializationContext
Produces the specific class to deserialize.

Specified by:
getRealClass in interface FlatFileInputFormat.SerializationContext<S>
Returns:
the actual class being deserialized.
Throws:
does - not currently throw IOException
IOException

getSerialization

public org.apache.hadoop.io.serializer.Serialization<S> getSerialization()
                                                                  throws IOException
Looks up and instantiates the Serialization Object Important to note here that we are not relying on the Hadoop SerializationFactory part of the Serialization framework. This is because in the case of Non-Writable Objects, we cannot make any assumptions about the uniformity of the serialization class APIs - i.e., there may not be a "write" method call and a subclass may need to implement its own Serialization classes. The SerializationFactory currently returns the first (de)serializer that is compatible with the class to be deserialized; in this context, that assumption isn't necessarily true.

Specified by:
getSerialization in interface FlatFileInputFormat.SerializationContext<S>
Returns:
the serialization object for this context
Throws:
does - not currently throw any IOException
IOException


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