Search in sources :

Example 1 with CacheFlag

use of org.apache.hadoop.fs.CacheFlag in project SSM by Intel-bigdata.

the class CacheFileAction method addDirective.

private void addDirective(String fileName) throws Exception {
    CacheDirectiveInfo.Builder filterBuilder = new CacheDirectiveInfo.Builder();
    filterBuilder.setPath(new Path(fileName));
    filterBuilder.setPool(SSMPOOL);
    CacheDirectiveInfo filter = filterBuilder.build();
    EnumSet<CacheFlag> flags = EnumSet.noneOf(CacheFlag.class);
    dfsClient.addCacheDirective(filter, flags);
}
Also used : Path(org.apache.hadoop.fs.Path) CacheFlag(org.apache.hadoop.fs.CacheFlag) CacheDirectiveInfo(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo)

Aggregations

CacheFlag (org.apache.hadoop.fs.CacheFlag)1 Path (org.apache.hadoop.fs.Path)1 CacheDirectiveInfo (org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo)1