Search in sources :

Example 1 with FileSystemResolver

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);
}
Also used : VolumeManager(org.apache.accumulo.server.fs.VolumeManager) Gatherer(org.apache.accumulo.core.summary.Gatherer) ExecutorService(java.util.concurrent.ExecutorService) BlockCache(org.apache.accumulo.core.spi.cache.BlockCache) AccumuloSecurityException(org.apache.accumulo.core.client.AccumuloSecurityException) SummaryCollection(org.apache.accumulo.core.summary.SummaryCollection) TableConfiguration(org.apache.accumulo.server.conf.TableConfiguration) FileSystemResolver(org.apache.accumulo.core.summary.Gatherer.FileSystemResolver)

Aggregations

ExecutorService (java.util.concurrent.ExecutorService)1 AccumuloSecurityException (org.apache.accumulo.core.client.AccumuloSecurityException)1 BlockCache (org.apache.accumulo.core.spi.cache.BlockCache)1 Gatherer (org.apache.accumulo.core.summary.Gatherer)1 FileSystemResolver (org.apache.accumulo.core.summary.Gatherer.FileSystemResolver)1 SummaryCollection (org.apache.accumulo.core.summary.SummaryCollection)1 TableConfiguration (org.apache.accumulo.server.conf.TableConfiguration)1 VolumeManager (org.apache.accumulo.server.fs.VolumeManager)1