Search in sources :

Example 46 with MILLISECONDS

use of java.util.concurrent.TimeUnit.MILLISECONDS in project mule by mulesoft.

the class ExpiryMonitorTestCase method testNotExpiry.

@Test
public void testNotExpiry() throws InterruptedException {
    Expirable e = () -> expire();
    long startTime = currentTimeMillis();
    monitor.addExpirable(EXPIRE_TIME, MILLISECONDS, e);
    monitor.run();
    assertThat(expired, is(false));
    new PollingProber(EXPIRE_TIMEOUT, 50).check(new JUnitLambdaProbe(() -> {
        assertThat(monitor.isRegistered(e), is(false));
        assertThat(expired, is(true));
        return true;
    }, ae -> {
        ae.printStackTrace();
        return "" + currentTimeMillis() + " - " + monitor.toString();
    }));
    assertThat(expiredTime - startTime, greaterThanOrEqualTo(EXPIRE_TIME - DELTA_TIME));
}
Also used : Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) System.currentTimeMillis(java.lang.System.currentTimeMillis) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) Expirable(org.mule.runtime.core.privileged.util.monitor.Expirable) PollingProber(org.mule.tck.probe.PollingProber) Assert.assertThat(org.junit.Assert.assertThat) JUnitLambdaProbe(org.mule.tck.probe.JUnitLambdaProbe) AbstractMuleContextTestCase(org.mule.tck.junit4.AbstractMuleContextTestCase) After(org.junit.After) Matchers.is(org.hamcrest.Matchers.is) ExpiryMonitor(org.mule.runtime.core.privileged.util.monitor.ExpiryMonitor) Before(org.junit.Before) JUnitLambdaProbe(org.mule.tck.probe.JUnitLambdaProbe) PollingProber(org.mule.tck.probe.PollingProber) Expirable(org.mule.runtime.core.privileged.util.monitor.Expirable) Test(org.junit.Test)

Example 47 with MILLISECONDS

use of java.util.concurrent.TimeUnit.MILLISECONDS in project mule by mulesoft.

the class ExpiryMonitorTestCase method testExpiry.

@Test
public void testExpiry() throws InterruptedException {
    Expirable e = () -> expire();
    monitor.addExpirable(EXPIRE_TIME, MILLISECONDS, e);
    new PollingProber(EXPIRE_TIMEOUT, 50).check(new JUnitLambdaProbe(() -> {
        assertThat(monitor.isRegistered(e), is(false));
        assertThat(expired, is(true));
        return true;
    }, ae -> {
        ae.printStackTrace();
        return "" + currentTimeMillis() + " - " + monitor.toString();
    }));
}
Also used : Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) System.currentTimeMillis(java.lang.System.currentTimeMillis) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) Expirable(org.mule.runtime.core.privileged.util.monitor.Expirable) PollingProber(org.mule.tck.probe.PollingProber) Assert.assertThat(org.junit.Assert.assertThat) JUnitLambdaProbe(org.mule.tck.probe.JUnitLambdaProbe) AbstractMuleContextTestCase(org.mule.tck.junit4.AbstractMuleContextTestCase) After(org.junit.After) Matchers.is(org.hamcrest.Matchers.is) ExpiryMonitor(org.mule.runtime.core.privileged.util.monitor.ExpiryMonitor) Before(org.junit.Before) JUnitLambdaProbe(org.mule.tck.probe.JUnitLambdaProbe) PollingProber(org.mule.tck.probe.PollingProber) Expirable(org.mule.runtime.core.privileged.util.monitor.Expirable) Test(org.junit.Test)

Example 48 with MILLISECONDS

use of java.util.concurrent.TimeUnit.MILLISECONDS in project mule by mulesoft.

the class RoutersExecutionTestCase method concurrentRouterExecution.

/**
 * Executes the same flow concurrently to check that no race condition exists because
 * two different instances of Chain are being used
 */
@Test
public void concurrentRouterExecution() throws Exception {
    executor = newFixedThreadPool(2);
    final Latch beginLatch = new Latch();
    final CountDownLatch assertLatch = new CountDownLatch(2);
    final Consumer<Reference<CoreEvent>> runner = reference -> {
        try {
            beginLatch.await(10000, MILLISECONDS);
            reference.set(flowRunner("singleRouteRouter").withPayload("CustomPayload").run());
            assertLatch.countDown();
        } catch (Exception e) {
            fail(e.getMessage());
        }
    };
    final Reference<CoreEvent> first = new Reference<>();
    final Reference<CoreEvent> second = new Reference<>();
    executor.submit(() -> runner.accept(first));
    executor.submit(() -> runner.accept(second));
    beginLatch.release();
    assertLatch.await(10000, MILLISECONDS);
    CoreEvent firstResult = first.get();
    assertThat(firstResult, is(notNullValue()));
    CoreEvent secondResult = second.get();
    assertThat(secondResult, is(notNullValue()));
    assertThat(secondResult, is(not(sameInstance(firstResult))));
    assertThat(firstResult.getMessage().getPayload().getValue(), is("CustomPayload"));
    assertThat(secondResult.getMessage().getPayload().getValue(), is("CustomPayload"));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) AbstractExtensionFunctionalTestCase(org.mule.test.module.extension.AbstractExtensionFunctionalTestCase) Ricin(org.mule.test.heisenberg.extension.model.Ricin) Event(org.mule.runtime.api.event.Event) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) Assert.assertThat(org.junit.Assert.assertThat) After(org.junit.After) Assert.fail(org.junit.Assert.fail) ExpectedException(org.junit.rules.ExpectedException) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) ExecutorService(java.util.concurrent.ExecutorService) CoreMatchers.sameInstance(org.hamcrest.CoreMatchers.sameInstance) IsNot.not(org.hamcrest.core.IsNot.not) SystemProperty(org.mule.tck.junit4.rule.SystemProperty) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) Test(org.junit.Test) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) Executors.newFixedThreadPool(java.util.concurrent.Executors.newFixedThreadPool) Consumer(java.util.function.Consumer) CountDownLatch(java.util.concurrent.CountDownLatch) Latch(org.mule.runtime.api.util.concurrent.Latch) List(java.util.List) ConnectionException(org.mule.runtime.api.connection.ConnectionException) Rule(org.junit.Rule) Reference(org.mule.runtime.api.util.Reference) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) Reference(org.mule.runtime.api.util.Reference) CountDownLatch(java.util.concurrent.CountDownLatch) Latch(org.mule.runtime.api.util.concurrent.Latch) CountDownLatch(java.util.concurrent.CountDownLatch) ExpectedException(org.junit.rules.ExpectedException) ConnectionException(org.mule.runtime.api.connection.ConnectionException) Test(org.junit.Test)

Example 49 with MILLISECONDS

use of java.util.concurrent.TimeUnit.MILLISECONDS in project presto by prestodb.

the class QueryStats method create.

public static QueryStats create(QueryStateTimer queryStateTimer, Optional<StageInfo> rootStage, int peakRunningTasks, DataSize peakUserMemoryReservation, DataSize peakTotalMemoryReservation, DataSize peakTaskUserMemory, DataSize peakTaskTotalMemory, DataSize peakNodeTotalMemory, RuntimeStats runtimeStats) {
    int totalTasks = 0;
    int runningTasks = 0;
    int completedTasks = 0;
    int totalDrivers = 0;
    int queuedDrivers = 0;
    int runningDrivers = 0;
    int blockedDrivers = 0;
    int completedDrivers = 0;
    double cumulativeUserMemory = 0;
    double cumulativeTotalMemory = 0;
    long userMemoryReservation = 0;
    long totalMemoryReservation = 0;
    long totalScheduledTime = 0;
    long totalCpuTime = 0;
    long retriedCpuTime = 0;
    long totalBlockedTime = 0;
    long totalAllocation = 0;
    long rawInputDataSize = 0;
    long rawInputPositions = 0;
    long processedInputDataSize = 0;
    long processedInputPositions = 0;
    long outputDataSize = 0;
    long outputPositions = 0;
    long writtenOutputPositions = 0;
    long writtenOutputLogicalDataSize = 0;
    long writtenOutputPhysicalDataSize = 0;
    long writtenIntermediatePhysicalDataSize = 0;
    ImmutableList.Builder<StageGcStatistics> stageGcStatistics = ImmutableList.builder();
    boolean fullyBlocked = rootStage.isPresent();
    Set<BlockedReason> blockedReasons = new HashSet<>();
    ImmutableList.Builder<OperatorStats> operatorStatsSummary = ImmutableList.builder();
    boolean completeInfo = true;
    RuntimeStats mergedRuntimeStats = RuntimeStats.copyOf(runtimeStats);
    for (StageInfo stageInfo : getAllStages(rootStage)) {
        StageExecutionStats stageExecutionStats = stageInfo.getLatestAttemptExecutionInfo().getStats();
        totalTasks += stageExecutionStats.getTotalTasks();
        runningTasks += stageExecutionStats.getRunningTasks();
        completedTasks += stageExecutionStats.getCompletedTasks();
        totalDrivers += stageExecutionStats.getTotalDrivers();
        queuedDrivers += stageExecutionStats.getQueuedDrivers();
        runningDrivers += stageExecutionStats.getRunningDrivers();
        blockedDrivers += stageExecutionStats.getBlockedDrivers();
        completedDrivers += stageExecutionStats.getCompletedDrivers();
        cumulativeUserMemory += stageExecutionStats.getCumulativeUserMemory();
        cumulativeTotalMemory += stageExecutionStats.getCumulativeTotalMemory();
        userMemoryReservation += stageExecutionStats.getUserMemoryReservation().toBytes();
        totalMemoryReservation += stageExecutionStats.getTotalMemoryReservation().toBytes();
        totalScheduledTime += stageExecutionStats.getTotalScheduledTime().roundTo(MILLISECONDS);
        totalCpuTime += stageExecutionStats.getTotalCpuTime().roundTo(MILLISECONDS);
        retriedCpuTime += computeRetriedCpuTime(stageInfo);
        totalBlockedTime += stageExecutionStats.getTotalBlockedTime().roundTo(MILLISECONDS);
        if (!stageInfo.getLatestAttemptExecutionInfo().getState().isDone()) {
            fullyBlocked &= stageExecutionStats.isFullyBlocked();
            blockedReasons.addAll(stageExecutionStats.getBlockedReasons());
        }
        totalAllocation += stageExecutionStats.getTotalAllocation().toBytes();
        if (stageInfo.getPlan().isPresent()) {
            PlanFragment plan = stageInfo.getPlan().get();
            if (!plan.getTableScanSchedulingOrder().isEmpty()) {
                rawInputDataSize += stageExecutionStats.getRawInputDataSize().toBytes();
                rawInputPositions += stageExecutionStats.getRawInputPositions();
                processedInputDataSize += stageExecutionStats.getProcessedInputDataSize().toBytes();
                processedInputPositions += stageExecutionStats.getProcessedInputPositions();
            }
            if (plan.isOutputTableWriterFragment()) {
                writtenOutputPositions += stageExecutionStats.getOperatorSummaries().stream().filter(stats -> stats.getOperatorType().equals(TableWriterOperator.class.getSimpleName())).mapToLong(OperatorStats::getInputPositions).sum();
                writtenOutputLogicalDataSize += stageExecutionStats.getOperatorSummaries().stream().filter(stats -> stats.getOperatorType().equals(TableWriterOperator.class.getSimpleName())).mapToLong(stats -> stats.getInputDataSize().toBytes()).sum();
                writtenOutputPhysicalDataSize += stageExecutionStats.getPhysicalWrittenDataSize().toBytes();
            } else {
                writtenIntermediatePhysicalDataSize += stageExecutionStats.getPhysicalWrittenDataSize().toBytes();
            }
        }
        stageGcStatistics.add(stageExecutionStats.getGcInfo());
        completeInfo = completeInfo && stageInfo.isFinalStageInfo();
        operatorStatsSummary.addAll(stageExecutionStats.getOperatorSummaries());
        // We prepend each metric name with the stage id to avoid merging metrics across stages.
        int stageId = stageInfo.getStageId().getId();
        stageExecutionStats.getRuntimeStats().getMetrics().forEach((name, metric) -> {
            String metricName = String.format("S%d-%s", stageId, name);
            mergedRuntimeStats.mergeMetric(metricName, metric);
        });
    }
    if (rootStage.isPresent()) {
        StageExecutionStats outputStageStats = rootStage.get().getLatestAttemptExecutionInfo().getStats();
        outputDataSize += outputStageStats.getOutputDataSize().toBytes();
        outputPositions += outputStageStats.getOutputPositions();
    }
    return new QueryStats(queryStateTimer.getCreateTime(), queryStateTimer.getExecutionStartTime().orElse(null), queryStateTimer.getLastHeartbeat(), queryStateTimer.getEndTime().orElse(null), queryStateTimer.getElapsedTime(), queryStateTimer.getWaitingForPrerequisitesTime(), queryStateTimer.getQueuedTime(), queryStateTimer.getResourceWaitingTime(), queryStateTimer.getSemanticAnalyzingTime(), queryStateTimer.getColumnAccessPermissionCheckingTime(), queryStateTimer.getDispatchingTime(), queryStateTimer.getExecutionTime(), queryStateTimer.getAnalysisTime(), queryStateTimer.getPlanningTime(), queryStateTimer.getFinishingTime(), totalTasks, runningTasks, peakRunningTasks, completedTasks, totalDrivers, queuedDrivers, runningDrivers, blockedDrivers, completedDrivers, cumulativeUserMemory, cumulativeTotalMemory, succinctBytes(userMemoryReservation), succinctBytes(totalMemoryReservation), peakUserMemoryReservation, peakTotalMemoryReservation, peakTaskUserMemory, peakTaskTotalMemory, peakNodeTotalMemory, isScheduled(rootStage), succinctDuration(totalScheduledTime, MILLISECONDS), succinctDuration(totalCpuTime, MILLISECONDS), succinctDuration(retriedCpuTime, MILLISECONDS), succinctDuration(totalBlockedTime, MILLISECONDS), fullyBlocked, blockedReasons, succinctBytes(totalAllocation), succinctBytes(rawInputDataSize), rawInputPositions, succinctBytes(processedInputDataSize), processedInputPositions, succinctBytes(outputDataSize), outputPositions, writtenOutputPositions, succinctBytes(writtenOutputLogicalDataSize), succinctBytes(writtenOutputPhysicalDataSize), succinctBytes(writtenIntermediatePhysicalDataSize), stageGcStatistics.build(), operatorStatsSummary.build(), mergedRuntimeStats);
}
Also used : JsonProperty(com.fasterxml.jackson.annotation.JsonProperty) OptionalDouble(java.util.OptionalDouble) DataSize.succinctBytes(io.airlift.units.DataSize.succinctBytes) StageGcStatistics(com.facebook.presto.spi.eventlistener.StageGcStatistics) Duration(io.airlift.units.Duration) OperatorStats(com.facebook.presto.operator.OperatorStats) HashSet(java.util.HashSet) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) PlanFragment(com.facebook.presto.sql.planner.PlanFragment) ImmutableList(com.google.common.collect.ImmutableList) Objects.requireNonNull(java.util.Objects.requireNonNull) RuntimeStats(com.facebook.presto.common.RuntimeStats) Duration.succinctDuration(io.airlift.units.Duration.succinctDuration) Nullable(javax.annotation.Nullable) StageInfo.getAllStages(com.facebook.presto.execution.StageInfo.getAllStages) BlockedReason(com.facebook.presto.operator.BlockedReason) ImmutableSet(com.google.common.collect.ImmutableSet) DateTime(org.joda.time.DateTime) Set(java.util.Set) Math.min(java.lang.Math.min) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) TableWriterOperator(com.facebook.presto.operator.TableWriterOperator) DataSize(io.airlift.units.DataSize) List(java.util.List) JsonCreator(com.fasterxml.jackson.annotation.JsonCreator) Optional(java.util.Optional) BYTE(io.airlift.units.DataSize.Unit.BYTE) BlockedReason(com.facebook.presto.operator.BlockedReason) ImmutableList(com.google.common.collect.ImmutableList) RuntimeStats(com.facebook.presto.common.RuntimeStats) OperatorStats(com.facebook.presto.operator.OperatorStats) PlanFragment(com.facebook.presto.sql.planner.PlanFragment) TableWriterOperator(com.facebook.presto.operator.TableWriterOperator) StageGcStatistics(com.facebook.presto.spi.eventlistener.StageGcStatistics) HashSet(java.util.HashSet)

Example 50 with MILLISECONDS

use of java.util.concurrent.TimeUnit.MILLISECONDS in project presto by prestodb.

the class IcebergModule method createStripeMetadataSourceFactory.

@Singleton
@Provides
public StripeMetadataSourceFactory createStripeMetadataSourceFactory(OrcCacheConfig orcCacheConfig, MBeanExporter exporter) {
    StripeMetadataSource stripeMetadataSource = new StorageStripeMetadataSource();
    if (orcCacheConfig.isStripeMetadataCacheEnabled()) {
        Cache<StripeReader.StripeId, Slice> footerCache = CacheBuilder.newBuilder().maximumWeight(orcCacheConfig.getStripeFooterCacheSize().toBytes()).weigher((id, footer) -> toIntExact(((Slice) footer).getRetainedSize())).expireAfterAccess(orcCacheConfig.getStripeFooterCacheTtlSinceLastAccess().toMillis(), MILLISECONDS).recordStats().build();
        Cache<StripeReader.StripeStreamId, Slice> streamCache = CacheBuilder.newBuilder().maximumWeight(orcCacheConfig.getStripeStreamCacheSize().toBytes()).weigher((id, stream) -> toIntExact(((Slice) stream).getRetainedSize())).expireAfterAccess(orcCacheConfig.getStripeStreamCacheTtlSinceLastAccess().toMillis(), MILLISECONDS).recordStats().build();
        CacheStatsMBean footerCacheStatsMBean = new CacheStatsMBean(footerCache);
        CacheStatsMBean streamCacheStatsMBean = new CacheStatsMBean(streamCache);
        exporter.export(generatedNameOf(CacheStatsMBean.class, connectorId + "_StripeFooter"), footerCacheStatsMBean);
        exporter.export(generatedNameOf(CacheStatsMBean.class, connectorId + "_StripeStream"), streamCacheStatsMBean);
        Optional<Cache<StripeReader.StripeStreamId, List<RowGroupIndex>>> rowGroupIndexCache = Optional.empty();
        if (orcCacheConfig.isRowGroupIndexCacheEnabled()) {
            rowGroupIndexCache = Optional.of(CacheBuilder.newBuilder().maximumWeight(orcCacheConfig.getRowGroupIndexCacheSize().toBytes()).weigher((id, rowGroupIndices) -> toIntExact(((List<RowGroupIndex>) rowGroupIndices).stream().mapToLong(RowGroupIndex::getRetainedSizeInBytes).sum())).expireAfterAccess(orcCacheConfig.getStripeStreamCacheTtlSinceLastAccess().toMillis(), MILLISECONDS).recordStats().build());
            CacheStatsMBean rowGroupIndexCacheStatsMBean = new CacheStatsMBean(rowGroupIndexCache.get());
            exporter.export(generatedNameOf(CacheStatsMBean.class, connectorId + "_StripeStreamRowGroupIndex"), rowGroupIndexCacheStatsMBean);
        }
        stripeMetadataSource = new CachingStripeMetadataSource(stripeMetadataSource, footerCache, streamCache, rowGroupIndexCache);
    }
    StripeMetadataSourceFactory factory = StripeMetadataSourceFactory.of(stripeMetadataSource);
    if (orcCacheConfig.isDwrfStripeCacheEnabled()) {
        factory = new DwrfAwareStripeMetadataSourceFactory(factory);
    }
    return factory;
}
Also used : StripeMetadataSource(com.facebook.presto.orc.StripeMetadataSource) CachingStripeMetadataSource(com.facebook.presto.orc.CachingStripeMetadataSource) StorageStripeMetadataSource(com.facebook.presto.orc.StorageStripeMetadataSource) HdfsEnvironment(com.facebook.presto.hive.HdfsEnvironment) Module(com.google.inject.Module) CacheStatsMBean(com.facebook.presto.hive.CacheStatsMBean) StripeMetadataSource(com.facebook.presto.orc.StripeMetadataSource) TestingMBeanServer(org.weakref.jmx.testing.TestingMBeanServer) OrcCacheConfig(com.facebook.presto.orc.cache.OrcCacheConfig) CacheConfig(com.facebook.presto.cache.CacheConfig) ConnectorNodePartitioningProvider(com.facebook.presto.spi.connector.ConnectorNodePartitioningProvider) ExtendedHiveMetastore(com.facebook.presto.hive.metastore.ExtendedHiveMetastore) EncryptionLibrary(com.facebook.presto.orc.EncryptionLibrary) RowGroupIndex(com.facebook.presto.orc.metadata.RowGroupIndex) ExportBinder.newExporter(org.weakref.jmx.guice.ExportBinder.newExporter) DynamicConfigurationProvider(com.facebook.presto.hive.DynamicConfigurationProvider) CachingOrcFileTailSource(com.facebook.presto.orc.cache.CachingOrcFileTailSource) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) FileFormatDataSourceStats(com.facebook.presto.hive.FileFormatDataSourceStats) ConnectorPageSourceProvider(com.facebook.presto.spi.connector.ConnectorPageSourceProvider) HiveHdfsConfiguration(com.facebook.presto.hive.HiveHdfsConfiguration) HiveClientConfig(com.facebook.presto.hive.HiveClientConfig) StripeMetadataSourceFactory(com.facebook.presto.orc.StripeMetadataSourceFactory) ConnectorSplitManager(com.facebook.presto.spi.connector.ConnectorSplitManager) PartitionMutator(com.facebook.presto.hive.PartitionMutator) HiveDwrfEncryptionProvider(com.facebook.presto.hive.HiveDwrfEncryptionProvider) GcsConfigurationInitializer(com.facebook.presto.hive.gcs.GcsConfigurationInitializer) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) Multibinder(com.google.inject.multibindings.Multibinder) HdfsConfigurationInitializer(com.facebook.presto.hive.HdfsConfigurationInitializer) Threads.daemonThreadsNamed(com.facebook.airlift.concurrent.Threads.daemonThreadsNamed) CacheFactory(com.facebook.presto.cache.CacheFactory) DwrfAwareStripeMetadataSourceFactory(com.facebook.presto.orc.DwrfAwareStripeMetadataSourceFactory) Procedure(com.facebook.presto.spi.procedure.Procedure) List(java.util.List) CachingStripeMetadataSource(com.facebook.presto.orc.CachingStripeMetadataSource) StripeReader(com.facebook.presto.orc.StripeReader) Optional(java.util.Optional) CacheBuilder(com.google.common.cache.CacheBuilder) MetastoreConfig(com.facebook.presto.hive.metastore.MetastoreConfig) FileMergeCacheConfig(com.facebook.presto.cache.filemerge.FileMergeCacheConfig) Slice(io.airlift.slice.Slice) HiveGcsConfigurationInitializer(com.facebook.presto.hive.gcs.HiveGcsConfigurationInitializer) ForCachingHiveMetastore(com.facebook.presto.hive.ForCachingHiveMetastore) ParquetFileWriterConfig(com.facebook.presto.hive.ParquetFileWriterConfig) Singleton(javax.inject.Singleton) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) HdfsConfiguration(com.facebook.presto.hive.HdfsConfiguration) Binder(com.google.inject.Binder) OrcFileTail(com.facebook.presto.orc.metadata.OrcFileTail) MBeanServer(javax.management.MBeanServer) Math.toIntExact(java.lang.Math.toIntExact) OrcFileTailSource(com.facebook.presto.orc.cache.OrcFileTailSource) ConnectorPageSinkProvider(com.facebook.presto.spi.connector.ConnectorPageSinkProvider) HiveNodePartitioningProvider(com.facebook.presto.hive.HiveNodePartitioningProvider) MetastoreClientConfig(com.facebook.presto.hive.MetastoreClientConfig) ExecutorService(java.util.concurrent.ExecutorService) ForMetastoreHdfsEnvironment(com.facebook.presto.hive.ForMetastoreHdfsEnvironment) OrcDataSourceId(com.facebook.presto.orc.OrcDataSourceId) CacheStats(com.facebook.presto.cache.CacheStats) ObjectNames.generatedNameOf(org.weakref.jmx.ObjectNames.generatedNameOf) IcebergPlanOptimizer(com.facebook.presto.iceberg.optimizer.IcebergPlanOptimizer) CachingHiveMetastore(com.facebook.presto.hive.metastore.CachingHiveMetastore) OrcFileWriterConfig(com.facebook.presto.hive.OrcFileWriterConfig) StorageStripeMetadataSource(com.facebook.presto.orc.StorageStripeMetadataSource) UnsupportedEncryptionLibrary(com.facebook.presto.orc.UnsupportedEncryptionLibrary) Scopes(com.google.inject.Scopes) Executors.newFixedThreadPool(java.util.concurrent.Executors.newFixedThreadPool) HiveCachingHdfsConfiguration(com.facebook.presto.hive.cache.HiveCachingHdfsConfiguration) HivePartitionMutator(com.facebook.presto.hive.metastore.HivePartitionMutator) StorageOrcFileTailSource(com.facebook.presto.orc.cache.StorageOrcFileTailSource) Provides(com.google.inject.Provides) HiveGcsConfig(com.facebook.presto.hive.gcs.HiveGcsConfig) ForCachingFileSystem(com.facebook.presto.cache.ForCachingFileSystem) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) Cache(com.google.common.cache.Cache) MBeanExporter(org.weakref.jmx.MBeanExporter) StripeMetadataSourceFactory(com.facebook.presto.orc.StripeMetadataSourceFactory) DwrfAwareStripeMetadataSourceFactory(com.facebook.presto.orc.DwrfAwareStripeMetadataSourceFactory) CachingStripeMetadataSource(com.facebook.presto.orc.CachingStripeMetadataSource) StripeReader(com.facebook.presto.orc.StripeReader) RowGroupIndex(com.facebook.presto.orc.metadata.RowGroupIndex) Slice(io.airlift.slice.Slice) DwrfAwareStripeMetadataSourceFactory(com.facebook.presto.orc.DwrfAwareStripeMetadataSourceFactory) CacheStatsMBean(com.facebook.presto.hive.CacheStatsMBean) StorageStripeMetadataSource(com.facebook.presto.orc.StorageStripeMetadataSource) Cache(com.google.common.cache.Cache) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

MILLISECONDS (java.util.concurrent.TimeUnit.MILLISECONDS)56 List (java.util.List)35 Test (org.junit.Test)27 CountDownLatch (java.util.concurrent.CountDownLatch)22 ArrayList (java.util.ArrayList)20 Arrays (java.util.Arrays)15 Optional (java.util.Optional)15 SECONDS (java.util.concurrent.TimeUnit.SECONDS)15 Future (java.util.concurrent.Future)14 Before (org.junit.Before)13 Duration (io.airlift.units.Duration)11 Map (java.util.Map)11 ExecutorService (java.util.concurrent.ExecutorService)8 Context (android.content.Context)7 Math.toIntExact (java.lang.Math.toIntExact)7 TimeUnit (java.util.concurrent.TimeUnit)7 Rule (org.junit.Rule)7 Threads.daemonThreadsNamed (com.facebook.airlift.concurrent.Threads.daemonThreadsNamed)6 Cache (com.google.common.cache.Cache)6 CacheBuilder (com.google.common.cache.CacheBuilder)6