use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class ExecutionLifecycleTest method setup.
@Before
public void setup() {
MockPMS.initCalled.set(false);
MockPMS.closeCalled.set(false);
MockPMS.receivedCloseError.set(null);
MockPS.closeCount.set(0);
MockPS.initCount.set(0);
MockPS.receivedCloseErrors.clear();
MockP.initCount.set(0);
MockP.closeCount.set(0);
MockP.receivedCloseErrors.clear();
StuckProcessor.proceedLatch = new CountDownLatch(1);
StuckProcessor.executionStarted = new CountDownLatch(NODE_COUNT * LOCAL_PARALLELISM);
JetConfig config = new JetConfig();
config.getInstanceConfig().setCooperativeThreadCount(LOCAL_PARALLELISM);
instance = createJetMember(config);
createJetMember(config);
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class JetSplitBrainTestSupport method testSplitBrain.
final void testSplitBrain(int firstSubClusterSize, int secondSubClusterSize, Consumer<JetInstance[]> beforeSplit, BiConsumer<JetInstance[], JetInstance[]> onSplit, Consumer<JetInstance[]> afterMerge) {
checkPositive(firstSubClusterSize, "invalid first sub cluster size: " + firstSubClusterSize);
checkPositive(secondSubClusterSize, "invalid second sub cluster size: " + secondSubClusterSize);
JetConfig config = createConfig();
int clusterSize = firstSubClusterSize + secondSubClusterSize;
JetInstance[] instances = startInitialCluster(config, clusterSize);
if (beforeSplit != null) {
beforeSplit.accept(instances);
}
createSplitBrain(instances, firstSubClusterSize, secondSubClusterSize);
Brains brains = getBrains(instances, firstSubClusterSize, secondSubClusterSize);
if (onSplit != null) {
onSplit.accept(brains.firstSubCluster, brains.secondSubCluster);
}
healSplitBrain(instances, firstSubClusterSize);
if (afterMerge != null) {
afterMerge.accept(instances);
}
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class ManagedContextTest method setup.
@Before
public void setup() {
JetConfig jetConfig = new JetConfig();
jetConfig.getHazelcastConfig().setManagedContext(new MockManagedContext());
jet = this.createJetMember(jetConfig);
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class BackpressureTest method setUp.
@Before
public void setUp() {
JetConfig config = new JetConfig();
config.getInstanceConfig().setCooperativeThreadCount(PARALLELISM_PER_MEMBER);
jet1 = createJetMember(config);
jet2 = createJetMember(config);
}
use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.
the class WordCountTest method before.
@Before
public void before() {
JetConfig config = new JetConfig();
config.getInstanceConfig().setCooperativeThreadCount(PARALLELISM);
Config hazelcastConfig = config.getHazelcastConfig();
hazelcastConfig.getGroupConfig().setName(randomName());
final JoinConfig join = hazelcastConfig.getNetworkConfig().getJoin();
join.getMulticastConfig().setEnabled(false);
join.getTcpIpConfig().setEnabled(true).addMember("127.0.0.1");
for (int i = 1; i < NODE_COUNT; i++) {
instance = Jet.newJetInstance(config);
}
logger = instance.getHazelcastInstance().getLoggingService().getLogger(WordCountTest.class);
generateMockInput();
}
Aggregations