public class HierarchyDataType extends Object
Constructor and Description |
---|
HierarchyDataType() |
Modifier and Type | Method and Description |
---|---|
static String |
getDataType(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.Path cluster)
Get the hierarchyDataType format from the directory.
|
static String |
getHierarchyDataTypeDirectory(String datasource)
Transform the hierarchyDataType filename into its directory name (with
slash mark)
|
static String |
getHierarchyDataTypeFileName(String datasource)
Transform the hierarchyDatatType directory into its filename (without any
slash mark)
|
static List<org.apache.hadoop.fs.FileStatus> |
globStatus(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean recursive)
List all files under certain path and its sub-directories
|
static List<org.apache.hadoop.fs.FileStatus> |
globStatus(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.PathFilter filter,
boolean recursive)
List all matched files under the directory and its sub-dirs
|
static String |
trimSlash(String datasource)
Get the directory without first and last slash mark.
|
public static List<org.apache.hadoop.fs.FileStatus> globStatus(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.PathFilter filter, boolean recursive)
fs
- The file systempath
- The parent folderfilter
- The pattern matcher to filter the required filesrecursive
- public static List<org.apache.hadoop.fs.FileStatus> globStatus(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, boolean recursive)
fs
- The file systempath
- The parent folderrecursive
- public static String getDataType(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path cluster)
path
- The data pathcluster
- The cluster's folderpublic static String trimSlash(String datasource)
datasource
- public static String getHierarchyDataTypeFileName(String datasource)
datasource
- Copyright © 2015 Apache Software Foundation. All Rights Reserved.