private static JetInstance startLocalJetCluster() { JetInstance localJet = Jet.newJetInstance(); Jet.newJetInstance(); return localJet; }
private static JetInstance startLocalJetCluster() { JetInstance localJet = Jet.newJetInstance(); Jet.newJetInstance(); return localJet; }
private static JetInstance startJet() { System.out.println("Creating Jet instance 1"); Jet.newJetInstance(); System.out.println("Creating Jet instance 2"); return Jet.newJetInstance(); }
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(); }
public static void main(String[] args) { System.setProperty("hazelcast.logging.type", "log4j"); JetInstance jet = Jet.newJetInstance(); Jet.newJetInstance(); new BatchCoGroup(jet).go(); }
private void setup() throws Exception { dbDirectory = Files.createTempDirectory(JdbcSource.class.getName()).toString(); createAndFillTable(); jet = Jet.newJetInstance(); Jet.newJetInstance(); }
/** * Creates a member of the Jet cluster with the configuration loaded from * default location. */ public static JetInstance newJetInstance() { return newJetInstance(JetConfig.loadDefault()); }
private void setup() { JetConfig cfg = new JetConfig(); System.out.println("Creating Jet instance 1"); jet = Jet.newJetInstance(cfg); }
private void setup() { JetConfig cfg = new JetConfig(); System.out.println("Creating Jet instance"); jet = Jet.newJetInstance(cfg); }
private void setup() throws Exception { dbDirectory = Files.createTempDirectory(JdbcSink.class.getName()).toString(); createTable(); jet = Jet.newJetInstance(); Jet.newJetInstance(); IMapJet<Integer, User> map = jet.getMap(MAP_NAME); // populate the source IMap for (int i = 0; i < 100; i++) { map.put(i, new User(i, "name-" + i)); } }
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(); } }
@Bean public JetInstance jetInstance(Config config) { JetConfig jetConfig = new JetConfig().setHazelcastConfig(config); return Jet.newJetInstance(jetConfig); }
private void setup() throws Exception { scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(); activeMQBroker = new ActiveMQBroker(); activeMQBroker.start(); producer = new JmsMessageProducer(INPUT_TOPIC, JmsMessageProducer.DestinationType.TOPIC); producer.start(); jet = Jet.newJetInstance(); }
private void setup() { JetConfig cfg = new JetConfig(); cfg.setInstanceConfig(new InstanceConfig().setCooperativeThreadCount( Math.max(1, getRuntime().availableProcessors() / 2))); System.out.println("Creating Jet instance 1"); jet = Jet.newJetInstance(cfg); System.out.println("Creating Jet instance 2"); Jet.newJetInstance(cfg); System.out.println("These books will be indexed:"); buildDocumentInventory(); }
public static void main(String[] args) throws Exception { System.setProperty("hazelcast.logging.type", "log4j"); // Lower operation timeout to speed up job cancellation System.setProperty("hazelcast.operation.call.timeout.millis", "1000"); JetConfig cfg = new JetConfig(); cfg.getHazelcastConfig().getMapEventJournalConfig(TRADES).setEnabled(true); JetInstance jet = Jet.newJetInstance(cfg); Jet.newJetInstance(cfg); new Enrichment(jet).go(); }
/** * Creates a server instance of Hazelcast Jet. If the system property * {@code print.port} is set, the server writes the port number of the * Hazelcast instance to a file named by the property. */ public static void main(String[] args) throws Exception { configureLogging(); JetInstance jet = Jet.newJetInstance(); printMemberPort(jet.getHazelcastInstance()); }
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(); } }
/** * {@code JetInstance} bean which configured programmatically with {@code SpringManagedContext} */ @Bean public JetInstance instance() { Config config = new Config() .setManagedContext(managedContext()); JetConfig jetConfig = new JetConfig() .setHazelcastConfig(config); return Jet.newJetInstance(jetConfig); } }
private void go() throws Exception { try { createAvroFile(); JetInstance jet = Jet.newJetInstance(); JobConf jobConfig = createJobConfig(); jet.newJob(buildPipeline(jobConfig)).join(); } finally { Jet.shutdownAll(); } }
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(); } }