org.apache.hadoop.hive.ql.metadata
Class DefaultStorageHandler

java.lang.Object
  extended by org.apache.hadoop.hive.ql.metadata.DefaultStorageHandler
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, HiveStorageHandler

public class DefaultStorageHandler
extends Object
implements HiveStorageHandler

DefaultStorageHandler is an implementation of HiveStorageHandler which supplies the standard defaults for all options. This can be useful either as the base class for custom storage handlers, or as a mock in tests (providing something which appears to be a non-native table with respect to metadata even though its behavior is otherwise identical to a native table).


Constructor Summary
DefaultStorageHandler()
           
 
Method Summary
 void configureTableJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
          Configures properties for a job based on the definition of the source or target table it accesses.
 org.apache.hadoop.conf.Configuration getConf()
           
 Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
           
 HiveMetaHook getMetaHook()
           
 Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass()
           
 Class<? extends SerDe> getSerDeClass()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStorageHandler

public DefaultStorageHandler()
Method Detail

getInputFormatClass

public Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
Specified by:
getInputFormatClass in interface HiveStorageHandler
Returns:
Class providing an implementation of InputFormat

getOutputFormatClass

public Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass()
Specified by:
getOutputFormatClass in interface HiveStorageHandler
Returns:
Class providing an implementation of OutputFormat

getSerDeClass

public Class<? extends SerDe> getSerDeClass()
Specified by:
getSerDeClass in interface HiveStorageHandler
Returns:
Class providing an implementation of SerDe

getMetaHook

public HiveMetaHook getMetaHook()
Specified by:
getMetaHook in interface HiveStorageHandler
Returns:
metadata hook implementation, or null if this storage handler does not need any metadata notifications

configureTableJobProperties

public void configureTableJobProperties(TableDesc tableDesc,
                                        Map<String,String> jobProperties)
Description copied from interface: HiveStorageHandler
Configures properties for a job based on the definition of the source or target table it accesses.

Specified by:
configureTableJobProperties in interface HiveStorageHandler
Parameters:
tableDesc - descriptor for the table being accessed
jobProperties - receives properties copied or transformed from the table properties

getConf

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

setConf

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


Copyright © 2010 The Apache Software Foundation