org.apache.ignite.internal.processors.hadoop

## Class HadoopClasspathUtils

- java.lang.Object
- - org.apache.ignite.internal.processors.hadoop.HadoopClasspathUtils

    public class HadoopClasspathUtils
    extends Object

Hadoop classpath utilities.

### Nested Class Summary

Nested Classes
`static class` `HadoopClasspathUtils.AcceptAllDirectoryFilter` Filter to accept all files.
`static interface` `HadoopClasspathUtils.DirectoryFilter` Directory filter interface.
`static class` `HadoopClasspathUtils.ExactDirectoryFilter` Filter which uses exact comparison.
`static class` `HadoopClasspathUtils.PrefixDirectoryFilter` Filter which uses prefix to filter files.
`static class` `HadoopClasspathUtils.SearchDirectory` Simple pair-like structure to hold directory name and a mask assigned to it.

### Field Summary

Fields
`static String` `COMMON_HOME` Hadoop common directory.
`static String` `HADOOP_USER_LIBS` Arbitrary additional dependencies.
`static String` `HDFS_HOME` Hadoop HDFS directory.
`static String` `HOME` Hadoop home directory.
`static String` `MAPRED_HOME` Hadoop mapred directory.
`static String` `PREFIX` Prefix directory.

### Constructor Summary

Constructors
Constructor and Description
`HadoopClasspathUtils()`

### Method Summary

Methods
`static List<URL>` `classpathForClassLoader()` Gets Hadoop class path as a list of URLs (for in-process class loader usage).
`static boolean` `exists(String path)` Answers if the given path denotes existing directory.
`static HadoopLocations` `locations()` Gets Hadoop locations.
`static Collection<HadoopClasspathUtils.SearchDirectory>` `parseUserLibs()` Parse user libs.
`static Collection<HadoopClasspathUtils.SearchDirectory>` `parseUserLibs(String str)` Parse user libs.

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

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

### Field Detail

#### PREFIX

    public static final String PREFIX

Prefix directory.

See Also:
  Constant Field Values

#### HOME

    public static final String HOME

Hadoop home directory.

See Also:
  Constant Field Values

#### COMMON_HOME

    public static final String COMMON_HOME

Hadoop common directory.

See Also:
  Constant Field Values

#### HDFS_HOME

    public static final String HDFS_HOME

Hadoop HDFS directory.

See Also:
  Constant Field Values

#### MAPRED_HOME

    public static final String MAPRED_HOME

Hadoop mapred directory.

See Also:
  Constant Field Values

#### HADOOP_USER_LIBS

    public static final String HADOOP_USER_LIBS

Arbitrary additional dependencies. Compliant with standard Java classpath resolution.

See Also:
  Constant Field Values

### Constructor Detail

#### HadoopClasspathUtils

    public HadoopClasspathUtils()

### Method Detail

#### classpathForClassLoader

    public static List<URL> classpathForClassLoader()
                                             throws IOException

Gets Hadoop class path as a list of URLs (for in-process class loader usage).

Returns:
  List of class path URLs.
Throws:
  `IOException` - If failed.

#### locations

    public static HadoopLocations locations()
                                     throws IOException

Gets Hadoop locations.

Returns:
  The locations as determined from the environment.
Throws:
  `IOException`

#### parseUserLibs

    public static Collection<HadoopClasspathUtils.SearchDirectory> parseUserLibs()
                                                                          throws IOException

Parse user libs.

Returns:
  Parsed libs search patterns.
Throws:
  `IOException` - If failed.

#### parseUserLibs

    public static Collection<HadoopClasspathUtils.SearchDirectory> parseUserLibs(String str)
                                                                          throws IOException

Parse user libs.

Parameters:
  `str` - String.
Returns:
  Result.
Throws:
  `IOException` - If failed.

#### exists

    public static boolean exists(String path)

Answers if the given path denotes existing directory.

Parameters:
  `path` - The directory path.
Returns:
  `True` if the given path denotes an existing directory.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017