target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testOperatorChainWithProcessingTime() throws Exception { JobVertex chainedVertex = createChainedVertex(false); final OneInputStreamTaskTestHarness<Integer, Integer> testHarness = new OneInputStreamTaskTestHarness<>( OneInputStreamTask::new, 1, 1, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INF...
@Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(element); if (timeout > 0L) { long timeoutTimestamp = timeout + getProcessingTimeService().getCurrentProcessingTime(); final ScheduledFuture<?> timer...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
@Test public void testStateSnapshotAndRestore() throws Exception { final OneInputStreamTaskTestHarness<Integer, Integer> testHarness = new OneInputStreamTaskTestHarness<>( OneInputStreamTask::new, 1, 1, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO); testHarness.setupOutputForSingletonOperatorChain(); AsyncW...
@Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(element); if (timeout > 0L) { long timeoutTimestamp = timeout + getProcessingTimeService().getCurrentProcessingTime(); final ScheduledFuture<?> timer...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
AsyncWaitOperator extends AbstractUdfStreamOperator<OUT, AsyncFunction<IN, OUT>> implements OneInputStreamOperator<IN, OUT>, OperatorActions { @Override public void processElement(StreamRecord<IN> element) throws Exception { final StreamRecordQueueEntry<OUT> streamRecordBufferEntry = new StreamRecordQueueEntry<>(elemen...
@Test public void testRestoreProcedureOrderAndFailure() throws Exception { CloseableRegistry closeableRegistry = new CloseableRegistry(); CheckpointStreamFactory checkpointStreamFactory = new MemCheckpointStreamFactory(1024); ListStateDescriptor<Integer> stateDescriptor = new ListStateDescriptor<>("test-state", Integer...
@Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeIdx < restoreOptions.size()) ...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
@Test public void testExceptionThrownIfAllRestoresFailed() throws Exception { CloseableRegistry closeableRegistry = new CloseableRegistry(); OperatorStateHandle firstFailHandle = mock(OperatorStateHandle.class); OperatorStateHandle secondFailHandle = mock(OperatorStateHandle.class); OperatorStateHandle thirdFailHandle ...
@Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeIdx < restoreOptions.size()) ...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
@Test public void testCanBeCanceledViaRegistry() throws Exception { CloseableRegistry closeableRegistry = new CloseableRegistry(); OneShotLatch waitForBlock = new OneShotLatch(); OneShotLatch unblock = new OneShotLatch(); OperatorStateHandle blockingRestoreHandle = mock(OperatorStateHandle.class); when(blockingRestoreH...
@Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeIdx < restoreOptions.size()) ...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
BackendRestorerProcedure { @Nonnull public T createAndRestore(@Nonnull List<? extends Collection<S>> restoreOptions) throws Exception { if (restoreOptions.isEmpty()) { restoreOptions = Collections.singletonList(Collections.emptyList()); } int alternativeIdx = 0; Exception collectedException = null; while (alternativeId...
@Test public void testStateDoesNotInterfere() throws Exception { TestOperator testOperator = new TestOperator(); KeyedOneInputStreamOperatorTestHarness<Integer, Tuple2<Integer, String>, String> testHarness = new KeyedOneInputStreamOperatorTestHarness<>(testOperator, new TestKeySelector(), BasicTypeInfo.INT_TYPE_INFO); ...
@Override public void open() throws Exception {}
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} }
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} }
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} @Override void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output); @Override MetricGroup getMetricGroup(); @Override final void initializeState(); @Override ...
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} @Override void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output); @Override MetricGroup getMetricGroup(); @Override final void initializeState(); @Override ...
@Test public void testProcessingTimeTimersDontInterfere() throws Exception { TestOperator testOperator = new TestOperator(); KeyedOneInputStreamOperatorTestHarness<Integer, Tuple2<Integer, String>, String> testHarness = new KeyedOneInputStreamOperatorTestHarness<>(testOperator, new TestKeySelector(), BasicTypeInfo.INT_...
@Override public void open() throws Exception {}
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} }
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} }
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} @Override void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output); @Override MetricGroup getMetricGroup(); @Override final void initializeState(); @Override ...
AbstractStreamOperator implements StreamOperator<OUT>, Serializable { @Override public void open() throws Exception {} @Override void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output); @Override MetricGroup getMetricGroup(); @Override final void initializeState(); @Override ...
@Test public void testFreePortRangeUtility() { String rangeDefinition = "50000-50050, 50100-50200,51234 "; Iterator<Integer> portsIter = NetUtils.getPortRangeFromString(rangeDefinition); Set<Integer> ports = new HashSet<>(); while (portsIter.hasNext()) { Assert.assertTrue("Duplicate element", ports.add(portsIter.next()...
public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range = rawRange.trim...
NetUtils { public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range = ra...
NetUtils { public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range = ra...
NetUtils { public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range = ra...
NetUtils { public static Iterator<Integer> getPortRangeFromString(String rangeDefinition) throws NumberFormatException { final String[] ranges = rangeDefinition.trim().split(","); UnionIterator<Integer> iterators = new UnionIterator<>(); for (String rawRange: ranges) { Iterator<Integer> rangeIterator; String range = ra...
@Test public void testResourcesForDeltaIteration() throws Exception{ ResourceSpec resource1 = ResourceSpec.newBuilder().setCpuCores(0.1).setHeapMemoryInMB(100).build(); ResourceSpec resource2 = ResourceSpec.newBuilder().setCpuCores(0.2).setHeapMemoryInMB(200).build(); ResourceSpec resource3 = ResourceSpec.newBuilder()....
public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); }
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); JobGraph compileJobGraph(OptimizedPlan program); JobGraph compileJobGraph(OptimizedPlan program, JobID jobId);...
JobGraphGenerator implements Visitor<PlanNode> { public JobGraph compileJobGraph(OptimizedPlan program) { return compileJobGraph(program, null); } JobGraphGenerator(); JobGraphGenerator(Configuration config); JobGraph compileJobGraph(OptimizedPlan program); JobGraph compileJobGraph(OptimizedPlan program, JobID jobId);...
@Test public void testResourcesForChainedSourceSink() throws Exception { ResourceSpec resource1 = ResourceSpec.newBuilder().setCpuCores(0.1).setHeapMemoryInMB(100).build(); ResourceSpec resource2 = ResourceSpec.newBuilder().setCpuCores(0.2).setHeapMemoryInMB(200).build(); ResourceSpec resource3 = ResourceSpec.newBuilde...
public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); static JobGraph createJobGraph(StreamGraph streamGraph); static boolean isChainable(StreamEdg...
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); static JobGraph createJobGraph(StreamGraph streamGraph); static boolean isChainable(StreamEdg...
@Test public void testResourcesForIteration() throws Exception { ResourceSpec resource1 = ResourceSpec.newBuilder().setCpuCores(0.1).setHeapMemoryInMB(100).build(); ResourceSpec resource2 = ResourceSpec.newBuilder().setCpuCores(0.2).setHeapMemoryInMB(200).build(); ResourceSpec resource3 = ResourceSpec.newBuilder().setC...
public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); }
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); static JobGraph createJobGraph(StreamGraph streamGraph); static boolean isChainable(StreamEdg...
StreamingJobGraphGenerator { public static JobGraph createJobGraph(StreamGraph streamGraph) { return new StreamingJobGraphGenerator(streamGraph).createJobGraph(); } private StreamingJobGraphGenerator(StreamGraph streamGraph); static JobGraph createJobGraph(StreamGraph streamGraph); static boolean isChainable(StreamEdg...
@Test public void testOutputTypeConfigurationWithOneInputTransformation() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); DataStream<Integer> source = env.fromElements(1, 10); OutputTypeConfigurableOperationWithOneInput outputTypeConfigurableOperation = new Outp...
private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getConfig().getMaxParallelism...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
@Test public void testOutputTypeConfigurationWithTwoInputTransformation() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); DataStream<Integer> source1 = env.fromElements(1, 10); DataStream<Integer> source2 = env.fromElements(2, 11); ConnectedStreams<Integer, Inte...
private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getConfig().getMaxParallelism...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
StreamGraphGenerator { private Collection<Integer> transform(StreamTransformation<?> transform) { if (alreadyTransformed.containsKey(transform)) { return alreadyTransformed.get(transform); } LOG.debug("Transforming " + transform); if (transform.getMaxParallelism() <= 0) { int globalMaxParallelismFromConfig = env.getCon...
@Test public void testRuntimeContext() throws Exception { RichAsyncFunction<Integer, Integer> function = new RichAsyncFunction<Integer, Integer>() { private static final long serialVersionUID = 1707630162838967972L; @Override public void asyncInvoke(Integer input, ResultFuture<Integer> resultFuture) throws Exception { ...
@Override public void setRuntimeContext(RuntimeContext runtimeContext) { Preconditions.checkNotNull(runtimeContext); if (runtimeContext instanceof IterationRuntimeContext) { super.setRuntimeContext( new RichAsyncFunctionIterationRuntimeContext( (IterationRuntimeContext) runtimeContext)); } else { super.setRuntimeContex...
RichAsyncFunction extends AbstractRichFunction implements AsyncFunction<IN, OUT> { @Override public void setRuntimeContext(RuntimeContext runtimeContext) { Preconditions.checkNotNull(runtimeContext); if (runtimeContext instanceof IterationRuntimeContext) { super.setRuntimeContext( new RichAsyncFunctionIterationRuntimeC...
RichAsyncFunction extends AbstractRichFunction implements AsyncFunction<IN, OUT> { @Override public void setRuntimeContext(RuntimeContext runtimeContext) { Preconditions.checkNotNull(runtimeContext); if (runtimeContext instanceof IterationRuntimeContext) { super.setRuntimeContext( new RichAsyncFunctionIterationRuntimeC...
RichAsyncFunction extends AbstractRichFunction implements AsyncFunction<IN, OUT> { @Override public void setRuntimeContext(RuntimeContext runtimeContext) { Preconditions.checkNotNull(runtimeContext); if (runtimeContext instanceof IterationRuntimeContext) { super.setRuntimeContext( new RichAsyncFunctionIterationRuntimeC...
RichAsyncFunction extends AbstractRichFunction implements AsyncFunction<IN, OUT> { @Override public void setRuntimeContext(RuntimeContext runtimeContext) { Preconditions.checkNotNull(runtimeContext); if (runtimeContext instanceof IterationRuntimeContext) { super.setRuntimeContext( new RichAsyncFunctionIterationRuntimeC...
@Test public void testFailBeforeNotify() throws Exception { harness.open(); harness.processElement("42", 0); harness.snapshot(0, 1); harness.processElement("43", 2); OperatorSubtaskState snapshot = harness.snapshot(1, 3); tmpDirectory.setWritable(false); try { harness.processElement("44", 4); harness.snapshot(2, 5); fa...
@Override public void initializeState(FunctionInitializationContext context) throws Exception { state = context.getOperatorStateStore().getListState(stateDescriptor); if (context.isRestored()) { LOG.info("{} - restoring state", name()); for (State<TXN, CONTEXT> operatorState : state.get()) { userContext = operatorState...
TwoPhaseCommitSinkFunction extends RichSinkFunction<IN> implements CheckpointedFunction, CheckpointListener { @Override public void initializeState(FunctionInitializationContext context) throws Exception { state = context.getOperatorStateStore().getListState(stateDescriptor); if (context.isRestored()) { LOG.info("{} - ...
TwoPhaseCommitSinkFunction extends RichSinkFunction<IN> implements CheckpointedFunction, CheckpointListener { @Override public void initializeState(FunctionInitializationContext context) throws Exception { state = context.getOperatorStateStore().getListState(stateDescriptor); if (context.isRestored()) { LOG.info("{} - ...
TwoPhaseCommitSinkFunction extends RichSinkFunction<IN> implements CheckpointedFunction, CheckpointListener { @Override public void initializeState(FunctionInitializationContext context) throws Exception { state = context.getOperatorStateStore().getListState(stateDescriptor); if (context.isRestored()) { LOG.info("{} - ...
TwoPhaseCommitSinkFunction extends RichSinkFunction<IN> implements CheckpointedFunction, CheckpointListener { @Override public void initializeState(FunctionInitializationContext context) throws Exception { state = context.getOperatorStateStore().getListState(stateDescriptor); if (context.isRestored()) { LOG.info("{} - ...
@Test public void testIsAmbiguousKeyPossible() { Assert.assertFalse(RocksDBKeySerializationUtils.isAmbiguousKeyPossible( IntSerializer.INSTANCE, StringSerializer.INSTANCE)); Assert.assertTrue(RocksDBKeySerializationUtils.isAmbiguousKeyPossible( StringSerializer.INSTANCE, StringSerializer.INSTANCE)); }
public static boolean isAmbiguousKeyPossible(TypeSerializer keySerializer, TypeSerializer namespaceSerializer) { return (keySerializer.getLength() < 0) && (namespaceSerializer.getLength() < 0); }
RocksDBKeySerializationUtils { public static boolean isAmbiguousKeyPossible(TypeSerializer keySerializer, TypeSerializer namespaceSerializer) { return (keySerializer.getLength() < 0) && (namespaceSerializer.getLength() < 0); } }
RocksDBKeySerializationUtils { public static boolean isAmbiguousKeyPossible(TypeSerializer keySerializer, TypeSerializer namespaceSerializer) { return (keySerializer.getLength() < 0) && (namespaceSerializer.getLength() < 0); } }
RocksDBKeySerializationUtils { public static boolean isAmbiguousKeyPossible(TypeSerializer keySerializer, TypeSerializer namespaceSerializer) { return (keySerializer.getLength() < 0) && (namespaceSerializer.getLength() < 0); } static int readKeyGroup(int keyGroupPrefixBytes, DataInputView inputView); static K readKey(...
RocksDBKeySerializationUtils { public static boolean isAmbiguousKeyPossible(TypeSerializer keySerializer, TypeSerializer namespaceSerializer) { return (keySerializer.getLength() < 0) && (namespaceSerializer.getLength() < 0); } static int readKeyGroup(int keyGroupPrefixBytes, DataInputView inputView); static K readKey(...
@Test public void testScheduleRunnable() throws Exception { final OneShotLatch latch = new OneShotLatch(); final long delay = 100; final long start = System.nanoTime(); ScheduledFuture<?> scheduledFuture = akkaRpcService.scheduleRunnable(new Runnable() { @Override public void run() { latch.trigger(); } }, delay, TimeUn...
@Override public ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit) { checkNotNull(runnable, "runnable"); checkNotNull(unit, "unit"); checkArgument(delay >= 0L, "delay must be zero or larger"); return internalScheduledExecutor.schedule(runnable, delay, unit); }
AkkaRpcService implements RpcService { @Override public ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit) { checkNotNull(runnable, "runnable"); checkNotNull(unit, "unit"); checkArgument(delay >= 0L, "delay must be zero or larger"); return internalScheduledExecutor.schedule(runnable, dela...
AkkaRpcService implements RpcService { @Override public ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit) { checkNotNull(runnable, "runnable"); checkNotNull(unit, "unit"); checkArgument(delay >= 0L, "delay must be zero or larger"); return internalScheduledExecutor.schedule(runnable, dela...
AkkaRpcService implements RpcService { @Override public ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit) { checkNotNull(runnable, "runnable"); checkNotNull(unit, "unit"); checkArgument(delay >= 0L, "delay must be zero or larger"); return internalScheduledExecutor.schedule(runnable, dela...
AkkaRpcService implements RpcService { @Override public ScheduledFuture<?> scheduleRunnable(Runnable runnable, long delay, TimeUnit unit) { checkNotNull(runnable, "runnable"); checkNotNull(unit, "unit"); checkArgument(delay >= 0L, "delay must be zero or larger"); return internalScheduledExecutor.schedule(runnable, dela...
@Test public void testExecuteRunnable() throws Exception { final OneShotLatch latch = new OneShotLatch(); akkaRpcService.execute(() -> latch.trigger()); latch.await(30L, TimeUnit.SECONDS); }
@Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> ...
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> ...
@Test public void testExecuteCallable() throws InterruptedException, ExecutionException, TimeoutException { final OneShotLatch latch = new OneShotLatch(); final int expected = 42; CompletableFuture<Integer> result = akkaRpcService.execute(new Callable<Integer>() { @Override public Integer call() throws Exception { latc...
@Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> ...
AkkaRpcService implements RpcService { @Override public void execute(Runnable runnable) { actorSystem.dispatcher().execute(runnable); } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> ...
@Test public void testGetAddress() { assertEquals(AkkaUtils.getAddress(actorSystem).host().get(), akkaRpcService.getAddress()); }
@Override public String getAddress() { return address; }
AkkaRpcService implements RpcService { @Override public String getAddress() { return address; } }
AkkaRpcService implements RpcService { @Override public String getAddress() { return address; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public String getAddress() { return address; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> connect( final String address, fin...
AkkaRpcService implements RpcService { @Override public String getAddress() { return address; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> connect( final String address, fin...
@Test public void testGetPort() { assertEquals(AkkaUtils.getAddress(actorSystem).port().get(), akkaRpcService.getPort()); }
@Override public int getPort() { return port; }
AkkaRpcService implements RpcService { @Override public int getPort() { return port; } }
AkkaRpcService implements RpcService { @Override public int getPort() { return port; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public int getPort() { return port; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> connect( final String address, final Class<...
AkkaRpcService implements RpcService { @Override public int getPort() { return port; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> connect( final String address, final Class<...
@Test(timeout = 60000) public void testTerminationFuture() throws Exception { final ActorSystem actorSystem = AkkaUtils.createDefaultActorSystem(); final AkkaRpcService rpcService = new AkkaRpcService(actorSystem, Time.milliseconds(1000)); CompletableFuture<Void> terminationFuture = rpcService.getTerminationFuture(); a...
@Override public CompletableFuture<Void> getTerminationFuture() { return terminationFuture; }
AkkaRpcService implements RpcService { @Override public CompletableFuture<Void> getTerminationFuture() { return terminationFuture; } }
AkkaRpcService implements RpcService { @Override public CompletableFuture<Void> getTerminationFuture() { return terminationFuture; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public CompletableFuture<Void> getTerminationFuture() { return terminationFuture; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> con...
AkkaRpcService implements RpcService { @Override public CompletableFuture<Void> getTerminationFuture() { return terminationFuture; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> con...
@Test(timeout = 60000) public void testScheduledExecutorServiceSimpleSchedule() throws ExecutionException, InterruptedException { ScheduledExecutor scheduledExecutor = akkaRpcService.getScheduledExecutor(); final OneShotLatch latch = new OneShotLatch(); ScheduledFuture<?> future = scheduledExecutor.schedule( new Runnab...
@Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
@Test(timeout = 60000) public void testScheduledExecutorServicePeriodicSchedule() throws ExecutionException, InterruptedException { ScheduledExecutor scheduledExecutor = akkaRpcService.getScheduledExecutor(); final int tries = 4; final long delay = 10L; final CountDownLatch countDownLatch = new CountDownLatch(tries); l...
@Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
@Test(timeout = 60000) public void testScheduledExecutorServiceWithFixedDelaySchedule() throws ExecutionException, InterruptedException { ScheduledExecutor scheduledExecutor = akkaRpcService.getScheduledExecutor(); final int tries = 4; final long delay = 10L; final CountDownLatch countDownLatch = new CountDownLatch(tri...
@Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
@Test public void testScheduledExecutorServiceCancelWithFixedDelay() throws InterruptedException { ScheduledExecutor scheduledExecutor = akkaRpcService.getScheduledExecutor(); long delay = 10L; final OneShotLatch futureTask = new OneShotLatch(); final OneShotLatch latch = new OneShotLatch(); final OneShotLatch shouldNo...
@Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); }
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
AkkaRpcService implements RpcService { @Override public ScheduledExecutor getScheduledExecutor() { return internalScheduledExecutor; } AkkaRpcService(final ActorSystem actorSystem, final Time timeout); ActorSystem getActorSystem(); @Override String getAddress(); @Override int getPort(); @Override CompletableFuture<C> c...
@Test public void testConversionFromString() throws Exception { assertThat(subtaskIndexPathParameter.convertFromString("2147483647"), equalTo(Integer.MAX_VALUE)); }
@Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be positive, was: " + subtaskIndex); } }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
@Test public void testConversionFromStringNegativeNumber() throws Exception { try { subtaskIndexPathParameter.convertFromString("-2147483648"); fail("Expected exception not thrown"); } catch (final ConversionException e) { assertThat(e.getMessage(), equalTo("subtaskindex must be positive, was: " + Integer .MIN_VALUE));...
@Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be positive, was: " + subtaskIndex); } }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be po...
@Test public void testConvertToString() throws Exception { assertThat(subtaskIndexPathParameter.convertToString(Integer.MAX_VALUE), equalTo("2147483647")); }
@Override protected String convertToString(final Integer value) { return value.toString(); }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected String convertToString(final Integer value) { return value.toString(); } }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected String convertToString(final Integer value) { return value.toString(); } SubtaskIndexPathParameter(); }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected String convertToString(final Integer value) { return value.toString(); } SubtaskIndexPathParameter(); }
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected String convertToString(final Integer value) { return value.toString(); } SubtaskIndexPathParameter(); static final String KEY; }
@Test public void testGetQueryParameter() throws Exception { final Boolean queryParameter = HandlerRequestUtils.getQueryParameter( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.singletonMap("key", Collections.singletonList("true"))), TestBooleanQu...
public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
@Test public void testGetQueryParameterRepeated() throws Exception { try { HandlerRequestUtils.getQueryParameter( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.singletonMap("key", Arrays.asList("true", "false"))), TestBooleanQueryParameter.class);...
public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
@Test public void testGetQueryParameterDefaultValue() throws Exception { final Boolean allowNonRestoredState = HandlerRequestUtils.getQueryParameter( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.singletonMap("key", Collections.emptyList())), Test...
public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } }
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
HandlerRequestUtils { public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter( final HandlerRequest<R, M> request, final Class<P> queryParameterClass) throws RestHandlerException { return getQueryParameter(request, queryParameterClass, null); } stat...
@Test public void testLogFetchingFailure() throws Exception { InstanceID tmID = new InstanceID(); ResourceID tmRID = new ResourceID(tmID.toString()); TaskManagerGateway taskManagerGateway = mock(TaskManagerGateway.class); when(taskManagerGateway.getAddress()).thenReturn("/tm/address"); Instance taskManager = mock(Insta...
@Override protected void respondAsLeader(final ChannelHandlerContext ctx, final Routed routed, final JobManagerGateway jobManagerGateway) { if (cache == null) { CompletableFuture<Integer> blobPortFuture = jobManagerGateway.requestBlobServerPort(timeout); cache = blobPortFuture.thenApplyAsync( (Integer port) -> { try { ...
TaskManagerLogHandler extends RedirectHandler<JobManagerGateway> implements WebHandler { @Override protected void respondAsLeader(final ChannelHandlerContext ctx, final Routed routed, final JobManagerGateway jobManagerGateway) { if (cache == null) { CompletableFuture<Integer> blobPortFuture = jobManagerGateway.requestB...
TaskManagerLogHandler extends RedirectHandler<JobManagerGateway> implements WebHandler { @Override protected void respondAsLeader(final ChannelHandlerContext ctx, final Routed routed, final JobManagerGateway jobManagerGateway) { if (cache == null) { CompletableFuture<Integer> blobPortFuture = jobManagerGateway.requestB...
TaskManagerLogHandler extends RedirectHandler<JobManagerGateway> implements WebHandler { @Override protected void respondAsLeader(final ChannelHandlerContext ctx, final Routed routed, final JobManagerGateway jobManagerGateway) { if (cache == null) { CompletableFuture<Integer> blobPortFuture = jobManagerGateway.requestB...
TaskManagerLogHandler extends RedirectHandler<JobManagerGateway> implements WebHandler { @Override protected void respondAsLeader(final ChannelHandlerContext ctx, final Routed routed, final JobManagerGateway jobManagerGateway) { if (cache == null) { CompletableFuture<Integer> blobPortFuture = jobManagerGateway.requestB...
@Test public void testUpdate() throws Exception { final Time timeout = Time.seconds(10L); JobID jobID = new JobID(); ResourceID tmRID = ResourceID.generate(); JobDetails details = mock(JobDetails.class); when(details.getJobId()).thenReturn(jobID); final String jmMetricQueryServicePath = "/jm/" + MetricQueryService.METR...
public void update() { synchronized (this) { long currentTime = System.currentTimeMillis(); if (currentTime - lastUpdateTime > 10000) { lastUpdateTime = currentTime; fetchMetrics(); } } }
MetricFetcher { public void update() { synchronized (this) { long currentTime = System.currentTimeMillis(); if (currentTime - lastUpdateTime > 10000) { lastUpdateTime = currentTime; fetchMetrics(); } } } }
MetricFetcher { public void update() { synchronized (this) { long currentTime = System.currentTimeMillis(); if (currentTime - lastUpdateTime > 10000) { lastUpdateTime = currentTime; fetchMetrics(); } } } MetricFetcher( GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor e...
MetricFetcher { public void update() { synchronized (this) { long currentTime = System.currentTimeMillis(); if (currentTime - lastUpdateTime > 10000) { lastUpdateTime = currentTime; fetchMetrics(); } } } MetricFetcher( GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor e...
MetricFetcher { public void update() { synchronized (this) { long currentTime = System.currentTimeMillis(); if (currentTime - lastUpdateTime > 10000) { lastUpdateTime = currentTime; fetchMetrics(); } } } MetricFetcher( GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor e...
@Test public void testDeleteDirectory() throws Exception { File doesNotExist = new File(tmp.newFolder(), "abc"); FileUtils.deleteDirectory(doesNotExist); File cannotDeleteParent = tmp.newFolder(); File cannotDeleteChild = new File(cannotDeleteParent, "child"); try { assumeTrue(cannotDeleteChild.createNewFile()); assume...
public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); static String getRandomFilename(final String prefix); static String readFile(File file, String charsetName); st...
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); static String getRandomFilename(final String prefix); static String readFile(File file, String charsetName); st...
@Test public void testDeleteDirectoryWhichIsAFile() throws Exception { File file = tmp.newFile(); try { FileUtils.deleteDirectory(file); fail("this should fail with an exception"); } catch (IOException ignored) { } }
public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); }
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); static String getRandomFilename(final String prefix); static String readFile(File file, String charsetName); st...
FileUtils { public static void deleteDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::deleteDirectoryInternal, directory); } private FileUtils(); static String getRandomFilename(final String prefix); static String readFile(File file, String charsetName); st...
@Test public void testExecutionGraphCaching() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.hours(1L); final CountingRestfulGateway restfulGateway = createCountingRestfulGateway(expectedJobId, CompletableFuture.completedFuture(expectedExecutionGraph)); try (ExecutionGraph...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testExecutionGraphEntryInvalidation() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.milliseconds(1L); final CountingRestfulGateway restfulGateway = createCountingRestfulGateway( expectedJobId, CompletableFuture.completedFuture(expectedExecutionGraph), Co...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testImmediateCacheInvalidationAfterFailure() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.hours(1L); final CountingRestfulGateway restfulGateway = createCountingRestfulGateway( expectedJobId, FutureUtils.completedExceptionally(new FlinkJobNotFoundExcept...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testConcurrentAccess() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.hours(1L); final CountingRestfulGateway restfulGateway = createCountingRestfulGateway(expectedJobId, CompletableFuture.completedFuture(expectedExecutionGraph)); final int numConcurrentA...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testCacheInvalidationIfSuspended() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.hours(1L); final JobID expectedJobId = new JobID(); final ArchivedExecutionGraph suspendingExecutionGraph = new ArchivedExecutionGraphBuilder().setState(JobStatus.SUSPENDING...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testCacheInvalidationIfSwitchToSuspended() throws Exception { final Time timeout = Time.milliseconds(100L); final Time timeToLive = Time.hours(1L); final JobID expectedJobId = new JobID(); final SuspendableAccessExecutionGraph toBeSuspendingExecutionGraph = new SuspendableAccessExecutionGraph(expected...
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); final long currentTime = System.currentTimeM...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
ExecutionGraphCache implements Closeable { public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { Preconditions.checkState(running, "ExecutionGraphCache is no longer running"); while (true) { final ExecutionGraphEntry oldEntry = cachedExecutionGraphs.get(jobId); f...
@Test public void testStringifyNullException() { assertNotNull(ExceptionUtils.STRINGIFIED_NULL_EXCEPTION); assertEquals(ExceptionUtils.STRINGIFIED_NULL_EXCEPTION, ExceptionUtils.stringifyException(null)); }
public static String stringifyException(final Throwable e) { if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass().getName() + " (e...
ExceptionUtils { public static String stringifyException(final Throwable e) { if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass()...
ExceptionUtils { public static String stringifyException(final Throwable e) { if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass()...
ExceptionUtils { public static String stringifyException(final Throwable e) { if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass()...
ExceptionUtils { public static String stringifyException(final Throwable e) { if (e == null) { return STRINGIFIED_NULL_EXCEPTION; } try { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); } catch (Throwable t) { return e.getClass()...
@Test @SuppressWarnings("unchecked") public void testTriggerStackTraceSample() throws Exception { CompletableFuture<StackTraceSample> sampleFuture = new CompletableFuture<>(); StackTraceSampleCoordinator sampleCoordinator = Mockito.mock(StackTraceSampleCoordinator.class); Mockito.when(sampleCoordinator.triggerStackTrac...
@Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex) { synchronized (lock) { return triggerStackTraceSampleInternal(vertex); } }
BackPressureStatsTrackerImpl implements BackPressureStatsTracker { @Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex) { synchronized (lock) { return triggerStackTraceSampleInternal(vertex); } } }
BackPressureStatsTrackerImpl implements BackPressureStatsTracker { @Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex) { synchronized (lock) { return triggerStackTraceSampleInternal(vertex); } } BackPressureStatsTrackerImpl( StackTraceSampleCoordinator coordinator, int cleanUpInterval, ...
BackPressureStatsTrackerImpl implements BackPressureStatsTracker { @Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex) { synchronized (lock) { return triggerStackTraceSampleInternal(vertex); } } BackPressureStatsTrackerImpl( StackTraceSampleCoordinator coordinator, int cleanUpInterval, ...
BackPressureStatsTrackerImpl implements BackPressureStatsTracker { @Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex) { synchronized (lock) { return triggerStackTraceSampleInternal(vertex); } } BackPressureStatsTrackerImpl( StackTraceSampleCoordinator coordinator, int cleanUpInterval, ...
@Test public void testJvmFatalError() { assertFalse(ExceptionUtils.isJvmFatalError(new Error())); assertFalse(ExceptionUtils.isJvmFatalError(new LinkageError())); assertTrue(ExceptionUtils.isJvmFatalError(new InternalError())); assertTrue(ExceptionUtils.isJvmFatalError(new UnknownError())); }
public static boolean isJvmFatalError(Throwable t) { return (t instanceof InternalError) || (t instanceof UnknownError) || (t instanceof ThreadDeath); }
ExceptionUtils { public static boolean isJvmFatalError(Throwable t) { return (t instanceof InternalError) || (t instanceof UnknownError) || (t instanceof ThreadDeath); } }
ExceptionUtils { public static boolean isJvmFatalError(Throwable t) { return (t instanceof InternalError) || (t instanceof UnknownError) || (t instanceof ThreadDeath); } private ExceptionUtils(); }
ExceptionUtils { public static boolean isJvmFatalError(Throwable t) { return (t instanceof InternalError) || (t instanceof UnknownError) || (t instanceof ThreadDeath); } private ExceptionUtils(); static String stringifyException(final Throwable e); static boolean isJvmFatalError(Throwable t); static boolean isJvmFatal...
ExceptionUtils { public static boolean isJvmFatalError(Throwable t) { return (t instanceof InternalError) || (t instanceof UnknownError) || (t instanceof ThreadDeath); } private ExceptionUtils(); static String stringifyException(final Throwable e); static boolean isJvmFatalError(Throwable t); static boolean isJvmFatal...
@Test public void testFileServing() throws Exception { final Time cacheEntryDuration = Time.milliseconds(1000L); final Queue<CompletableFuture<TransientBlobKey>> requestFileUploads = new ArrayDeque<>(1); requestFileUploads.add(CompletableFuture.completedFuture(transientBlobKey1)); final TestTaskManagerFileHandler testT...
@Override protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) throws RestHandlerException { final ResourceID taskManagerId = handlerRequest.getPathParameter(TaskManagerIdPathParameter.class); final CompletableFut...
AbstractTaskManagerFileHandler extends AbstractHandler<RestfulGateway, EmptyRequestBody, M> { @Override protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) throws RestHandlerException { final ResourceID taskManag...
AbstractTaskManagerFileHandler extends AbstractHandler<RestfulGateway, EmptyRequestBody, M> { @Override protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) throws RestHandlerException { final ResourceID taskManag...
AbstractTaskManagerFileHandler extends AbstractHandler<RestfulGateway, EmptyRequestBody, M> { @Override protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) throws RestHandlerException { final ResourceID taskManag...
AbstractTaskManagerFileHandler extends AbstractHandler<RestfulGateway, EmptyRequestBody, M> { @Override protected void respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) throws RestHandlerException { final ResourceID taskManag...
@Test public void testResultInProgress() throws Exception { final TestingRestfulGateway testingRestfulGateway = TestingRestfulGateway.newBuilder() .setRequestJobStatusFunction( jobId -> CompletableFuture.completedFuture(JobStatus.RUNNING)) .build(); final JobExecutionResultResponseBody responseBody = jobExecutionResult...
@Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final JobID jobId = request.getPathParameter(JobIDPathParameter.class); final Completab...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
@Test public void testCompletedResult() throws Exception { final JobStatus jobStatus = JobStatus.FINISHED; final ArchivedExecutionGraph executionGraph = new ArchivedExecutionGraphBuilder() .setJobID(TEST_JOB_ID) .setState(jobStatus) .build(); final TestingRestfulGateway testingRestfulGateway = TestingRestfulGateway.new...
@Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final JobID jobId = request.getPathParameter(JobIDPathParameter.class); final Completab...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
@Test public void testRethrowFatalError() { try { ExceptionUtils.rethrowIfFatalError(new InternalError()); fail(); } catch (InternalError ignored) {} ExceptionUtils.rethrowIfFatalError(new NoClassDefFoundError()); }
public static void rethrowIfFatalError(Throwable t) { if (isJvmFatalError(t)) { throw (Error) t; } }
ExceptionUtils { public static void rethrowIfFatalError(Throwable t) { if (isJvmFatalError(t)) { throw (Error) t; } } }
ExceptionUtils { public static void rethrowIfFatalError(Throwable t) { if (isJvmFatalError(t)) { throw (Error) t; } } private ExceptionUtils(); }
ExceptionUtils { public static void rethrowIfFatalError(Throwable t) { if (isJvmFatalError(t)) { throw (Error) t; } } private ExceptionUtils(); static String stringifyException(final Throwable e); static boolean isJvmFatalError(Throwable t); static boolean isJvmFatalOrOutOfMemoryError(Throwable t); static void rethrow...
ExceptionUtils { public static void rethrowIfFatalError(Throwable t) { if (isJvmFatalError(t)) { throw (Error) t; } } private ExceptionUtils(); static String stringifyException(final Throwable e); static boolean isJvmFatalError(Throwable t); static boolean isJvmFatalOrOutOfMemoryError(Throwable t); static void rethrow...
@Test public void testPropagateFlinkJobNotFoundExceptionAsRestHandlerException() throws Exception { final TestingRestfulGateway testingRestfulGateway = TestingRestfulGateway.newBuilder() .setRequestJobStatusFunction( jobId -> FutureUtils.completedExceptionally(new FlinkJobNotFoundException(jobId)) ) .build(); try { job...
@Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull final RestfulGateway gateway) throws RestHandlerException { final JobID jobId = request.getPathParameter(JobIDPathParameter.class); final Completab...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
JobExecutionResultHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> { @Override protected CompletableFuture<JobExecutionResultResponseBody> handleRequest( @Nonnull final HandlerRequest<EmptyRequestBody, JobMessageParameters> request, @Nonnull fin...
@Test public void testSerializationFailureHandling() throws Exception { DispatcherGateway mockGateway = mock(DispatcherGateway.class); when(mockGateway.submitJob(any(JobGraph.class), any(Time.class))).thenReturn(CompletableFuture.completedFuture(Acknowledge.get())); GatewayRetriever<DispatcherGateway> mockGatewayRetrie...
@Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { JobGraph jobGraph; try { ObjectInputStream objectIn = new ObjectInputStream(new ByteArrayInputStream...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
@Test public void testSuccessfulJobSubmission() throws Exception { DispatcherGateway mockGateway = mock(DispatcherGateway.class); when(mockGateway.submitJob(any(JobGraph.class), any(Time.class))).thenReturn(CompletableFuture.completedFuture(Acknowledge.get())); GatewayRetriever<DispatcherGateway> mockGatewayRetriever =...
@Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gateway) throws RestHandlerException { JobGraph jobGraph; try { ObjectInputStream objectIn = new ObjectInputStream(new ByteArrayInputStream...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
JobSubmitHandler extends AbstractRestHandler<DispatcherGateway, JobSubmitRequestBody, JobSubmitResponseBody, EmptyMessageParameters> { @Override protected CompletableFuture<JobSubmitResponseBody> handleRequest(@Nonnull HandlerRequest<JobSubmitRequestBody, EmptyMessageParameters> request, @Nonnull DispatcherGateway gate...
@Test public void testListMetrics() throws Exception { final CompletableFuture<MetricCollectionResponseBody> completableFuture = testMetricsHandler.handleRequest( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.emptyMap()), mockDispatcherGateway); a...
@Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { metricFetcher.update(); final MetricStore.ComponentMetricStore componentMetricStore = getComponentMetricStore( req...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
@Test public void testReturnEmptyListIfNoComponentMetricStore() throws Exception { testMetricsHandler.returnComponentMetricStore = false; final CompletableFuture<MetricCollectionResponseBody> completableFuture = testMetricsHandler.handleRequest( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParam...
@Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { metricFetcher.update(); final MetricStore.ComponentMetricStore componentMetricStore = getComponentMetricStore( req...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
@Test public void testGetMetrics() throws Exception { final CompletableFuture<MetricCollectionResponseBody> completableFuture = testMetricsHandler.handleRequest( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.singletonMap(METRICS_FILTER_QUERY_PARAM...
@Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { metricFetcher.update(); final MetricStore.ComponentMetricStore componentMetricStore = getComponentMetricStore( req...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
@Test public void testReturnEmptyListIfRequestedMetricIsUnknown() throws Exception { final CompletableFuture<MetricCollectionResponseBody> completableFuture = testMetricsHandler.handleRequest( new HandlerRequest<>( EmptyRequestBody.getInstance(), new TestMessageParameters(), Collections.emptyMap(), Collections.singleto...
@Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { metricFetcher.update(); final MetricStore.ComponentMetricStore componentMetricStore = getComponentMetricStore( req...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
AbstractMetricsHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, MetricCollectionResponseBody, M> { @Override protected final CompletableFuture<MetricCollectionResponseBody> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, M> request, @Nonnull RestfulGateway gateway) throws RestHandlerExcep...
@Test public void testHandleRequest() throws Exception { final JobID jobID = new JobID(); final JobVertexID jobVertexID = new JobVertexID(); final long deployingTs = System.currentTimeMillis() - 1024; final long finishedTs = System.currentTimeMillis(); final long bytesInLocal = 1L; final long bytesInRemote = 2L; final ...
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestHandlerException { final AccessExecution execution = executionVertex.getCurrentExecutionAttempt(); final MutableIOMetrics ioMetrics ...
SubtaskCurrentAttemptDetailsHandler extends AbstractSubtaskHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestH...
SubtaskCurrentAttemptDetailsHandler extends AbstractSubtaskHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestH...
SubtaskCurrentAttemptDetailsHandler extends AbstractSubtaskHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestH...
SubtaskCurrentAttemptDetailsHandler extends AbstractSubtaskHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskMessageParameters> { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskMessageParameters> request, AccessExecutionVertex executionVertex) throws RestH...
@Test public void testHandleRequest() throws Exception { final RestHandlerConfiguration restHandlerConfiguration = RestHandlerConfiguration.fromConfiguration(new Configuration()); final SubtaskExecutionAttemptAccumulatorsHandler handler = new SubtaskExecutionAttemptAccumulatorsHandler( CompletableFuture.completedFuture...
@Override protected SubtaskExecutionAttemptAccumulatorsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, AccessExecution execution) throws RestHandlerException { return createAccumulatorInfo(execution); }
SubtaskExecutionAttemptAccumulatorsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptAccumulatorsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptAccumulatorsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameter...
SubtaskExecutionAttemptAccumulatorsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptAccumulatorsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptAccumulatorsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameter...
SubtaskExecutionAttemptAccumulatorsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptAccumulatorsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptAccumulatorsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameter...
SubtaskExecutionAttemptAccumulatorsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptAccumulatorsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptAccumulatorsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameter...
@Test public void testFindThrowableByType() { assertTrue(ExceptionUtils.findThrowable( new RuntimeException(new IllegalStateException()), IllegalStateException.class).isPresent()); }
public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchType.cast(t)); } else...
ExceptionUtils { public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchType...
ExceptionUtils { public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchType...
ExceptionUtils { public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchType...
ExceptionUtils { public static <T extends Throwable> Optional<T> findThrowable(Throwable throwable, Class<T> searchType) { if (throwable == null || searchType == null) { return Optional.empty(); } Throwable t = throwable; while (t != null) { if (searchType.isAssignableFrom(t.getClass())) { return Optional.of(searchType...
@Test public void testHandleRequest() throws Exception { final JobID jobID = new JobID(); final JobVertexID jobVertexId = new JobVertexID(); final int subtaskIndex = 1; final ExecutionState expectedState = ExecutionState.FINISHED; final int attempt = 0; final StringifiedAccumulatorResult[] emptyAccumulators = new Strin...
@Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, AccessExecution execution) throws RestHandlerException { final JobID jobID = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVertexID = request.getPat...
SubtaskExecutionAttemptDetailsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, Acc...
SubtaskExecutionAttemptDetailsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, Acc...
SubtaskExecutionAttemptDetailsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, Acc...
SubtaskExecutionAttemptDetailsHandler extends AbstractSubtaskAttemptHandler<SubtaskExecutionAttemptDetailsInfo, SubtaskAttemptMessageParameters> implements JsonArchivist { @Override protected SubtaskExecutionAttemptDetailsInfo handleRequest( HandlerRequest<EmptyRequestBody, SubtaskAttemptMessageParameters> request, Acc...
@Test public void testAbsentBackPressure() throws Exception { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT.toString()); pathParameters.put(JobVertexIdPathParameter.KEY, new JobVertexID().toString()); final HandlerRequest<Em...
@Override protected CompletableFuture<JobVertexBackPressureInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { final JobID jobId = request.getPathParameter(JobIDPathParameter.class); final JobVertexID jobVerte...
JobVertexBackPressureHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobVertexBackPressureInfo, JobVertexMessageParameters> { @Override protected CompletableFuture<JobVertexBackPressureInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, @Nonnull Rest...
JobVertexBackPressureHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobVertexBackPressureInfo, JobVertexMessageParameters> { @Override protected CompletableFuture<JobVertexBackPressureInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, @Nonnull Rest...
JobVertexBackPressureHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobVertexBackPressureInfo, JobVertexMessageParameters> { @Override protected CompletableFuture<JobVertexBackPressureInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, @Nonnull Rest...
JobVertexBackPressureHandler extends AbstractRestHandler<RestfulGateway, EmptyRequestBody, JobVertexBackPressureInfo, JobVertexMessageParameters> { @Override protected CompletableFuture<JobVertexBackPressureInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request, @Nonnull Rest...
@Test public void testCreateUploadDir() throws Exception { final File file = temporaryFolder.newFolder(); final Path testUploadDir = file.toPath().resolve("testUploadDir"); assertFalse(Files.exists(testUploadDir)); RestServerEndpoint.createUploadDir(testUploadDir, NOPLogger.NOP_LOGGER); assertTrue(Files.exists(testUplo...
@VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer available.", uploadDir); checkAndCreateUploadDir(uploadDi...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
@Test public void testCreateUploadDirFails() throws Exception { final File file = temporaryFolder.newFolder(); Assume.assumeTrue(file.setWritable(false)); final Path testUploadDir = file.toPath().resolve("testUploadDir"); assertFalse(Files.exists(testUploadDir)); try { RestServerEndpoint.createUploadDir(testUploadDir, ...
@VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer available.", uploadDir); checkAndCreateUploadDir(uploadDi...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
RestServerEndpoint implements AutoCloseableAsync { @VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log) throws IOException { if (!Files.exists(uploadDir)) { log.warn("Upload directory {} does not exist, or has been deleted externally. " + "Previously uploaded files are no longer availa...
@Test public void testConnectionTimeout() throws Exception { final Configuration config = new Configuration(); config.setLong(RestOptions.CONNECTION_TIMEOUT, 1); final RestClient restClient = new RestClient(RestClientConfiguration.fromConfiguration(config), Executors.directExecutor()); final String unroutableIp = "10.2...
public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException { Preconditions.checkNotNull(targetAddress); Preconditions.ch...
RestClient { public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException { Preconditions.checkNotNull(targetAddress); Pre...
RestClient { public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException { Preconditions.checkNotNull(targetAddress); Pre...
RestClient { public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException { Preconditions.checkNotNull(targetAddress); Pre...
RestClient { public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders, U messageParameters, R request) throws IOException { Preconditions.checkNotNull(targetAddress); Pre...
@Test public void testIsShutdown() throws Exception { MetricRegistryImpl metricRegistry = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration()); Assert.assertFalse(metricRegistry.isShutdown()); metricRegistry.shutdown().get(); Assert.assertTrue(metricRegistry.isShutdown()); }
public boolean isShutdown() { synchronized (lock) { return isShutdown; } }
MetricRegistryImpl implements MetricRegistry { public boolean isShutdown() { synchronized (lock) { return isShutdown; } } }
MetricRegistryImpl implements MetricRegistry { public boolean isShutdown() { synchronized (lock) { return isShutdown; } } MetricRegistryImpl(MetricRegistryConfiguration config); }
MetricRegistryImpl implements MetricRegistry { public boolean isShutdown() { synchronized (lock) { return isShutdown; } } MetricRegistryImpl(MetricRegistryConfiguration config); void startQueryService(ActorSystem actorSystem, ResourceID resourceID); @Override @Nullable String getMetricQueryServicePath(); @Override char...
MetricRegistryImpl implements MetricRegistry { public boolean isShutdown() { synchronized (lock) { return isShutdown; } } MetricRegistryImpl(MetricRegistryConfiguration config); void startQueryService(ActorSystem actorSystem, ResourceID resourceID); @Override @Nullable String getMetricQueryServicePath(); @Override char...
@Test public void testReporterArgumentForwarding() throws Exception { Configuration config = new Configuration(); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, TestReporter2.class.getName()); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX +...
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (queryService != null) { final CompletableFuture<Void...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
@Test public void testReporterScheduling() throws Exception { Configuration config = new Configuration(); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, TestReporter3.class.getName()); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test.a...
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (queryService != null) { final CompletableFuture<Void...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
@Test public void testReporterNotifications() throws Exception { Configuration config = new Configuration(); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test1." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, TestReporter6.class.getName()); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "te...
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (queryService != null) { final CompletableFuture<Void...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
@Test public void testConfigurableDelimiter() throws Exception { Configuration config = new Configuration(); config.setString(MetricOptions.SCOPE_DELIMITER, "_"); config.setString(MetricOptions.SCOPE_NAMING_TM, "A.B.C.D.E"); MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfigurat...
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (queryService != null) { final CompletableFuture<Void...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
MetricRegistryImpl implements MetricRegistry { public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (query...
@Test public void testTaskIOMetricGroup() { TaskMetricGroup task = UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(); TaskIOMetricGroup taskIO = task.getIOMetricGroup(); assertNotNull(taskIO.getNumRecordsInCounter()); assertNotNull(taskIO.getNumRecordsOutCounter()); Counter c1 = new SimpleCounter(); c1.inc(3...
public TaskIOMetricGroup(TaskMetricGroup parent) { super(parent); this.numBytesOut = counter(MetricNames.IO_NUM_BYTES_OUT); this.numBytesInLocal = counter(MetricNames.IO_NUM_BYTES_IN_LOCAL); this.numBytesInRemote = counter(MetricNames.IO_NUM_BYTES_IN_REMOTE); this.numBytesOutRate = meter(MetricNames.IO_NUM_BYTES_OUT_RA...
TaskIOMetricGroup extends ProxyMetricGroup<TaskMetricGroup> { public TaskIOMetricGroup(TaskMetricGroup parent) { super(parent); this.numBytesOut = counter(MetricNames.IO_NUM_BYTES_OUT); this.numBytesInLocal = counter(MetricNames.IO_NUM_BYTES_IN_LOCAL); this.numBytesInRemote = counter(MetricNames.IO_NUM_BYTES_IN_REMOTE)...
TaskIOMetricGroup extends ProxyMetricGroup<TaskMetricGroup> { public TaskIOMetricGroup(TaskMetricGroup parent) { super(parent); this.numBytesOut = counter(MetricNames.IO_NUM_BYTES_OUT); this.numBytesInLocal = counter(MetricNames.IO_NUM_BYTES_IN_LOCAL); this.numBytesInRemote = counter(MetricNames.IO_NUM_BYTES_IN_REMOTE)...
TaskIOMetricGroup extends ProxyMetricGroup<TaskMetricGroup> { public TaskIOMetricGroup(TaskMetricGroup parent) { super(parent); this.numBytesOut = counter(MetricNames.IO_NUM_BYTES_OUT); this.numBytesInLocal = counter(MetricNames.IO_NUM_BYTES_IN_LOCAL); this.numBytesInRemote = counter(MetricNames.IO_NUM_BYTES_IN_REMOTE)...
TaskIOMetricGroup extends ProxyMetricGroup<TaskMetricGroup> { public TaskIOMetricGroup(TaskMetricGroup parent) { super(parent); this.numBytesOut = counter(MetricNames.IO_NUM_BYTES_OUT); this.numBytesInLocal = counter(MetricNames.IO_NUM_BYTES_IN_LOCAL); this.numBytesInRemote = counter(MetricNames.IO_NUM_BYTES_IN_REMOTE)...
@Test public void testGetAllVariables() throws Exception { MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration()); AbstractMetricGroup group = new AbstractMetricGroup<AbstractMetricGroup<?>>(registry, new String[0], null) { @Override protected QueryScopeIn...
public Map<String, String> getAllVariables() { if (variables == null) { synchronized (this) { if (variables == null) { variables = new HashMap<>(); putVariables(variables); if (parent != null) { variables.putAll(parent.getAllVariables()); } } } } return variables; }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { synchronized (this) { if (variables == null) { variables = new HashMap<>(); putVariables(variables); if (parent != null) { variables.putAll(parent.getAllVariables()); } } } } return variables; } }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { synchronized (this) { if (variables == null) { variables = new HashMap<>(); putVariables(variables); if (parent != null) { variables.putAll(parent.getAllVariables()); } } } } return variables; } Abstract...
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { synchronized (this) { if (variables == null) { variables = new HashMap<>(); putVariables(variables); if (parent != null) { variables.putAll(parent.getAllVariables()); } } } } return variables; } Abstract...
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { synchronized (this) { if (variables == null) { variables = new HashMap<>(); putVariables(variables); if (parent != null) { variables.putAll(parent.getAllVariables()); } } } } return variables; } Abstract...
@Test public void testScopeCachingForMultipleReporters() throws Exception { Configuration config = new Configuration(); config.setString(MetricOptions.SCOPE_NAMING_TM, "A.B.C.D"); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "test1." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, TestReporter1.class.get...
@Override public Counter counter(int name) { return counter(String.valueOf(name)); }
AbstractMetricGroup implements MetricGroup { @Override public Counter counter(int name) { return counter(String.valueOf(name)); } }
AbstractMetricGroup implements MetricGroup { @Override public Counter counter(int name) { return counter(String.valueOf(name)); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); }
AbstractMetricGroup implements MetricGroup { @Override public Counter counter(int name) { return counter(String.valueOf(name)); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLogicalScope(Characte...
AbstractMetricGroup implements MetricGroup { @Override public Counter counter(int name) { return counter(String.valueOf(name)); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLogicalScope(Characte...
@Test public void testScopeGenerationWithoutReporters() throws Exception { Configuration config = new Configuration(); config.setString(MetricOptions.SCOPE_NAMING_TM, "A.B.C.D"); MetricRegistryImpl testRegistry = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(config)); try { TaskManagerMetricGroup...
public String getMetricIdentifier(String metricName) { return getMetricIdentifier(metricName, null); }
AbstractMetricGroup implements MetricGroup { public String getMetricIdentifier(String metricName) { return getMetricIdentifier(metricName, null); } }
AbstractMetricGroup implements MetricGroup { public String getMetricIdentifier(String metricName) { return getMetricIdentifier(metricName, null); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); }
AbstractMetricGroup implements MetricGroup { public String getMetricIdentifier(String metricName) { return getMetricIdentifier(metricName, null); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLog...
AbstractMetricGroup implements MetricGroup { public String getMetricIdentifier(String metricName) { return getMetricIdentifier(metricName, null); } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLog...
@Test public void testCreateQueryServiceMetricInfo() { JobID jid = new JobID(); JobVertexID vid = new JobVertexID(); AbstractID eid = new AbstractID(); TaskManagerMetricGroup tm = new TaskManagerMetricGroup(registry, "host", "id"); TaskManagerJobMetricGroup job = new TaskManagerJobMetricGroup(registry, tm, jid, "jobnam...
@Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); } }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); } TaskMetr...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); } TaskMetr...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.TaskQueryScopeInfo( this.parent.jobId.toString(), String.valueOf(this.vertexId), this.subtaskIndex); } TaskMetr...
@Test public void testTaskMetricGroupCleanup() throws Exception { CountingMetricRegistry registry = new CountingMetricRegistry(new Configuration()); TaskManagerMetricGroup taskManagerMetricGroup = new TaskManagerMetricGroup(registry, "localhost", "0"); TaskManagerJobMetricGroup taskManagerJobMetricGroup = new TaskManag...
@Override public void close() { super.close(); parent.removeTaskMetricGroup(executionId); }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override public void close() { super.close(); parent.removeTaskMetricGroup(executionId); } }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override public void close() { super.close(); parent.removeTaskMetricGroup(executionId); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, AbstractID executionId, @Nullab...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override public void close() { super.close(); parent.removeTaskMetricGroup(executionId); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, AbstractID executionId, @Nullab...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { @Override public void close() { super.close(); parent.removeTaskMetricGroup(executionId); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, AbstractID executionId, @Nullab...
@Test public void testOperatorNameTruncation() throws Exception { Configuration cfg = new Configuration(); cfg.setString(MetricOptions.SCOPE_NAMING_OPERATOR, ScopeFormat.SCOPE_OPERATOR_NAME); MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(cfg)); TaskManagerMetricGroup...
public OperatorMetricGroup addOperator(String name) { return addOperator(OperatorID.fromJobVertexID(vertexId), name); }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { public OperatorMetricGroup addOperator(String name) { return addOperator(OperatorID.fromJobVertexID(vertexId), name); } }
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { public OperatorMetricGroup addOperator(String name) { return addOperator(OperatorID.fromJobVertexID(vertexId), name); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, Abstra...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { public OperatorMetricGroup addOperator(String name) { return addOperator(OperatorID.fromJobVertexID(vertexId), name); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, Abstra...
TaskMetricGroup extends ComponentMetricGroup<TaskManagerJobMetricGroup> { public OperatorMetricGroup addOperator(String name) { return addOperator(OperatorID.fromJobVertexID(vertexId), name); } TaskMetricGroup( MetricRegistry registry, TaskManagerJobMetricGroup parent, @Nullable JobVertexID vertexId, Abstra...
@Test public void registerPartitionTwice() throws Exception { ResultPartitionID partitionId = new ResultPartitionID(); TaskEventDispatcher ted = new TaskEventDispatcher(); ted.registerPartition(partitionId); expectedException.expect(IllegalStateException.class); expectedException.expectMessage("already registered at ta...
public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partitionId + " already regis...
TaskEventDispatcher { public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partiti...
TaskEventDispatcher { public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partiti...
TaskEventDispatcher { public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partiti...
TaskEventDispatcher { public void registerPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("registering {}", partitionId); if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) { throw new IllegalStateException( "Partition " + partiti...
@Test public void subscribeToEventNotRegistered() throws Exception { TaskEventDispatcher ted = new TaskEventDispatcher(); expectedException.expect(IllegalStateException.class); expectedException.expectMessage("not registered at task event dispatcher"); ted.subscribeToEvent(new ResultPartitionID(), new ZeroShotEventList...
public void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType) { checkNotNull(partitionId); checkNotNull(eventListener); checkNotNull(eventType); TaskEventHandler taskEventHandler; synchronized (registeredHandlers) { taskEventHandler = register...
TaskEventDispatcher { public void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType) { checkNotNull(partitionId); checkNotNull(eventListener); checkNotNull(eventType); TaskEventHandler taskEventHandler; synchronized (registeredHandlers) { taskE...
TaskEventDispatcher { public void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType) { checkNotNull(partitionId); checkNotNull(eventListener); checkNotNull(eventType); TaskEventHandler taskEventHandler; synchronized (registeredHandlers) { taskE...
TaskEventDispatcher { public void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType) { checkNotNull(partitionId); checkNotNull(eventListener); checkNotNull(eventType); TaskEventHandler taskEventHandler; synchronized (registeredHandlers) { taskE...
TaskEventDispatcher { public void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType) { checkNotNull(partitionId); checkNotNull(eventListener); checkNotNull(eventType); TaskEventHandler taskEventHandler; synchronized (registeredHandlers) { taskE...
@Test public void unregisterPartition() throws Exception { ResultPartitionID partitionId1 = new ResultPartitionID(); ResultPartitionID partitionId2 = new ResultPartitionID(); TaskEventDispatcher ted = new TaskEventDispatcher(); AllWorkersDoneEvent event = new AllWorkersDoneEvent(); assertFalse(ted.publish(partitionId1,...
public void unregisterPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("unregistering {}", partitionId); registeredHandlers.remove(partitionId); } }
TaskEventDispatcher { public void unregisterPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("unregistering {}", partitionId); registeredHandlers.remove(partitionId); } } }
TaskEventDispatcher { public void unregisterPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("unregistering {}", partitionId); registeredHandlers.remove(partitionId); } } }
TaskEventDispatcher { public void unregisterPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("unregistering {}", partitionId); registeredHandlers.remove(partitionId); } } void registerPartition(ResultPartitionID partitionId); void unregisterPartition(R...
TaskEventDispatcher { public void unregisterPartition(ResultPartitionID partitionId) { checkNotNull(partitionId); synchronized (registeredHandlers) { LOG.debug("unregistering {}", partitionId); registeredHandlers.remove(partitionId); } } void registerPartition(ResultPartitionID partitionId); void unregisterPartition(R...
@Test public void clearAll() throws Exception { ResultPartitionID partitionId = new ResultPartitionID(); TaskEventDispatcher ted = new TaskEventDispatcher(); ted.registerPartition(partitionId); ZeroShotEventListener eventListener1 = new ZeroShotEventListener(); ted.subscribeToEvent(partitionId, eventListener1, AllWorke...
public void clearAll() { synchronized (registeredHandlers) { registeredHandlers.clear(); } }
TaskEventDispatcher { public void clearAll() { synchronized (registeredHandlers) { registeredHandlers.clear(); } } }
TaskEventDispatcher { public void clearAll() { synchronized (registeredHandlers) { registeredHandlers.clear(); } } }
TaskEventDispatcher { public void clearAll() { synchronized (registeredHandlers) { registeredHandlers.clear(); } } void registerPartition(ResultPartitionID partitionId); void unregisterPartition(ResultPartitionID partitionId); void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventLi...
TaskEventDispatcher { public void clearAll() { synchronized (registeredHandlers) { registeredHandlers.clear(); } } void registerPartition(ResultPartitionID partitionId); void unregisterPartition(ResultPartitionID partitionId); void subscribeToEvent( ResultPartitionID partitionId, EventListener<TaskEvent> eventLi...
@Test public void testNotifyCreditAvailable() throws Exception { final CreditBasedPartitionRequestClientHandler handler = new CreditBasedPartitionRequestClientHandler(); final EmbeddedChannel channel = new EmbeddedChannel(handler); final PartitionRequestClient client = new PartitionRequestClient( channel, handler, mock...
@Override public void notifyCreditAvailable(final RemoteInputChannel inputChannel) { ctx.executor().execute(new Runnable() { @Override public void run() { ctx.pipeline().fireUserEventTriggered(inputChannel); } }); }
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void notifyCreditAvailable(final RemoteInputChannel inputChannel) { ctx.executor().execute(new Runnable() { @Override public void run() { ctx.pipeline().fireUserEventTriggered(inputChannel); ...
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void notifyCreditAvailable(final RemoteInputChannel inputChannel) { ctx.executor().execute(new Runnable() { @Override public void run() { ctx.pipeline().fireUserEventTriggered(inputChannel); ...
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void notifyCreditAvailable(final RemoteInputChannel inputChannel) { ctx.executor().execute(new Runnable() { @Override public void run() { ctx.pipeline().fireUserEventTriggered(inputChannel); ...
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void notifyCreditAvailable(final RemoteInputChannel inputChannel) { ctx.executor().execute(new Runnable() { @Override public void run() { ctx.pipeline().fireUserEventTriggered(inputChannel); ...
@Test public void testNotifyCreditAvailableAfterReleased() throws Exception { final CreditBasedPartitionRequestClientHandler handler = new CreditBasedPartitionRequestClientHandler(); final EmbeddedChannel channel = new EmbeddedChannel(handler); final PartitionRequestClient client = new PartitionRequestClient( channel, ...
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { decodeMsg(msg); } catch (Throwable t) { notifyAllChannelsOfErrorAndClose(t); } }
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { decodeMsg(msg); } catch (Throwable t) { notifyAllChannelsOfErrorAndClose(t); } } }
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { decodeMsg(msg); } catch (Throwable t) { notifyAllChannelsOfErrorAndClose(t); } } }
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { decodeMsg(msg); } catch (Throwable t) { notifyAllChannelsOfErrorAndClose(t); } } @Override void addInputChann...
CreditBasedPartitionRequestClientHandler extends ChannelInboundHandlerAdapter implements NetworkClientHandler { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { decodeMsg(msg); } catch (Throwable t) { notifyAllChannelsOfErrorAndClose(t); } } @Override void addInputChann...
@Test public void testRetriggerPartitionRequest() throws Exception { final long deadline = System.currentTimeMillis() + 30_000L; final PartitionRequestClientHandler handler = new PartitionRequestClientHandler(); final EmbeddedChannel channel = new EmbeddedChannel(handler); final PartitionRequestClient client = new Part...
public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, partitionId, delayMs); clien...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
@Test public void testDoublePartitionRequest() throws Exception { final PartitionRequestClientHandler handler = new PartitionRequestClientHandler(); final EmbeddedChannel channel = new EmbeddedChannel(handler); final PartitionRequestClient client = new PartitionRequestClient( channel, handler, mock(ConnectionID.class),...
public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, partitionId, delayMs); clien...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
PartitionRequestClient { public ChannelFuture requestSubpartition( final ResultPartitionID partitionId, final int subpartitionIndex, final RemoteInputChannel inputChannel, int delayMs) throws IOException { checkNotClosed(); LOG.debug("Requesting subpartition {} of partition {} with {} ms delay.", subpartitionIndex, par...
@Test public void testIllegalReadViewRequest() throws Exception { final PipelinedSubpartition subpartition = createSubpartition(); assertNotNull(subpartition.createReadView(new NoOpBufferAvailablityListener())); try { subpartition.createReadView(new NoOpBufferAvailablityListener()); fail("Did not throw expected excepti...
@Override public PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener) throws IOException { synchronized (buffers) { checkState(!isReleased); checkState(readView == null, "Subpartition %s of is being (or already has been) consumed, " + "but pipelined subpartitions can only be consume...
PipelinedSubpartition extends ResultSubpartition { @Override public PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener) throws IOException { synchronized (buffers) { checkState(!isReleased); checkState(readView == null, "Subpartition %s of is being (or already has been) consumed, "...
PipelinedSubpartition extends ResultSubpartition { @Override public PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener) throws IOException { synchronized (buffers) { checkState(!isReleased); checkState(readView == null, "Subpartition %s of is being (or already has been) consumed, "...
PipelinedSubpartition extends ResultSubpartition { @Override public PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener) throws IOException { synchronized (buffers) { checkState(!isReleased); checkState(readView == null, "Subpartition %s of is being (or already has been) consumed, "...
PipelinedSubpartition extends ResultSubpartition { @Override public PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener) throws IOException { synchronized (buffers) { checkState(!isReleased); checkState(readView == null, "Subpartition %s of is being (or already has been) consumed, "...
@Test public void testIsReleasedChecksParent() throws Exception { PipelinedSubpartition subpartition = mock(PipelinedSubpartition.class); PipelinedSubpartitionView reader = new PipelinedSubpartitionView( subpartition, mock(BufferAvailabilityListener.class)); assertFalse(reader.isReleased()); verify(subpartition, times(...
@Override public boolean isReleased() { return isReleased; }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); @Override boolean add(BufferConsumer bufferConsumer); @Override void flush(); @Override void finish(); @Override void release(); @Override int release...
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); @Override boolean add(BufferConsumer bufferConsumer); @Override void flush(); @Override void finish(); @Override void release(); @Override int release...
@Test(expected = IllegalStateException.class) public void testRetriggerWithoutPartitionRequest() throws Exception { Tuple2<Integer, Integer> backoff = new Tuple2<Integer, Integer>(500, 3000); PartitionRequestClient connClient = mock(PartitionRequestClient.class); SingleInputGate inputGate = mock(SingleInputGate.class);...
void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.requestSubpartition( partitionId, subpartitionIndex, this, getCurrentBackoff()); } else...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.req...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.req...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.req...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { void retriggerSubpartitionRequest(int subpartitionIndex) throws IOException, InterruptedException { checkState(partitionRequestClient != null, "Missing initial subpartition request."); if (increaseBackoff()) { partitionRequestClient.req...
@Test public void testOnFailedPartitionRequest() throws Exception { final ConnectionManager connectionManager = mock(ConnectionManager.class); when(connectionManager.createPartitionRequestClient(any(ConnectionID.class))) .thenReturn(mock(PartitionRequestClient.class)); final ResultPartitionID partitionId = new ResultPa...
public void onFailedPartitionRequest() { inputGate.triggerPartitionStateCheck(partitionId); }
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { public void onFailedPartitionRequest() { inputGate.triggerPartitionStateCheck(partitionId); } }
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { public void onFailedPartitionRequest() { inputGate.triggerPartitionStateCheck(partitionId); } RemoteInputChannel( SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, Connectio...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { public void onFailedPartitionRequest() { inputGate.triggerPartitionStateCheck(partitionId); } RemoteInputChannel( SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, Connectio...
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { public void onFailedPartitionRequest() { inputGate.triggerPartitionStateCheck(partitionId); } RemoteInputChannel( SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, Connectio...
@Test public void testIsEvent() throws Exception { AbstractEvent[] events = { EndOfPartitionEvent.INSTANCE, EndOfSuperstepEvent.INSTANCE, new CheckpointBarrier(1678L, 4623784L, CheckpointOptions.forCheckpointWithDefaultLocation()), new TestTaskEvent(Math.random(), 12361231273L), new CancelCheckpointMarker(2870879873298...
private static boolean isEvent(ByteBuffer buffer, Class<?> eventClass) throws IOException { if (buffer.remaining() < 4) { throw new IOException("Incomplete event"); } final int bufferPos = buffer.position(); final ByteOrder bufferOrder = buffer.order(); buffer.order(ByteOrder.BIG_ENDIAN); try { int type = buffer.getInt...
EventSerializer { private static boolean isEvent(ByteBuffer buffer, Class<?> eventClass) throws IOException { if (buffer.remaining() < 4) { throw new IOException("Incomplete event"); } final int bufferPos = buffer.position(); final ByteOrder bufferOrder = buffer.order(); buffer.order(ByteOrder.BIG_ENDIAN); try { int ty...
EventSerializer { private static boolean isEvent(ByteBuffer buffer, Class<?> eventClass) throws IOException { if (buffer.remaining() < 4) { throw new IOException("Incomplete event"); } final int bufferPos = buffer.position(); final ByteOrder bufferOrder = buffer.order(); buffer.order(ByteOrder.BIG_ENDIAN); try { int ty...
EventSerializer { private static boolean isEvent(ByteBuffer buffer, Class<?> eventClass) throws IOException { if (buffer.remaining() < 4) { throw new IOException("Incomplete event"); } final int bufferPos = buffer.position(); final ByteOrder bufferOrder = buffer.order(); buffer.order(ByteOrder.BIG_ENDIAN); try { int ty...
EventSerializer { private static boolean isEvent(ByteBuffer buffer, Class<?> eventClass) throws IOException { if (buffer.remaining() < 4) { throw new IOException("Incomplete event"); } final int bufferPos = buffer.position(); final ByteOrder bufferOrder = buffer.order(); buffer.order(ByteOrder.BIG_ENDIAN); try { int ty...
@Test public void testHasSerializedData() throws IOException { final int segmentSize = 16; final SpanningRecordSerializer<SerializationTestType> serializer = new SpanningRecordSerializer<>(); final SerializationTestType randomIntRecord = Util.randomRecord(SerializationTestTypeFactory.INT); Assert.assertFalse(serializer...
@Override public boolean hasSerializedData() { return lengthBuffer.hasRemaining() || dataBuffer.hasRemaining(); }
SpanningRecordSerializer implements RecordSerializer<T> { @Override public boolean hasSerializedData() { return lengthBuffer.hasRemaining() || dataBuffer.hasRemaining(); } }
SpanningRecordSerializer implements RecordSerializer<T> { @Override public boolean hasSerializedData() { return lengthBuffer.hasRemaining() || dataBuffer.hasRemaining(); } SpanningRecordSerializer(); }
SpanningRecordSerializer implements RecordSerializer<T> { @Override public boolean hasSerializedData() { return lengthBuffer.hasRemaining() || dataBuffer.hasRemaining(); } SpanningRecordSerializer(); @Override SerializationResult addRecord(T record); @Override SerializationResult continueWritingWithNextBufferBuilder(Bu...
SpanningRecordSerializer implements RecordSerializer<T> { @Override public boolean hasSerializedData() { return lengthBuffer.hasRemaining() || dataBuffer.hasRemaining(); } SpanningRecordSerializer(); @Override SerializationResult addRecord(T record); @Override SerializationResult continueWritingWithNextBufferBuilder(Bu...
@Test public void testBroadcastEventNoRecords() throws Exception { int numChannels = 4; int bufferSize = 32; @SuppressWarnings("unchecked") Queue<BufferConsumer>[] queues = new Queue[numChannels]; for (int i = 0; i < numChannels; i++) { queues[i] = new ArrayDeque<>(); } TestPooledBufferProvider bufferProvider = new Tes...
public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurrentBufferBuilder...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
@Test public void testBroadcastEventBufferReferenceCounting() throws Exception { @SuppressWarnings("unchecked") ArrayDeque<BufferConsumer>[] queues = new ArrayDeque[] { new ArrayDeque(), new ArrayDeque() }; ResultPartitionWriter partition = new CollectingPartitionWriter(queues, new TestPooledBufferProvider(Integer.MAX_...
public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurrentBufferBuilder...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
@Test public void testBroadcastEventBufferIndependence() throws Exception { @SuppressWarnings("unchecked") ArrayDeque<BufferConsumer>[] queues = new ArrayDeque[]{new ArrayDeque(), new ArrayDeque()}; ResultPartitionWriter partition = new CollectingPartitionWriter(queues, new TestPooledBufferProvider(Integer.MAX_VALUE));...
public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurrentBufferBuilder...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
RecordWriter { public void broadcastEvent(AbstractEvent event) throws IOException { try (BufferConsumer eventBufferConsumer = EventSerializer.toBufferConsumer(event)) { for (int targetChannel = 0; targetChannel < numChannels; targetChannel++) { RecordSerializer<T> serializer = serializers[targetChannel]; tryFinishCurre...
@Test(expected = IllegalArgumentException.class) public void testSetLessThanRequiredNumBuffers() throws IOException { localBufferPool.setNumBuffers(1); localBufferPool.setNumBuffers(0); }
@Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffers); if (numBuffers > maxNumberOfMemorySe...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
@Test @SuppressWarnings("unchecked") public void testConcurrentRequestRecycle() throws ExecutionException, InterruptedException, IOException { int numConcurrentTasks = 128; int numBuffersToRequestPerTask = 1024; localBufferPool.setNumBuffers(numConcurrentTasks); Future<Boolean>[] taskResults = new Future[numConcurrentT...
@Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffers); if (numBuffers > maxNumberOfMemorySe...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
LocalBufferPool implements BufferPool { @Override public void setNumBuffers(int numBuffers) throws IOException { synchronized (availableMemorySegments) { checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least %s buffers, but tried to set to %s", numberOfRequiredMemorySegments, numBuffer...
@Test public void testSlotAllocationTimeout() throws Exception { final Scheduler scheduler = new Scheduler(TestingUtils.defaultExecutor()); final ExecutionGraph executionGraph = ExecutionGraphTestUtils.createSimpleTestGraph(); final Map<ExecutionAttemptID, Execution> registeredExecutions = executionGraph.getRegisteredE...
@Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, Time allocationTimeout) { try { final Object ret = scheduleTask(task, allowQueued, slotProfile.getPreferredLocations()); if (ret instanceof SimpleSlot) { return Co...
Scheduler implements InstanceListener, SlotAvailabilityListener, SlotProvider { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, Time allocationTimeout) { try { final Object ret = scheduleTask(task, allowQueued, ...
Scheduler implements InstanceListener, SlotAvailabilityListener, SlotProvider { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, Time allocationTimeout) { try { final Object ret = scheduleTask(task, allowQueued, ...
Scheduler implements InstanceListener, SlotAvailabilityListener, SlotProvider { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, Time allocationTimeout) { try { final Object ret = scheduleTask(task, allowQueued, ...
Scheduler implements InstanceListener, SlotAvailabilityListener, SlotProvider { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, Time allocationTimeout) { try { final Object ret = scheduleTask(task, allowQueued, ...
@Test public void testCreateConstraints() { try { JobVertexID id1 = new JobVertexID(); JobVertexID id2 = new JobVertexID(); JobVertex vertex1 = new JobVertex("vertex1", id1); vertex1.setParallelism(2); JobVertex vertex2 = new JobVertex("vertex2", id2); vertex2.setParallelism(3); CoLocationGroup group = new CoLocationGr...
public AbstractID getGroupId() { return this.group.getId(); }
CoLocationConstraint { public AbstractID getGroupId() { return this.group.getId(); } }
CoLocationConstraint { public AbstractID getGroupId() { return this.group.getId(); } CoLocationConstraint(CoLocationGroup group); }
CoLocationConstraint { public AbstractID getGroupId() { return this.group.getId(); } CoLocationConstraint(CoLocationGroup group); SharedSlot getSharedSlot(); AbstractID getGroupId(); boolean isAssigned(); boolean isAssignedAndAlive(); TaskManagerLocation getLocation(); void setSharedSlot(SharedSlot newSlot); void lockL...
CoLocationConstraint { public AbstractID getGroupId() { return this.group.getId(); } CoLocationConstraint(CoLocationGroup group); SharedSlot getSharedSlot(); AbstractID getGroupId(); boolean isAssigned(); boolean isAssignedAndAlive(); TaskManagerLocation getLocation(); void setSharedSlot(SharedSlot newSlot); void lockL...
@Test public void testJobMasterLeaderRetrieval() throws Exception { JobID jobId1 = new JobID(); JobID jobId2 = new JobID(); final String jobManagerAddress1 = "foobar"; final String jobManagerAddress2 = "barfoo"; LeaderRetrievalListener jmListener1 = mock(LeaderRetrievalListener.class); LeaderRetrievalListener jmListene...
@Override public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID) { synchronized (lock) { checkNotShutdown(); return new StandaloneLeaderRetrievalService(jobManagerAddress, DEFAULT_LEADER_ID); } }
StandaloneHaServices extends AbstractNonHaServices { @Override public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID) { synchronized (lock) { checkNotShutdown(); return new StandaloneLeaderRetrievalService(jobManagerAddress, DEFAULT_LEADER_ID); } } }
StandaloneHaServices extends AbstractNonHaServices { @Override public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID) { synchronized (lock) { checkNotShutdown(); return new StandaloneLeaderRetrievalService(jobManagerAddress, DEFAULT_LEADER_ID); } } StandaloneHaServices( String resourceManagerAddress...
StandaloneHaServices extends AbstractNonHaServices { @Override public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID) { synchronized (lock) { checkNotShutdown(); return new StandaloneLeaderRetrievalService(jobManagerAddress, DEFAULT_LEADER_ID); } } StandaloneHaServices( String resourceManagerAddress...
StandaloneHaServices extends AbstractNonHaServices { @Override public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID) { synchronized (lock) { checkNotShutdown(); return new StandaloneLeaderRetrievalService(jobManagerAddress, DEFAULT_LEADER_ID); } } StandaloneHaServices( String resourceManagerAddress...
@Test public void testJobManagerLeaderElection() throws Exception { JobID jobId1 = new JobID(); JobID jobId2 = new JobID(); LeaderContender leaderContender1 = mock(LeaderContender.class); LeaderContender leaderContender2 = mock(LeaderContender.class); LeaderContender leaderContenderDifferentJobId = mock(LeaderContender...
@Override public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID) { checkNotNull(jobID); synchronized (lock) { checkNotShutdown(); EmbeddedLeaderService service = getOrCreateJobManagerService(jobID); return service.createLeaderElectionService(); } }
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID) { checkNotNull(jobID); synchronized (lock) { checkNotShutdown(); EmbeddedLeaderService service = getOrCreateJobManagerService(jobID); return service.createLeaderElectionService(); } ...
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID) { checkNotNull(jobID); synchronized (lock) { checkNotShutdown(); EmbeddedLeaderService service = getOrCreateJobManagerService(jobID); return service.createLeaderElectionService(); } ...
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID) { checkNotNull(jobID); synchronized (lock) { checkNotShutdown(); EmbeddedLeaderService service = getOrCreateJobManagerService(jobID); return service.createLeaderElectionService(); } ...
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID) { checkNotNull(jobID); synchronized (lock) { checkNotShutdown(); EmbeddedLeaderService service = getOrCreateJobManagerService(jobID); return service.createLeaderElectionService(); } ...
@Test public void testResourceManagerLeaderElection() throws Exception { LeaderContender leaderContender1 = mock(LeaderContender.class); LeaderContender leaderContender2 = mock(LeaderContender.class); LeaderElectionService leaderElectionService1 = embeddedHaServices.getResourceManagerLeaderElectionService(); LeaderElec...
@Override public LeaderElectionService getResourceManagerLeaderElectionService() { return resourceManagerLeaderService.createLeaderElectionService(); }
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getResourceManagerLeaderElectionService() { return resourceManagerLeaderService.createLeaderElectionService(); } }
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getResourceManagerLeaderElectionService() { return resourceManagerLeaderService.createLeaderElectionService(); } EmbeddedHaServices(Executor executor); }
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getResourceManagerLeaderElectionService() { return resourceManagerLeaderService.createLeaderElectionService(); } EmbeddedHaServices(Executor executor); @Override LeaderRetrievalService getResourceManagerLeaderRetriever(); @Overrid...
EmbeddedHaServices extends AbstractNonHaServices { @Override public LeaderElectionService getResourceManagerLeaderElectionService() { return resourceManagerLeaderService.createLeaderElectionService(); } EmbeddedHaServices(Executor executor); @Override LeaderRetrievalService getResourceManagerLeaderRetriever(); @Overrid...