Search in sources :

Example 31 with JetConfig

use of com.hazelcast.jet.config.JetConfig in project hazelcast by hazelcast.

the class ConfigXmlGeneratorTest method testJetConfig.

@Test
public void testJetConfig() {
    Config config = new Config();
    JetConfig jetConfig = config.getJetConfig();
    jetConfig.setEnabled(false).setResourceUploadEnabled(true);
    jetConfig.setLosslessRestartEnabled(true).setScaleUpDelayMillis(123).setBackupCount(2).setFlowControlPeriodMs(123).setCooperativeThreadCount(123);
    jetConfig.getDefaultEdgeConfig().setReceiveWindowMultiplier(123).setPacketSizeLimit(123).setQueueSize(123);
    Config newConfig = getNewConfigViaXMLGenerator(config);
    assertEquals(jetConfig, newConfig.getJetConfig());
}
Also used : TlsAuthenticationConfig(com.hazelcast.config.security.TlsAuthenticationConfig) TokenIdentityConfig(com.hazelcast.config.security.TokenIdentityConfig) LdapAuthenticationConfig(com.hazelcast.config.security.LdapAuthenticationConfig) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) SimpleAuthenticationConfig(com.hazelcast.config.security.SimpleAuthenticationConfig) KerberosIdentityConfig(com.hazelcast.config.security.KerberosIdentityConfig) KerberosAuthenticationConfig(com.hazelcast.config.security.KerberosAuthenticationConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) JaasAuthenticationConfig(com.hazelcast.config.security.JaasAuthenticationConfig) JetConfig(com.hazelcast.jet.config.JetConfig) FencedLockConfig(com.hazelcast.config.cp.FencedLockConfig) JetConfig(com.hazelcast.jet.config.JetConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 32 with JetConfig

use of com.hazelcast.jet.config.JetConfig in project hazelcast by hazelcast.

the class PhoneHomeDifferentConfigTest method testJetDisabled.

@Test
public void testJetDisabled() {
    Config config = new Config().setJetConfig(new JetConfig().setEnabled(false));
    HazelcastInstance hazelcastInstance = createHazelcastInstance(config);
    Node node = getNode(hazelcastInstance);
    PhoneHome phoneHome = new PhoneHome(node);
    Map<String, String> parameters = phoneHome.phoneHome(true);
    assertEquals("false", parameters.get(PhoneHomeMetrics.JET_ENABLED.getRequestParameterName()));
    assertEquals("false", parameters.get(PhoneHomeMetrics.JET_RESOURCE_UPLOAD_ENABLED.getRequestParameterName()));
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) MapConfig(com.hazelcast.config.MapConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) Config(com.hazelcast.config.Config) JetConfig(com.hazelcast.jet.config.JetConfig) NativeMemoryConfig(com.hazelcast.config.NativeMemoryConfig) Accessors.getNode(com.hazelcast.test.Accessors.getNode) Node(com.hazelcast.instance.impl.Node) JetConfig(com.hazelcast.jet.config.JetConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 33 with JetConfig

use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.

the class XmlJetConfigBuilder method getConfig.

public static JetConfig getConfig(Properties properties) {
    InputStream in = getJetConfigStream(properties);
    JetConfig cfg = new XmlJetConfigBuilder(properties, in).jetConfig;
    cfg.setHazelcastConfig(getMemberConfig(properties));
    return cfg;
}
Also used : InputStream(java.io.InputStream) JetConfig(com.hazelcast.jet.config.JetConfig)

Example 34 with JetConfig

use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.

the class TestInClusterSupport method setupCluster.

@BeforeClass
public static void setupCluster() {
    int parallelism = Runtime.getRuntime().availableProcessors() / MEMBER_COUNT / 2;
    JetConfig config = new JetConfig();
    config.getInstanceConfig().setCooperativeThreadCount(parallelism <= 2 ? 2 : parallelism);
    Config hzConfig = config.getHazelcastConfig();
    hzConfig.addCacheConfig(new CacheSimpleConfig().setName("*"));
    hzConfig.getMapEventJournalConfig(JOURNALED_MAP_PREFIX + '*').setEnabled(true);
    hzConfig.getCacheEventJournalConfig(JOURNALED_CACHE_PREFIX + '*').setEnabled(true);
    member = createCluster(MEMBER_COUNT, config);
    client = factory.newClient();
}
Also used : CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) Config(com.hazelcast.config.Config) JetConfig(com.hazelcast.jet.config.JetConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) JetConfig(com.hazelcast.jet.config.JetConfig) BeforeClass(org.junit.BeforeClass)

Example 35 with JetConfig

use of com.hazelcast.jet.config.JetConfig in project hazelcast-jet by hazelcast.

the class WindowAggregateTransform_IntegrationTest method before.

@Before
public void before() {
    JetConfig config = new JetConfig();
    config.getHazelcastConfig().addEventJournalConfig(new EventJournalConfig().setMapName("source*").setEnabled(true));
    config.getHazelcastConfig().setProperty(GroupProperty.PARTITION_COUNT.getName(), "1");
    instance = createJetMember(config);
}
Also used : JetConfig(com.hazelcast.jet.config.JetConfig) EventJournalConfig(com.hazelcast.config.EventJournalConfig) Before(org.junit.Before)

Aggregations

JetConfig (com.hazelcast.jet.config.JetConfig)56 Before (org.junit.Before)21 Test (org.junit.Test)15 JetInstance (com.hazelcast.jet.JetInstance)14 Config (com.hazelcast.config.Config)10 Properties (java.util.Properties)9 EventJournalConfig (com.hazelcast.config.EventJournalConfig)8 CountDownLatch (java.util.concurrent.CountDownLatch)7 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)4 EdgeConfig (com.hazelcast.jet.config.EdgeConfig)4 ClientConfig (com.hazelcast.client.config.ClientConfig)3 MapConfig (com.hazelcast.config.MapConfig)3 JobConfig (com.hazelcast.jet.config.JobConfig)3 MockPS (com.hazelcast.jet.core.TestProcessors.MockPS)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 InputStream (java.io.InputStream)3 JoinConfig (com.hazelcast.config.JoinConfig)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 JetTestInstanceFactory (com.hazelcast.jet.JetTestInstanceFactory)2 Job (com.hazelcast.jet.Job)2