org.apache.hadoop.hive.conf
Class HiveConf

java.lang.Object
  extended by org.apache.hadoop.conf.Configuration
      extended by org.apache.hadoop.hive.conf.HiveConf
All Implemented Interfaces:
Iterable<Map.Entry<String,String>>, org.apache.hadoop.io.Writable

public class HiveConf
extends org.apache.hadoop.conf.Configuration

Hive Configuration.


Nested Class Summary
static class HiveConf.ConfVars
          ConfVars.
 
Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration
org.apache.hadoop.conf.Configuration.IntegerRanges
 
Field Summary
protected  String auxJars
           
static String DATABASE_WAREHOUSE_SUFFIX
           
static HiveConf.ConfVars[] dbVars
          dbVars are the parameters can be set per database.
static String DEFAULT_DATABASE_COMMENT
           
static String DEFAULT_DATABASE_NAME
           
protected  String hiveJar
           
static HiveConf.ConfVars[] metaVars
          Metastore related options that the db is initialized against.
protected  Properties origProp
           
 
Constructor Summary
HiveConf()
           
HiveConf(Class<?> cls)
           
HiveConf(org.apache.hadoop.conf.Configuration other, Class<?> cls)
           
HiveConf(HiveConf other)
          Copy constructor
 
Method Summary
 Properties getAllProperties()
           
 String getAuxJars()
           
static boolean getBoolVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var)
           
static boolean getBoolVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, boolean defaultVal)
           
 boolean getBoolVar(HiveConf.ConfVars var)
           
 Properties getChangedProperties()
           
static String getColumnInternalName(int pos)
           
static Map<String,String> getConfSystemProperties()
          This method returns a mapping from config variable name to its value for all config variables which have been set using System properties
static HiveConf.ConfVars getConfVars(String name)
           
static float getFloatVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var)
           
static float getFloatVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, float defaultVal)
           
 float getFloatVar(HiveConf.ConfVars var)
           
 String getHiveSitePath()
           
static int getIntVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var)
           
 int getIntVar(HiveConf.ConfVars var)
           
 String getJar()
           
static long getLongVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var)
           
static long getLongVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, long defaultVal)
           
 long getLongVar(HiveConf.ConfVars var)
           
static int getPositionFromInternalName(String internalName)
           
 String getUser()
           
static String getVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var)
           
static String getVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, String defaultVal)
           
 String getVar(HiveConf.ConfVars var)
           
 void logVars(PrintStream ps)
           
 void setAuxJars(String auxJars)
           
static void setBoolVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, boolean val)
           
 void setBoolVar(HiveConf.ConfVars var, boolean val)
           
static void setFloatVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, float val)
           
 void setFloatVar(HiveConf.ConfVars var, float val)
           
static void setIntVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, int val)
           
 void setIntVar(HiveConf.ConfVars var, int val)
           
static void setLongVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, long val)
           
 void setLongVar(HiveConf.ConfVars var, long val)
           
static void setVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, String val)
           
 void setVar(HiveConf.ConfVars var, String val)
           
 void verifyAndSet(String name, String value)
           
 
Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addResource, addResource, addResource, addResource, clear, get, get, getBoolean, getClass, getClass, getClassByName, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getFile, getFloat, getInt, getLocalPath, getLong, getRange, getRaw, getResource, getStringCollection, getStrings, getStrings, iterator, main, readFields, reloadConfiguration, set, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setFloat, setIfUnset, setInt, setLong, setQuietMode, setStrings, size, toString, write, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hiveJar

protected String hiveJar

origProp

protected Properties origProp

auxJars

protected String auxJars

DATABASE_WAREHOUSE_SUFFIX

public static final String DATABASE_WAREHOUSE_SUFFIX
See Also:
Constant Field Values

DEFAULT_DATABASE_COMMENT

public static final String DEFAULT_DATABASE_COMMENT
See Also:
Constant Field Values

DEFAULT_DATABASE_NAME

public static final String DEFAULT_DATABASE_NAME
See Also:
Constant Field Values

metaVars

public static final HiveConf.ConfVars[] metaVars
Metastore related options that the db is initialized against. When a conf var in this is list is changed, the metastore instance for the CLI will be recreated so that the change will take effect.


dbVars

public static final HiveConf.ConfVars[] dbVars
dbVars are the parameters can be set per database. If these parameters are set as a database property, when switching to that database, the HiveConf variable will be changed. The change of these parameters will effectively change the DFS and MapReduce clusters for different databases.

Constructor Detail

HiveConf

public HiveConf()

HiveConf

public HiveConf(Class<?> cls)

HiveConf

public HiveConf(org.apache.hadoop.conf.Configuration other,
                Class<?> cls)

HiveConf

public HiveConf(HiveConf other)
Copy constructor

Method Detail

verifyAndSet

public void verifyAndSet(String name,
                         String value)
                  throws IllegalArgumentException
Throws:
IllegalArgumentException

getIntVar

public static int getIntVar(org.apache.hadoop.conf.Configuration conf,
                            HiveConf.ConfVars var)

setIntVar

public static void setIntVar(org.apache.hadoop.conf.Configuration conf,
                             HiveConf.ConfVars var,
                             int val)

getIntVar

public int getIntVar(HiveConf.ConfVars var)

setIntVar

public void setIntVar(HiveConf.ConfVars var,
                      int val)

getLongVar

public static long getLongVar(org.apache.hadoop.conf.Configuration conf,
                              HiveConf.ConfVars var)

getLongVar

public static long getLongVar(org.apache.hadoop.conf.Configuration conf,
                              HiveConf.ConfVars var,
                              long defaultVal)

setLongVar

public static void setLongVar(org.apache.hadoop.conf.Configuration conf,
                              HiveConf.ConfVars var,
                              long val)

getLongVar

public long getLongVar(HiveConf.ConfVars var)

setLongVar

public void setLongVar(HiveConf.ConfVars var,
                       long val)

getFloatVar

public static float getFloatVar(org.apache.hadoop.conf.Configuration conf,
                                HiveConf.ConfVars var)

getFloatVar

public static float getFloatVar(org.apache.hadoop.conf.Configuration conf,
                                HiveConf.ConfVars var,
                                float defaultVal)

setFloatVar

public static void setFloatVar(org.apache.hadoop.conf.Configuration conf,
                               HiveConf.ConfVars var,
                               float val)

getFloatVar

public float getFloatVar(HiveConf.ConfVars var)

setFloatVar

public void setFloatVar(HiveConf.ConfVars var,
                        float val)

getBoolVar

public static boolean getBoolVar(org.apache.hadoop.conf.Configuration conf,
                                 HiveConf.ConfVars var)

getBoolVar

public static boolean getBoolVar(org.apache.hadoop.conf.Configuration conf,
                                 HiveConf.ConfVars var,
                                 boolean defaultVal)

setBoolVar

public static void setBoolVar(org.apache.hadoop.conf.Configuration conf,
                              HiveConf.ConfVars var,
                              boolean val)

getBoolVar

public boolean getBoolVar(HiveConf.ConfVars var)

setBoolVar

public void setBoolVar(HiveConf.ConfVars var,
                       boolean val)

getVar

public static String getVar(org.apache.hadoop.conf.Configuration conf,
                            HiveConf.ConfVars var)

getVar

public static String getVar(org.apache.hadoop.conf.Configuration conf,
                            HiveConf.ConfVars var,
                            String defaultVal)

setVar

public static void setVar(org.apache.hadoop.conf.Configuration conf,
                          HiveConf.ConfVars var,
                          String val)

getConfVars

public static HiveConf.ConfVars getConfVars(String name)

getVar

public String getVar(HiveConf.ConfVars var)

setVar

public void setVar(HiveConf.ConfVars var,
                   String val)

logVars

public void logVars(PrintStream ps)

getAllProperties

public Properties getAllProperties()

getConfSystemProperties

public static Map<String,String> getConfSystemProperties()
This method returns a mapping from config variable name to its value for all config variables which have been set using System properties


getChangedProperties

public Properties getChangedProperties()

getHiveSitePath

public String getHiveSitePath()

getJar

public String getJar()

getAuxJars

public String getAuxJars()
Returns:
the auxJars

setAuxJars

public void setAuxJars(String auxJars)
Parameters:
auxJars - the auxJars to set

getUser

public String getUser()
               throws IOException
Returns:
the user name set in hadoop.job.ugi param or the current user from System
Throws:
IOException

getColumnInternalName

public static String getColumnInternalName(int pos)

getPositionFromInternalName

public static int getPositionFromInternalName(String internalName)


Copyright © 2013 The Apache Software Foundation