ConfigUtil (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.viewfs, class: ConfigUtil

Package org.apache.hadoop.fs.viewfs

# Class ConfigUtil

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

public class ConfigUtil extends Object
Utilities for config variables of the viewFs See `ViewFs`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConfigUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 void`
  `addLinkFallback(Configuration conf, String mountTableName, URI target)`
  Add a LinkFallback to the config for the specified mount table.
  `static void`
  `addLinkFallback(Configuration conf, URI target)`
  Add a LinkFallback to the config for the default mount table.
  `static void`
  `addLinkMerge(Configuration conf, String mountTableName, URI[] targets)`
  Add a LinkMerge to the config for the specified mount table.
  `static void`
  `addLinkMerge(Configuration conf, URI[] targets)`
  Add a LinkMerge to the config for the default mount table.
  `static void`
  `addLinkMergeSlash(Configuration conf, String mountTableName, URI target)`
  Add a LinkMergeSlash to the config for the specified mount table.
  `static void`
  `addLinkMergeSlash(Configuration conf, URI target)`
  Add a LinkMergeSlash to the config for the default mount table.
  `static void`
  `addLinkNfly(Configuration conf, String mountTableName, String src, String settings, String targets)`
  Add nfly link to configuration for the given mount table.
  `static void`
  `addLinkNfly(Configuration conf, String mountTableName, String src, String settings, URI... targets)`
  Add nfly link to configuration for the given mount table.
  `static void`
  `addLinkNfly(Configuration conf, String src, URI... targets)`
  `static void`
  `addLinkRegex(Configuration conf, String mountTableName, String srcRegex, String targetStr, String interceptorSettings)`
  Add a LinkRegex to the config for the specified 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`
  `getDefaultMountTableName(Configuration conf)`
  Get the name of the default mount table to use.
  `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 specified mount table
  `static boolean`
  `isNestedMountPointSupported(Configuration conf)`
  Check the bool config whether nested mount point is supported.
  `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
  `static void`
  `setIsNestedMountPointSupported(Configuration conf, boolean isNestedMountPointSupported)`
  Set the bool value isNestedMountPointSupported in config.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ConfigUtil

    public ConfigUtil()

- ## Method Details

  - ### 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` - mountTable.
      `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

  - ### addLinkMergeSlash

    public static void addLinkMergeSlash(Configuration conf, String mountTableName, URI target)
    Add a LinkMergeSlash to the config for the specified mount table.
    Parameters:
      `conf` - configuration.
      `mountTableName` - mountTable.
      `target` - target.

  - ### addLinkMergeSlash

    public static void addLinkMergeSlash(Configuration conf, URI target)
    Add a LinkMergeSlash to the config for the default mount table.
    Parameters:
      `conf` - configuration.
      `target` - targets.

  - ### addLinkFallback

    public static void addLinkFallback(Configuration conf, String mountTableName, URI target)
    Add a LinkFallback to the config for the specified mount table.
    Parameters:
      `conf` - configuration.
      `mountTableName` - mountTable.
      `target` - targets.

  - ### addLinkFallback

    public static void addLinkFallback(Configuration conf, URI target)
    Add a LinkFallback to the config for the default mount table.
    Parameters:
      `conf` - configuration.
      `target` - targets.

  - ### addLinkMerge

    public static void addLinkMerge(Configuration conf, String mountTableName, URI[] targets)
    Add a LinkMerge to the config for the specified mount table.
    Parameters:
      `conf` - configuration.
      `mountTableName` - mountTable.
      `targets` - targets.

  - ### addLinkMerge

    public static void addLinkMerge(Configuration conf, URI[] targets)
    Add a LinkMerge to the config for the default mount table.
    Parameters:
      `conf` - configuration.
      `targets` - targets array.

  - ### addLinkNfly

    public static void addLinkNfly(Configuration conf, String mountTableName, String src, String settings, String targets)
    Add nfly link to configuration for the given mount table.
    Parameters:
      `conf` - configuration.
      `mountTableName` - mount table.
      `src` - src.
      `settings` - settings.
      `targets` - targets.

  - ### addLinkNfly

    public static void addLinkNfly(Configuration conf, String mountTableName, String src, String settings, URI... targets)
    Add nfly link to configuration for the given mount table.
    Parameters:
      `conf` - configuration.
      `mountTableName` - mount table.
      `src` - src.
      `settings` - settings.
      `targets` - targets.

  - ### addLinkNfly

    public static void addLinkNfly(Configuration conf, String src, URI... targets)

  - ### addLinkRegex

    public static void addLinkRegex(Configuration conf, String mountTableName, String srcRegex, String targetStr, String interceptorSettings)
    Add a LinkRegex to the config for the specified mount table.
    Parameters:
      `conf` - - get mountable config from this conf
      `mountTableName` - - the mountable name of the regex config item
      `srcRegex` - - the src path regex expression that applies to this config
      `targetStr` - - the string of target path
      `interceptorSettings` - - the serialized interceptor string to be applied while resolving the mapping

  - ### 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
      `mountTableName` - - the mount table.

  - ### 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 specified mount table
    Parameters:
      `conf` - - from this conf
      `mountTableName` - - the mount table
    Returns:
      home dir value, null if variable is not in conf

  - ### getDefaultMountTableName

    public static String getDefaultMountTableName(Configuration conf)
    Get the name of the default mount table to use. If `Constants.CONFIG_VIEWFS_DEFAULT_MOUNT_TABLE_NAME_KEY` is specified, it's value is returned. Otherwise, `Constants.CONFIG_VIEWFS_DEFAULT_MOUNT_TABLE` is returned.
    Parameters:
      `conf` - Configuration to use.
    Returns:
      the name of the default mount table to use.

  - ### isNestedMountPointSupported

    public static boolean isNestedMountPointSupported(Configuration conf)
    Check the bool config whether nested mount point is supported. Default: true
    Parameters:
      `conf` - - from this conf
    Returns:
      whether nested mount point is supported

  - ### setIsNestedMountPointSupported

    public static void setIsNestedMountPointSupported(Configuration conf, boolean isNestedMountPointSupported)
    Set the bool value isNestedMountPointSupported in config.
    Parameters:
      `conf` - - from this conf
      `isNestedMountPointSupported` - - whether nested mount point is supported