org.apache.hadoop.fs.viewfs
Class ConfigUtil

java.lang.Object
  extended by org.apache.hadoop.fs.viewfs.ConfigUtil

public class ConfigUtil
extends Object

Utilities for config variables of the viewFs See ViewFs


Constructor Summary
ConfigUtil()
           
 
Method Summary
static void addLink(Configuration conf, String mountTableName, String src, URI target)
          Add a link to the config for the specified mount table
static void addLink(Configuration conf, String src, URI target)
          Add a link to the config for the default mount table
static String getConfigViewFsPrefix()
          Get the config variable prefix for the default mount table
static String getConfigViewFsPrefix(String mountTableName)
          Get the config variable prefix for the specified mount table
static String getHomeDirValue(Configuration conf)
          Get the value of the home dir conf value for default mount table
static String getHomeDirValue(Configuration conf, String mountTableName)
          Get the value of the home dir conf value for specfied mount table
static void setHomeDirConf(Configuration conf, String homedir)
          Add config variable for homedir for default mount table
static void setHomeDirConf(Configuration conf, String mountTableName, String homedir)
          Add config variable for homedir the specified mount table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigUtil

public ConfigUtil()
Method Detail

getConfigViewFsPrefix

public static String getConfigViewFsPrefix(String mountTableName)
Get the config variable prefix for the specified mount table

Parameters:
mountTableName - - the name of the mount table
Returns:
the config variable prefix for the specified mount table

getConfigViewFsPrefix

public static String getConfigViewFsPrefix()
Get the config variable prefix for the default mount table

Returns:
the config variable prefix for the default mount table

addLink

public static void addLink(Configuration conf,
                           String mountTableName,
                           String src,
                           URI target)
Add a link to the config for the specified mount table

Parameters:
conf - - add the link to this conf
mountTableName -
src - - the src path name
target - - the target URI link

addLink

public static void addLink(Configuration conf,
                           String src,
                           URI target)
Add a link to the config for the default mount table

Parameters:
conf - - add the link to this conf
src - - the src path name
target - - the target URI link

setHomeDirConf

public static void setHomeDirConf(Configuration conf,
                                  String homedir)
Add config variable for homedir for default mount table

Parameters:
conf - - add to this conf
homedir - - the home dir path starting with slash

setHomeDirConf

public static void setHomeDirConf(Configuration conf,
                                  String mountTableName,
                                  String homedir)
Add config variable for homedir the specified mount table

Parameters:
conf - - add to this conf
homedir - - the home dir path starting with slash

getHomeDirValue

public static String getHomeDirValue(Configuration conf)
Get the value of the home dir conf value for default mount table

Parameters:
conf - - from this conf
Returns:
home dir value, null if variable is not in conf

getHomeDirValue

public static String getHomeDirValue(Configuration conf,
                                     String mountTableName)
Get the value of the home dir conf value for specfied mount table

Parameters:
conf - - from this conf
mountTableName - - the mount table
Returns:
home dir value, null if variable is not in conf


Copyright © 2013 Apache Software Foundation. All Rights Reserved.