Database Reference
In-Depth Information
/
├── 2007/
│ └── 12/
│ ├── 30/
│ └── 31/
└── 2008/
└── 01/
├── 01/
└── 02/
Here are some file globs and their expansions:
Glob
Expansion
/2007 /2008
/*
/2007/12 /2008/01
/*/*
/2007/12/30 /2007/12/31
/*/12/*
/2007 /2008
/200?
/2007 /2008
/200[78]
/2007 /2008
/200[7-8]
/200[^01234569] /2007 /2008
/2007/12/31 /2008/01/01
/*/*/{31,01}
/2007/12/30 /2007/12/31
/*/*/3{0,1}
/*/{12/31,01/01} /2007/12/31 /2008/01/01
PathFilter
Glob patterns are not always powerful enough to describe a set of files you want to access.
For example, it is not generally possible to exclude a particular file using a glob pattern.
The listStatus() and globStatus() methods of FileSystem take an optional
PathFilter , which allows programmatic control over matching:
package org . apache . hadoop . fs ;
public interface PathFilter {
boolean accept ( Path path );
}
PathFilter is the equivalent of java.io.FileFilter for Path objects rather
than File objects.
Search WWH ::




Custom Search