use of com.hazelcast.jet.config.JetConfig in project hazelcast-simulator by hazelcast.
the class JetDriver method startVendorInstance.
@Override
public void startVendorInstance() throws Exception {
String workerType = get("WORKER_TYPE");
LOGGER.info(format("%s HazelcastInstance starting", workerType));
if ("javaclient".equals(workerType)) {
File configFile = new File(getUserDir(), "client-hazelcast.xml");
XmlClientConfigBuilder configBuilder = new XmlClientConfigBuilder(configFile);
ClientConfig clientConfig = configBuilder.build();
jet = Jet.newJetClient(clientConfig);
} else {
File configFile = new File(getUserDir(), "hazelcast.xml");
XmlConfigBuilder configBuilder = new XmlConfigBuilder(configFile.getAbsolutePath());
Config config = configBuilder.build();
JetConfig jetConfig = new JetConfig();
jetConfig.setHazelcastConfig(config);
jet = Jet.newJetInstance(jetConfig);
}
LOGGER.info(format("%s HazelcastInstance started", workerType));
warmupPartitions(jet.getHazelcastInstance());
LOGGER.info("Warmed up partitions");
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class TestApplicationContext method assertJetConfig.
private void assertJetConfig() {
JetConfig jetConfig = jetInstance.getConfig();
Config hazelcastConfig = jetConfig.getHazelcastConfig();
assertHazelcastConfig(hazelcastConfig);
InstanceConfig instanceConfig = jetConfig.getInstanceConfig();
assertEquals(4, instanceConfig.getBackupCount());
assertEquals(2, instanceConfig.getCooperativeThreadCount());
assertEquals(200, instanceConfig.getFlowControlPeriodMs());
assertEquals("springTempDir", instanceConfig.getTempDir());
EdgeConfig edgeConfig = jetConfig.getDefaultEdgeConfig();
assertEquals(8, edgeConfig.getQueueSize());
assertEquals(3, edgeConfig.getPacketSizeLimit());
assertEquals(5, edgeConfig.getReceiveWindowMultiplier());
assertEquals("bar", jetConfig.getProperties().getProperty("foo"));
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class DetermineLocalParallelismTest method before.
@Before
public void before() {
JetConfig cfg = new JetConfig();
cfg.getInstanceConfig().setCooperativeThreadCount(DEFAULT_PARALLELISM);
JetInstance jet = createJetMember(cfg);
nodeEngine = getNode(jet.getHazelcastInstance()).getNodeEngine();
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class GroupTransform_IntegrationTest method before.
@Before
public void before() {
JetConfig config = new JetConfig();
config.getHazelcastConfig().addEventJournalConfig(new EventJournalConfig().setMapName("source").setEnabled(true));
instance = createJetMember(config);
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class JetTest method when_defaultMapConfig_then_notUsed.
@Test
public void when_defaultMapConfig_then_notUsed() {
// When
JetConfig config = new JetConfig();
config.getHazelcastConfig().getMapConfig("default").setTimeToLiveSeconds(MapConfig.DEFAULT_TTL_SECONDS + 1);
JetInstance instance = createJetMember(config);
try {
// Then
int actualTTL = instance.getConfig().getHazelcastConfig().findMapConfig(INTERNAL_JET_OBJECTS_PREFIX + "fooMap").getTimeToLiveSeconds();
assertEquals(MapConfig.DEFAULT_TTL_SECONDS, actualTTL);
} finally {
shutdownFactory();
}
}
Aggregations