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 FileCacheRepository
executor
- the executor for process each filepublic ConcurrentBatchFileCacheRepository(FileCacheRepository repository, ExecutorService executor, ConcurrentBatchFileCacheRepository.ExceptionHandler exceptionHandler)
repository
- the batch processing target FileCacheRepository
executor
- 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
BatchFileCacheRepository
resolve
in interface BatchFileCacheRepository
files
- 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–2019 Asakusa Framework Team. All rights reserved.