Codota Logo
Runner
Code IndexAdd Codota to your IDE (free)

How to use
Runner
in
io.flinkspector.core.runtime

Best Java code snippets using io.flinkspector.core.runtime.Runner (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: ottogroup/flink-spector

public void executeTest() throws Throwable {
  runner.executeTest();
}
origin: ottogroup/flink-spector

/**
 * Getter for the timeout interval
 * after the test execution gets stopped.
 *
 * @return timeout in milliseconds
 */
public Long getTimeoutInterval() {
  return runner.getTimeoutInterval();
}
origin: ottogroup/flink-spector

/**
 * This method can be used to check if the environment has been
 * stopped prematurely by e.g. a timeout.
 *
 * @return true if has been stopped forcefully.
 */
public Boolean hasBeenStopped() {
  return runner.hasBeenStopped();
}
origin: ottogroup/flink-spector

/**
 * Creates a TestSink to verify the output of your stream. The environment will register a port
 *
 * @param verifier which will be used to verify the received records
 * @param <IN>     type of the input
 * @return the created sink.
 */
public <IN> TestSink<IN> createTestSink(OutputVerifier<IN> verifier,
    VerifyFinishedTrigger trigger) {
  int instance = runner.registerListener(verifier, trigger);
  TestSink<IN> sink = new TestSink<IN>(instance, runner.getRingBuffer());
  return sink;
}
origin: ottogroup/flink-spector

disruptor.start();
stopTimer.schedule(stopExecution, timeout);
runLocalCluster();
    cleanUp();
    cancelListener();
    return;
cleanUp();
origin: ottogroup/flink-spector

/**
 * Setter for the timeout interval
 * after the test execution gets stopped.
 *
 * @param interval in milliseconds.
 */
public void setTimeoutInterval(long interval) {
  runner.setTimeoutInterval(interval);
}
origin: ottogroup/flink-spector

private synchronized void cleanUp() {
  if(!finished.get()) {
    disruptor.shutdown();
    cancelListener();
    finished.set(true);
  }
  shutdownLocalCluster();
  stopTimer.cancel();
  stopTimer.purge();
}
origin: ottogroup/flink-spector

private synchronized void runLocalCluster() throws Throwable {
  try {
    running.set(true);
    cluster.start();
    executeEnvironment();
    finished.set(true);
    cleanUp();
  }
  catch(JobTimeoutException
      | IllegalStateException e) {
    //cluster has been shutdown forcefully, most likely by a timeout.
    cleanUp();
    failed.set(true);
  }
}
origin: ottogroup/flink-spector

/**
 * Stops the execution of the test.
 * <p>
 * Shutting the local cluster down will notify the sockets when the sinks are closed. Thus terminating the execution gracefully.
 * </p>
 */
public synchronized void stopExecution() {
  stopped = true;
  //execution has failed no cleanup necessary
  if(failed.get()) {
    return;
  }
  if(!finished.get()) {
    //run is not finished and has to be stopped forcefully
    cleanUp();
  }
}
origin: ottogroup/flink-spector

  VerifyFinishedTrigger<? super OUT> trigger) {
int instance = getNextInstance();
origin: ottogroup/flink-spector

/**
 * Creates a TestOutputFormat to verify the output.
 * The environment will register a port
 *
 * @param verifier which will be used to verify the received records
 * @param <IN>     type of the input
 * @return the created sink.
 */
public <IN> TestOutputFormat<IN> createTestOutputFormat(OutputVerifier<IN> verifier,
                            VerifyFinishedTrigger trigger) {
  int instance = runner.registerListener(verifier, trigger);
  TestOutputFormat<IN> format = new TestOutputFormat<IN>(instance, runner.getRingBuffer());
  return format;
}
origin: ottogroup/flink-spector

/**
 * Setter for the timeout interval after the test execution gets stopped.
 *
 * @param interval in milliseconds.
 */
public void setTimeoutInterval(long interval) {
  runner.setTimeoutInterval(interval);
}
origin: ottogroup/flink-spector

/**
 * Creates a TestSink to verify your the output of your stream. Using a {@link OutputVerifier}
 *
 * @param verifier {@link OutputVerifier} which will be used to verify the received records.
 * @param <IN>     type of the input
 * @return the created sink.
 */
public <IN> TestSink<IN> createTestSink(OutputVerifier<IN> verifier) {
  VerifyFinishedTrigger trigger = new DefaultTestTrigger();
  int instance = runner.registerListener(verifier, trigger);
  TestSink<IN> sink = new TestSink<IN>(instance, runner.getRingBuffer());
  return sink;
}
origin: ottogroup/flink-spector

/**
 * Getter for the timeout interval after the test execution gets stopped.
 *
 * @return timeout in milliseconds
 */
public Long getTimeoutInterval() {
  return runner.getTimeoutInterval();
}
origin: ottogroup/flink-spector

/**
 * This method can be used to check if the environment has been stopped prematurely by e.g. a timeout.
 *
 * @return true if has been stopped forcefully.
 */
public Boolean hasBeenStopped() {
  return runner.hasBeenStopped();
}
origin: ottogroup/flink-spector

public void executeTest() throws Throwable {
  runner.executeTest();
}
origin: ottogroup/flink-spector

/**
 * Creates a TestOutputFormat to verify the output.
 * Using a {@link OutputVerifier}
 *
 * @param verifier {@link OutputVerifier} which will be
 *                 used to verify the received records.
 * @param <IN>     type of the input
 * @return the created {@link TestOutputFormat}.
 */
public <IN> TestOutputFormat<IN> createTestOutputFormat(OutputVerifier<IN> verifier) {
  VerifyFinishedTrigger trigger = new DefaultTestTrigger();
  int instance = runner.registerListener(verifier, trigger);
  TestOutputFormat<IN> format = new TestOutputFormat<IN>(instance, runner.getRingBuffer());
  return format;
}
io.flinkspector.core.runtimeRunner

Javadoc

This class is responsible for orchestrating tests run with Flinkspector

Most used methods

  • executeTest
    Starts the test execution. Collects the results from sockets after the cluster has terminated.
  • getRingBuffer
  • getTimeoutInterval
    Getter for the timeout interval after the test execution gets failed.
  • hasBeenStopped
    This method can be used to check if the environment has been stopped prematurely by e.g. a timeout.
  • registerListener
    Registers a verifier for a 0MQ port.
  • setTimeoutInterval
    Setter for the timeout interval after the test execution gets failed.
  • cancelListener
  • cleanUp
  • executeEnvironment
  • getNextInstance
    Get a port to use.
  • runLocalCluster
  • shutdownLocalCluster
  • runLocalCluster,
  • shutdownLocalCluster,
  • stopExecution

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Reference (javax.naming)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now