@InterfaceAudience.Private public class MobFileCache extends Object
| Constructor and Description |
|---|
MobFileCache(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile(MobFile file)
Closes a mob file.
|
void |
evict()
Evicts the lru cached mob files when the count of the cached files is larger
than the threshold.
|
void |
evictFile(String fileName)
Evicts the cached file by the name.
|
long |
getAccessCount()
Gets the count of accesses to the mob file cache.
|
int |
getCacheSize()
Gets the count of cached mob files.
|
long |
getEvictedFileCount()
Gets the number of items evicted from the mob file cache.
|
double |
getHitRatio()
Gets the hit ratio to the mob file cache.
|
long |
getMissCount()
Gets the count of misses to the mob file cache.
|
MobFile |
openFile(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
CacheConfig cacheConf)
Opens a mob file.
|
void |
printStatistics()
Prints the statistics.
|
void |
shutdown() |
public void evict()
public void evictFile(String fileName)
fileName - The name of a cached file.public MobFile openFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, CacheConfig cacheConf) throws IOException
fs - The current file system.path - The file path.cacheConf - The current MobCacheConfigIOExceptionpublic void closeFile(MobFile file)
file - The mob file that needs to be closed.public void shutdown()
public int getCacheSize()
public long getAccessCount()
public long getMissCount()
public long getEvictedFileCount()
public double getHitRatio()
public void printStatistics()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.