Search in sources :

Example 1 with EncryptionConfiguration

use of org.apache.ignite.configuration.EncryptionConfiguration in project ignite by apache.

the class CacheGroupReencryptionTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(name);
    cfg.setConsistentId(name);
    cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_STOPPED);
    EncryptionConfiguration encCfg = new EncryptionConfiguration().setReencryptionBatchSize(pageScanBatchSize).setReencryptionRateLimit(pageScanRate);
    DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(1024 * 1024 * 1024L).setPersistenceEnabled(true)).setPageSize(4 * 1024).setWalSegmentSize(10 * 1024 * 1024).setWalSegments(4).setMaxWalArchiveSize(100 * 1024 * 1024L).setCheckpointFrequency(TimeUnit.SECONDS.toMillis(checkpointFreq)).setWalMode(LOG_ONLY).setFileIOFactory(new FailingFileIOFactory(new RandomAccessFileIOFactory(), failFileIO)).setEncryptionConfiguration(encCfg);
    cfg.setDataStorageConfiguration(memCfg);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) EncryptionConfiguration(org.apache.ignite.configuration.EncryptionConfiguration) RandomAccessFileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory)

Example 2 with EncryptionConfiguration

use of org.apache.ignite.configuration.EncryptionConfiguration in project ignite by apache.

the class GridCommandHandlerAbstractTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    if (atomicConfiguration != null)
        cfg.setAtomicConfiguration(atomicConfiguration);
    cfg.setCommunicationSpi(new TestRecordingCommunicationSpi());
    cfg.setConnectorConfiguration(new ConnectorConfiguration().setSslEnabled(sslEnabled()));
    if (sslEnabled())
        cfg.setSslContextFactory(GridTestUtils.sslFactory());
    DataStorageConfiguration dsCfg = new DataStorageConfiguration().setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(checkpointFreq).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(50L * 1024 * 1024).setPersistenceEnabled(persistent));
    if (dataRegionConfiguration != null)
        dsCfg.setDataRegionConfigurations(dataRegionConfiguration);
    cfg.setDataStorageConfiguration(dsCfg);
    cfg.setConsistentId(igniteInstanceName);
    cfg.setClientMode(igniteInstanceName.startsWith(CLIENT_NODE_NAME_PREFIX));
    cfg.setDaemon(igniteInstanceName.startsWith(DAEMON_NODE_NAME_PREFIX));
    // Extend if necessary.
    cfg.setIncludeEventTypes(EVT_CONSISTENCY_VIOLATION);
    if (encryptionEnabled) {
        KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
        encSpi.setKeyStorePath(KEYSTORE_PATH);
        encSpi.setKeyStorePassword(KEYSTORE_PASSWORD.toCharArray());
        cfg.setEncryptionSpi(encSpi);
        EncryptionConfiguration encCfg = new EncryptionConfiguration();
        encCfg.setReencryptionRateLimit(reencryptSpeed);
        encCfg.setReencryptionBatchSize(reencryptBatchSize);
        dsCfg.setEncryptionConfiguration(encCfg);
    }
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) TestRecordingCommunicationSpi(org.apache.ignite.internal.TestRecordingCommunicationSpi) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) EncryptionConfiguration(org.apache.ignite.configuration.EncryptionConfiguration) KeystoreEncryptionSpi(org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration)

Aggregations

DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)2 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)2 EncryptionConfiguration (org.apache.ignite.configuration.EncryptionConfiguration)2 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)1 TestRecordingCommunicationSpi (org.apache.ignite.internal.TestRecordingCommunicationSpi)1 RandomAccessFileIOFactory (org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory)1 KeystoreEncryptionSpi (org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi)1