@Override public TaskManagerRuntimeInfo getTaskManagerInfo() { return new TestingTaskManagerRuntimeInfo(); }
libCache, mock(FileCache.class), new TestingTaskManagerRuntimeInfo(taskManagerConfig, new String[] {System.getProperty("java.io.tmpdir")}), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), consumableNotifier,
new FileCache(new String[] { EnvironmentInformation.getTemporaryFileDirectory() }, blobService.getPermanentBlobService()), new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), new NoOpResultPartitionConsumableNotifier(),
new FileCache(new String[] { EnvironmentInformation.getTemporaryFileDirectory() }, blobService.getPermanentBlobService()), new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), new NoOpResultPartitionConsumableNotifier(),
/** * Verifies that latency metrics can be enabled via the configuration. */ @Test public void testLatencyMarkEmissionEnabledViaFlinkConfig() throws Exception { testLatencyMarkEmission((int) (maxProcessingTime / latencyMarkInterval) + 1, (operator, timeProvider) -> { Configuration tmConfig = new Configuration(); tmConfig.setLong(MetricOptions.LATENCY_INTERVAL, latencyMarkInterval); Environment env = MockEnvironment.builder() .setTaskManagerRuntimeInfo(new TestingTaskManagerRuntimeInfo(tmConfig)) .build(); setupSourceOperator(operator, new ExecutionConfig(), env, timeProvider); }); }
taskConfiguration); final TaskManagerRuntimeInfo taskManagerRuntimeInfo = new TestingTaskManagerRuntimeInfo();
/** * Verifies that latency metrics can be enabled via the {@link ExecutionConfig} even if they are disabled via * the configuration. */ @Test public void testLatencyMarkEmissionEnabledOverrideViaExecutionConfig() throws Exception { testLatencyMarkEmission((int) (maxProcessingTime / latencyMarkInterval) + 1, (operator, timeProvider) -> { ExecutionConfig executionConfig = new ExecutionConfig(); executionConfig.setLatencyTrackingInterval(latencyMarkInterval); Configuration tmConfig = new Configuration(); tmConfig.setLong(MetricOptions.LATENCY_INTERVAL, 0L); Environment env = MockEnvironment.builder() .setTaskManagerRuntimeInfo(new TestingTaskManagerRuntimeInfo(tmConfig)) .build(); setupSourceOperator(operator, executionConfig, env, timeProvider); }); }
/** * Verifies that latency metrics can be disabled via the {@link ExecutionConfig} even if they are enabled via * the configuration. */ @Test public void testLatencyMarkEmissionDisabledOverrideViaExecutionConfig() throws Exception { testLatencyMarkEmission(0, (operator, timeProvider) -> { Configuration tmConfig = new Configuration(); tmConfig.setLong(MetricOptions.LATENCY_INTERVAL, latencyMarkInterval); Environment env = MockEnvironment.builder() .setTaskManagerRuntimeInfo(new TestingTaskManagerRuntimeInfo(tmConfig)) .build(); ExecutionConfig executionConfig = new ExecutionConfig(); executionConfig.setLatencyTrackingInterval(0); setupSourceOperator(operator, executionConfig, env, timeProvider); }); }