use of org.apache.accumulo.core.summary.Gatherer.FileSystemResolver in project accumulo by apache.
the class ThriftClientHandler method startGetSummariesFromFiles.
@Override
public TSummaries startGetSummariesFromFiles(TInfo tinfo, TCredentials credentials, TSummaryRequest request, Map<String, List<TRowRange>> files) throws ThriftSecurityException, TException {
// do not expect users to call this directly, expect other tservers to call this method
if (!security.canPerformSystemActions(credentials)) {
throw new AccumuloSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED).asThriftException();
}
ExecutorService srp = server.resourceManager.getSummaryRetrievalExecutor();
TableConfiguration tableCfg = context.getTableConfiguration(TableId.of(request.getTableId()));
BlockCache summaryCache = server.resourceManager.getSummaryCache();
BlockCache indexCache = server.resourceManager.getIndexCache();
Cache<String, Long> fileLenCache = server.resourceManager.getFileLenCache();
VolumeManager fs = context.getVolumeManager();
FileSystemResolver volMgr = fs::getFileSystemByPath;
Future<SummaryCollection> future = new Gatherer(server.getContext(), request, tableCfg, context.getCryptoService()).processFiles(volMgr, files, summaryCache, indexCache, fileLenCache, srp);
return startSummaryOperation(credentials, future);
}
Aggregations