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.
static class HiveConf.LongRangeValidator
           
static class HiveConf.PatternValidator
           
static class HiveConf.RatioValidator
           
static class HiveConf.StringsValidator
           
static interface HiveConf.Validator
          validate value for a ConfVar, return non-null string for fail message
 
Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration
org.apache.hadoop.conf.Configuration.IntegerRanges
 
Field Summary
protected  String auxJars
           
static HiveConf.ConfVars[] dbVars
          dbVars are the parameters can be set per database.
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
 void addToModifiableWhiteList(String paramname)
          Add config parameter name to whitelist of parameters that can be modified
 void addToRestrictList(String restrictListStr)
          Append comma separated list of config vars to the restrict List
 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)
           
 URL getHiveDefaultLocation()
           
static URL getHiveSiteLocation()
           
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 setHiveSiteLocation(URL location)
           
static void setIntVar(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars var, int val)
           
 void setIntVar(HiveConf.ConfVars var, int val)
           
 void setIsModWhiteListEnabled(boolean isEnabled)
          Set if whitelist check is enabled for parameter modification
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, dumpConfiguration, get, get, getBoolean, getClass, getClass, getClassByName, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getEnum, getFile, getFloat, getInstances, getInt, getLocalPath, getLong, getRange, getRaw, getResource, getStringCollection, getStrings, getStrings, getValByRegex, iterator, main, readFields, reloadConfiguration, set, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setEnum, setFloat, setIfUnset, setInt, setLong, setQuietMode, setStrings, size, toString, unset, write, writeXml, 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

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()

getJar

public String getJar()

getAuxJars

public String getAuxJars()
Returns:
the auxJars

setAuxJars

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

getHiveDefaultLocation

public URL getHiveDefaultLocation()

setHiveSiteLocation

public static void setHiveSiteLocation(URL location)

getHiveSiteLocation

public static URL getHiveSiteLocation()

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)

addToRestrictList

public void addToRestrictList(String restrictListStr)
Append comma separated list of config vars to the restrict List

Parameters:
restrictListStr -

setIsModWhiteListEnabled

@InterfaceAudience.LimitedPrivate(value="Currently only for use by HiveAuthorizer")
public void setIsModWhiteListEnabled(boolean isEnabled)
Set if whitelist check is enabled for parameter modification

Parameters:
isEnabled -

addToModifiableWhiteList

@InterfaceAudience.LimitedPrivate(value="Currently only for use by HiveAuthorizer")
public void addToModifiableWhiteList(String paramname)
Add config parameter name to whitelist of parameters that can be modified

Parameters:
paramname -


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