use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class XmlConfigTest method when_classpathMemberSpecified_usesSpecifiedResource.
@Test
public void when_classpathMemberSpecified_usesSpecifiedResource() {
// Given
Properties properties = new Properties();
properties.put(XmlJetConfigLocator.HAZELCAST_MEMBER_CONFIG_PROPERTY, "classpath:" + TEST_XML_2);
// When
JetConfig jetConfig = XmlJetConfigBuilder.getConfig(properties);
// Then
assertXmlMemberConfig(jetConfig.getHazelcastConfig());
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class XmlConfigTest method when_edgeDefaultsSpecified_usesSpecified.
@Test
public void when_edgeDefaultsSpecified_usesSpecified() {
// Given
Properties properties = new Properties();
properties.put(XmlJetConfigLocator.HAZELCAST_JET_CONFIG_PROPERTY, "classpath:" + TEST_XML_1);
// When
JetConfig jetConfig = XmlJetConfigBuilder.getConfig(properties);
// Then
EdgeConfig edgeConfig = jetConfig.getDefaultEdgeConfig();
assertEquals("queueSize", 999, edgeConfig.getQueueSize());
assertEquals("packetSizeLimit", 997, edgeConfig.getPacketSizeLimit());
assertEquals("receiveWindowMultiplier", 996, edgeConfig.getReceiveWindowMultiplier());
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class XmlConfigTest method when_configMemberHasVariable_variablesAreReplaced.
@Ignore("To confirm if substitution in Jet should be visible to IMDG")
@Test
public void when_configMemberHasVariable_variablesAreReplaced() {
// Given
Properties properties = new Properties();
properties.put(XmlJetConfigLocator.HAZELCAST_MEMBER_CONFIG_PROPERTY, "classpath:${my.filename}");
properties.put("my.filename", TEST_XML_2);
properties.put("imdg.instance.name", INSTANCE_NAME);
// When
JetConfig jetConfig = XmlJetConfigBuilder.getConfig(properties);
// Then
assertXmlMemberConfig(jetConfig.getHazelcastConfig());
assertThat(jetConfig.getHazelcastConfig().getInstanceName(), equalTo(INSTANCE_NAME));
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet-reference-manual by hazelcast.
the class LogDebug method s2.
static void s2() {
// tag::s2[]
JetConfig config = new JetConfig();
config.getHazelcastConfig().setProperty("hazelcast.logging.type", "log4j");
// end::s2[]
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet-reference-manual by hazelcast.
the class Configuration method s2.
static void s2() {
// tag::s2[]
JetConfig jetConfig = new JetConfig();
jetConfig.getHazelcastConfig().getGroupConfig().setName("test");
JetInstance jet = Jet.newJetInstance(jetConfig);
// end::s2[]
}
Aggregations