com.hazelcast.jet.Jet类的使用及代码示例

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

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

Jet介绍

[英]Entry point to the Jet product.
[中]Jet产品的入口点。

代码示例

代码示例来源: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-code-samples

@Bean
  public JetInstance jetClient() {
    return Jet.newJetClient(clientConfig);
  }
}

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

private static JetInstance startLocalJetCluster() {
  JetInstance localJet = Jet.newJetInstance();
  Jet.newJetInstance();
  return localJet;
}

代码示例来源: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-code-samples

private static JetInstance startLocalJetCluster() {
  JetInstance localJet = Jet.newJetInstance();
  Jet.newJetInstance();
  return localJet;
}

代码示例来源: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-demos

public static void main(String[] args) {
  if (args.length != 1) {
    System.err.println("Missing command-line argument: <model path>");
    System.exit(1);
  }
  Path modelPath = Paths.get(args[0]).toAbsolutePath();
  if (!Files.isDirectory(modelPath)) {
    System.err.println("Model path does not exist (" + modelPath + ")");
    System.exit(1);
  }
  Pipeline pipeline = buildPipeline(modelPath.toString());
  JetInstance jet = Jet.newJetInstance();
  try {
    jet.newJob(pipeline).join();
  } finally {
    Jet.shutdownAll();
  }
}

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

private static JetInstance startJet() {
  System.out.println("Creating Jet instance 1");
  Jet.newJetInstance();
  System.out.println("Creating Jet instance 2");
  return Jet.newJetInstance();
}

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

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

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

/**
 * Creates a Jet client with the default configuration.
 */
public static JetInstance newJetClient() {
  ClientConfig clientConfig = getClientConfig();
  return newJetClient(clientConfig);
}

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

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  if (args.length != 2) {
    System.err.println("Usage:");
    System.err.println("  " + AccessLogAnalyzer.class.getSimpleName() + " <sourceDir> <targetDir>");
    System.exit(1);
  }
  final String sourceDir = args[0];
  final String targetDir = args[1];
  Pipeline p = buildPipeline(sourceDir, targetDir);
  JetInstance instance = Jet.newJetInstance();
  try {
    instance.newJob(p).join();
  } finally {
    Jet.shutdownAll();
  }
}

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

private void setup() {
  if (!Paths.get(AvroSink.DIRECTORY_NAME).toFile().exists()) {
    System.out.println("Avro files directory does not exist, please run " +
        AvroSink.class.getSimpleName() + " first to create it.");
    System.exit(0);
  }
  jet = Jet.newJetInstance();
  Jet.newJetInstance();
}

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

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

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

JetInstance client = Jet.newJetClient();
Job job = client.newJob(buildPipeline(), config);

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

public static void main(String[] args) throws Exception {
  System.setProperty("hazelcast.logging.type", "log4j");
  Path tempDir = Files.createTempDirectory(AccessLogStreamAnalyzer.class.getSimpleName());
  Pipeline p = buildPipeline(tempDir);
  JetInstance instance = Jet.newJetInstance();
  try {
    instance.newJob(p);
    // job is running in its own threads. Let's generate some random traffic in this thread.
    startGenerator(tempDir);
    // wait for all writes to be picked up
    LockSupport.parkNanos(SECONDS.toNanos(1));
  } finally {
    Jet.shutdownAll();
    IOUtil.delete(tempDir.toFile());
  }
}

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

public static void main(String[] args) {
  System.setProperty("hazelcast.logging.type", "log4j");
  JetInstance jet = Jet.newJetInstance();
  Jet.newJetInstance();
  new BatchCoGroup(jet).go();
}

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

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

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

public static void main(String[] args) {
  if (args.length != 2) {
    System.err.println("Missing command-line arguments: <input file> <output directory>");
    System.exit(1);
  }
  Path sourceFile = Paths.get(args[0]).toAbsolutePath();
  final String targetDirectory = args[1];
  if (!Files.isReadable(sourceFile)) {
    System.err.println("Source file does not exist or is not readable (" + sourceFile + ")");
    System.exit(1);
  }
  JetInstance instance = Jet.newJetInstance();
  Pipeline pipeline = buildPipeline(sourceFile, targetDirectory);
  try {
    instance.newJob(pipeline).join();
  } finally {
    Jet.shutdownAll();
  }
}
/**

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

private void setup() throws Exception {
  dbDirectory = Files.createTempDirectory(JdbcSource.class.getName()).toString();
  createAndFillTable();
  jet = Jet.newJetInstance();
  Jet.newJetInstance();
}

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

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

相关文章