use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class ClientDeploymentTest method createCluster.
@Override
protected void createCluster() {
factory = new JetTestInstanceFactory();
JetConfig jetConfig = new JetConfig();
FilteringClassLoader filteringClassLoader = new FilteringClassLoader(singletonList("deployment"), null);
jetConfig.getHazelcastConfig().setClassLoader(filteringClassLoader);
factory.newMember(jetConfig);
client = factory.newClient();
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class DeploymentTest method createCluster.
@Override
protected void createCluster() {
factory = new JetTestInstanceFactory();
instance = factory.newMember();
JetConfig jetConfig = new JetConfig();
FilteringClassLoader filteringClassLoader = new FilteringClassLoader(singletonList("deployment"), null);
jetConfig.getHazelcastConfig().setClassLoader(filteringClassLoader);
factory.newMember(jetConfig);
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class TopologyChangeDuringJobSubmissionTest method setup.
@Before
public void setup() {
MockPS.closeCount.set(0);
MockPS.initCount.set(0);
MockPS.receivedCloseErrors.clear();
StuckProcessor.proceedLatch = new CountDownLatch(1);
StuckProcessor.executionStarted = new CountDownLatch(PARALLELISM);
JetConfig config = new JetConfig();
config.getHazelcastConfig().setLiteMember(true);
instance1 = createJetMember(config);
instance2 = createJetMember();
warmUpPartitions(instance1.getHazelcastInstance(), instance2.getHazelcastInstance());
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class XmlConfigTest method when_filePathMemberSpecified_usesSpecifiedFile.
@Test
public void when_filePathMemberSpecified_usesSpecifiedFile() throws IOException {
// Given
File tempFile = File.createTempFile("imdg", ".xml");
try (FileOutputStream os = new FileOutputStream(tempFile)) {
InputStream resourceAsStream = getClass().getClassLoader().getResourceAsStream(TEST_XML_2);
os.write(Util.readFully(resourceAsStream));
}
Properties properties = new Properties();
properties.put(XmlJetConfigLocator.HAZELCAST_MEMBER_CONFIG_PROPERTY, tempFile.getAbsolutePath());
// 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_classpathSpecified_usesSpecifiedResource.
@Test
public void when_classpathSpecified_usesSpecifiedResource() {
// Given
Properties properties = new Properties();
properties.put(XmlJetConfigLocator.HAZELCAST_JET_CONFIG_PROPERTY, "classpath:" + TEST_XML_1);
// When
JetConfig jetConfig = XmlJetConfigBuilder.getConfig(properties);
// Then
assertConfig(jetConfig);
assertDefaultMemberConfig(jetConfig.getHazelcastConfig());
}
Aggregations