com.hazelcast.jet.Jet.shutdownAll()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中com.hazelcast.jet.Jet.shutdownAll()方法的一些代码示例,展示了Jet.shutdownAll()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jet.shutdownAll()方法的具体详情如下:
包路径:com.hazelcast.jet.Jet
类名称:Jet
方法名:shutdownAll

Jet.shutdownAll介绍

[英]Shuts down all running Jet client and member instances.
[中]关闭所有正在运行的Jet客户端和成员实例。

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  try {
    new TfIdfCoreApi().go();
  } catch (Throwable t) {
    Jet.shutdownAll();
    throw t;
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

public void stop() throws IOException {
  Jet.shutdownAll();
  Utils.cleanupDataInTmp(filePath);
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  try {
    new TfIdf().go();
  } catch (Throwable t) {
    Jet.shutdownAll();
    throw t;
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void cleanup() {
  Jet.shutdownAll();
  DeleteDbFiles.execute(dbDirectory, JdbcSink.class.getSimpleName(), true);
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void cleanup() {
  Jet.shutdownAll();
  DeleteDbFiles.execute(dbDirectory, JdbcSource.class.getSimpleName(), true);
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void cleanup() {
  scheduledExecutorService.shutdown();
  producer.stop();
  activeMQBroker.stop();
  Jet.shutdownAll();
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void cleanup() {
  scheduledExecutorService.shutdown();
  producer.stop();
  activeMQBroker.stop();
  Jet.shutdownAll();
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

public static void main(String[] args) throws Exception {
  System.setProperty("hazelcast.logging.type", "log4j");
  JetInstance jet = Jet.newJetInstance();
  Jet.newJetInstance();
  try {
    jet.newJob(buildPipeline());
    Thread.sleep(JOB_DURATION_MS);
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

public static void main(String[] args) {
  JetInstance jet = Jet.newJetInstance();
  Pipeline p = buildPipeline();
  System.out.println("Generating model...");
  try {
    jet.newJob(p).join();
    printTransitionsAndMarkovChain(jet);
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void go() {
  try {
    setup();
    jet.newJob(buildPipeline()).join();
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void go() {
  try {
    setup();
    jet.newJob(buildPipeline()).join();
    IMapJet<String, User> map = jet.getMap(AvroSink.MAP_NAME);
    System.out.println("Map Size: " + map.size());
    map.forEach((key, value) -> System.out.println(key + " - " + value));
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

@BeforeClass
@AfterClass
public static void start() {
  Jet.shutdownAll();
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

public static void main(String[] args) {
  System.out.println("DISCLAIMER: This is not investment advice");
  Pipeline pipeline = buildPipeline();
  // Start Jet
  JetInstance jet = Jet.newJetInstance();
  startConsolePrinterThread(jet);
  try {
    // Perform the computation
    jet.newJob(pipeline).join();
  } finally {
    Util.stopConsolePrinterThread();
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

@BeforeClass
@AfterClass
public static void start() {
  Jet.shutdownAll();
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

public static void main(String[] args) {
  JetInstance jet = Jet.newJetInstance();
  Pipeline pipeline = buildPipeline();
  addListener(jet.getMap(TAKE_OFF_MAP), a -> System.out.println("New aircraft taking off: " + a));
  addListener(jet.getMap(LANDING_MAP), a -> System.out.println("New aircraft landing " + a));
  try {
    Job job = jet.newJob(pipeline, new JobConfig().setName("FlightTelemetry").setProcessingGuarantee(ProcessingGuarantee.EXACTLY_ONCE));
    job.join();
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void go() throws Exception {
  try {
    createAvroFile();
    JetInstance jet = Jet.newJetInstance();
    JobConf jobConfig = createJobConfig();
    jet.newJob(buildPipeline(jobConfig)).join();
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  JetConfig config = new JetConfig();
  config.getHazelcastConfig().addEventJournalConfig(new EventJournalConfig()
      .setMapName(TRADES_MAP_NAME));
  JetInstance jet = Jet.newJetInstance(config);
  Jet.newJetInstance(config);
  try {
    jet.newJob(buildDag());
    TradeGenerator.generate(100, jet.getMap(TRADES_MAP_NAME), TRADES_PER_SECOND, JOB_DURATION);
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  JetConfig config = new JetConfig();
  config.getHazelcastConfig().addEventJournalConfig(new EventJournalConfig()
      .setMapName(TRADES_MAP_NAME));
  JetInstance jet = Jet.newJetInstance(config);
  Jet.newJetInstance(config);
  try {
    jet.newJob(buildDag());
    TradeGenerator.generate(100, jet.getMap(TRADES_MAP_NAME), TRADES_PER_SECOND, JOB_DURATION);
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void go() {
  prepareSampleData();
  try {
    jet.newJob(coGroupDirect()).join();
    validateCoGroupResults();
    jet.getMap(RESULT).clear();
    jet.newJob(coGroupBuild()).join();
    validateCoGroupResults();
  } finally {
    Jet.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-code-samples

private void go() {
  prepareSampleData();
  try {
    jet.newJob(coGroupDirect()).join();
    validateCoGroupResults();
    jet.getMap(RESULT).clear();
    jet.newJob(coGroupBuild()).join();
    validateCoGroupResults();
  } finally {
    Jet.shutdownAll();
  }
}

相关文章