Tabnine Logo
SamzaSqlApplicationRunner.run
Code IndexAdd Tabnine to your IDE (free)

How to use
run
method
in
org.apache.samza.sql.runner.SamzaSqlApplicationRunner

Best Java code snippets using org.apache.samza.sql.runner.SamzaSqlApplicationRunner.run (Showing top 4 results out of 315)

origin: apache/samza

public void runAndWaitForFinish(ExternalContext externalContext) {
 Validate.isTrue(runner instanceof LocalApplicationRunner, "This method can be called only in standalone mode.");
 run(externalContext);
 waitForFinish();
}
origin: org.apache.samza/samza-sql

public void runAndWaitForFinish() {
 Validate.isTrue(runner instanceof LocalApplicationRunner, "This method can be called only in standalone mode.");
 run();
 waitForFinish();
}
origin: apache/samza

@Override
public NonQueryResult executeNonQuery(ExecutionContext context, List<String> statement) {
 lastErrorMsg = "";
 int execId = execIdSeq.incrementAndGet();
 Map<String, String> staticConfigs = fetchSamzaSqlConfig(execId, context);
 staticConfigs.put(SamzaSqlApplicationConfig.CFG_SQL_STMTS_JSON, JsonUtil.toJson(formatSqlStmts(statement)));
 SamzaSqlApplicationRunner runner;
 try {
  runner = new SamzaSqlApplicationRunner(true, new MapConfig(staticConfigs));
  runner.run(null);
 } catch (SamzaException ex) {
  String msg = "Execution of the query failed with exception ";
  lastErrorMsg = msg + ex.toString();
  LOG.error(msg, ex);
  return new NonQueryResult(execId, false);
 }
 executions.put(execId, runner);
 LOG.debug("Executing sql. Id ", execId);
 return new NonQueryResult(execId, true);
}
origin: apache/samza

@Override
public QueryResult executeQuery(ExecutionContext context, String statement) {
 lastErrorMsg = "";
 outputData.clear();
 int execId = execIdSeq.incrementAndGet();
 Map<String, String> staticConfigs = fetchSamzaSqlConfig(execId, context);
 List<String> sqlStmts = formatSqlStmts(Collections.singletonList(statement));
 staticConfigs.put(SamzaSqlApplicationConfig.CFG_SQL_STMTS_JSON, JsonUtil.toJson(sqlStmts));
 SamzaSqlApplicationRunner runner;
 try {
  runner = new SamzaSqlApplicationRunner(true, new MapConfig(staticConfigs));
  runner.run(null);
 } catch (SamzaException ex) {
  String msg = "Execution failed with exception ";
  lastErrorMsg = msg + ex.toString();
  LOG.error(msg, ex);
  return new QueryResult(execId, null, false);
 }
 executions.put(execId, runner);
 LOG.debug("Executing sql. Id ", execId);
 return new QueryResult(execId, generateResultSchema(new MapConfig(staticConfigs)), true);
}
org.apache.samza.sql.runnerSamzaSqlApplicationRunnerrun

Popular methods of SamzaSqlApplicationRunner

  • computeSamzaConfigs
  • waitForFinish
  • <init>
    NOTE: This constructor is called from ApplicationRunners through reflection. Please refrain from upd
  • kill
  • runAndWaitForFinish
  • status

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now