use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class IgnitePdsTransactionsHangTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
BinaryConfiguration binaryCfg = new BinaryConfiguration();
binaryCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binaryCfg);
cfg.setPeerClassLoadingEnabled(true);
TcpCommunicationSpi tcpCommSpi = new TcpCommunicationSpi();
tcpCommSpi.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(tcpCommSpi);
TransactionConfiguration txCfg = new TransactionConfiguration();
txCfg.setDefaultTxIsolation(TransactionIsolation.READ_COMMITTED);
cfg.setTransactionConfiguration(txCfg);
DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
memPlcCfg.setName("dfltDataRegion");
memPlcCfg.setInitialSize(PAGE_CACHE_SIZE * 1024 * 1024);
memPlcCfg.setMaxSize(PAGE_CACHE_SIZE * 1024 * 1024);
memPlcCfg.setPersistenceEnabled(true);
DataStorageConfiguration memCfg = new DataStorageConfiguration();
memCfg.setDefaultDataRegionConfiguration(memPlcCfg);
memCfg.setWalHistorySize(1);
memCfg.setCheckpointFrequency(CHECKPOINT_FREQUENCY);
memCfg.setPageSize(PAGE_SIZE * 1024);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class IgniteMassLoadSandboxTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<Integer, HugeIndexedObject> ccfg = new CacheConfiguration<>();
ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 1024));
ccfg.setIndexedTypes(Integer.class, HugeIndexedObject.class);
ccfg.setName(CACHE_NAME);
cfg.setCacheConfiguration(ccfg);
DataRegionConfiguration regCfg = new DataRegionConfiguration().setName("dfltMemPlc").setMetricsEnabled(true).setMaxSize(2 * 1024L * 1024 * 1024).setPersistenceEnabled(true);
DataStorageConfiguration dsCfg = new DataStorageConfiguration();
dsCfg.setDefaultDataRegionConfiguration(regCfg).setPageSize(4 * 1024).setWriteThrottlingEnabled(true).setCheckpointFrequency(checkpointFrequency);
final String workDir = U.defaultWorkDirectory();
final File db = U.resolveWorkDirectory(workDir, DFLT_STORE_DIR, false);
final File wal = new File(db, "wal");
if (setWalArchAndWorkToSameVal) {
final String walAbsPath = wal.getAbsolutePath();
dsCfg.setWalPath(walAbsPath);
dsCfg.setWalArchivePath(walAbsPath);
} else {
dsCfg.setWalPath(wal.getAbsolutePath());
dsCfg.setWalArchivePath(new File(wal, "archive").getAbsolutePath());
}
dsCfg.setWalMode(customWalMode != null ? customWalMode : WALMode.LOG_ONLY).setWalHistorySize(1).setWalSegments(10);
if (walSegmentSize != 0)
dsCfg.setWalSegmentSize(walSegmentSize);
cfg.setDataStorageConfiguration(dsCfg);
cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false));
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class WalRecoveryTxLogicalRecordsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<Integer, IndexedValue> ccfg = new CacheConfiguration<>(CACHE_NAME);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
ccfg.setAffinity(new RendezvousAffinityFunction(false, PARTS));
ccfg.setIndexedTypes(Integer.class, IndexedValue.class);
if (extraCcfg != null)
cfg.setCacheConfiguration(ccfg, new CacheConfiguration<>(extraCcfg));
else
cfg.setCacheConfiguration(ccfg);
DataStorageConfiguration dbCfg = new DataStorageConfiguration();
dbCfg.setPageSize(pageSize);
dbCfg.setWalHistorySize(WAL_HIST_SIZE);
dbCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true));
if (checkpointFreq != null)
dbCfg.setCheckpointFrequency(checkpointFreq);
cfg.setDataStorageConfiguration(dbCfg);
cfg.setMarshaller(null);
BinaryConfiguration binCfg = new BinaryConfiguration();
binCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binCfg);
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class TcpClientDiscoveryMarshallerCheckSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (testFooter) {
cfg.setMarshaller(new BinaryMarshaller());
TcpDiscoverySpi spi = new TcpDiscoverySpi();
// IGNITE-605, and further tests limitation bypass
spi.setJoinTimeout(-1);
cfg.setDiscoverySpi(spi);
if (igniteInstanceName.endsWith("0")) {
BinaryConfiguration bc = new BinaryConfiguration();
bc.setCompactFooter(false);
cfg.setBinaryConfiguration(bc);
cfg.setClientMode(true);
}
} else {
if (igniteInstanceName.endsWith("0"))
cfg.setMarshaller(new JdkMarshaller());
else {
cfg.setClientMode(true);
cfg.setMarshaller(new BinaryMarshaller());
}
TcpDiscoverySpi spi = new TcpDiscoverySpi().setIpFinder(ipFinder);
cfg.setDiscoverySpi(spi);
}
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class DummyPersistenceCompatibilityTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setPeerClassLoadingEnabled(false);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(compactFooter));
return cfg;
}
Aggregations