public class ConcurrentBatchFileCacheRepository extends Object implements BatchFileCacheRepository
FileCacheRepository.resolve(Path) concurrently.| Modifier and Type | Class and Description |
|---|---|
static interface |
ConcurrentBatchFileCacheRepository.ExceptionHandler
Exception handler.
|
| Constructor and Description |
|---|
ConcurrentBatchFileCacheRepository(FileCacheRepository repository,
ExecutorService executor)
Creates a new instance with default exception handler.
|
ConcurrentBatchFileCacheRepository(FileCacheRepository repository,
ExecutorService executor,
ConcurrentBatchFileCacheRepository.ExceptionHandler exceptionHandler)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Map<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path> |
resolve(List<? extends org.apache.hadoop.fs.Path> files)
Put files into remote cache and returns a mapping original files into cached path.
|
public ConcurrentBatchFileCacheRepository(FileCacheRepository repository, ExecutorService executor)
repository - the batch processing target FileCacheRepositoryexecutor - the executor for process each filepublic ConcurrentBatchFileCacheRepository(FileCacheRepository repository, ExecutorService executor, ConcurrentBatchFileCacheRepository.ExceptionHandler exceptionHandler)
repository - the batch processing target FileCacheRepositoryexecutor - the executor for process each fileexceptionHandler - exception handler for processing each file,
or null to just report (as 'WARN' level) for each exceptionpublic Map<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path> resolve(List<? extends org.apache.hadoop.fs.Path> files) throws IOException, InterruptedException
BatchFileCacheRepositoryresolve in interface BatchFileCacheRepositoryfiles - the target file pathsnull if this cannot prepare cache for the corresponding original fileIOException - if failed to put the file into cacheInterruptedException - if interrupted while resolving cache fileCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.