public class HadoopFileCacheRepository extends Object implements FileCacheRepository
Constructor and Description |
---|
HadoopFileCacheRepository(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path repository,
LockProvider<? super org.apache.hadoop.fs.Path> lockProvider,
RetryStrategy retryStrategy)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.fs.Path |
resolve(org.apache.hadoop.fs.Path file)
Put a file into remote cache and returns the cached path.
|
public HadoopFileCacheRepository(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path repository, LockProvider<? super org.apache.hadoop.fs.Path> lockProvider, RetryStrategy retryStrategy)
configuration
- the current configurationrepository
- the cache root path (must be absolute)lockProvider
- the cache lock providerretryStrategy
- the retry strategypublic org.apache.hadoop.fs.Path resolve(org.apache.hadoop.fs.Path file) throws IOException, InterruptedException
FileCacheRepository
resolve
in interface FileCacheRepository
file
- the target file pathnull
path if this does not support the target fileIOException
- if failed to put the file into cacheInterruptedException
- if interrupted while resolving cache fileCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.