Search in sources :

Example 61 with Config

use of org.neo4j.kernel.configuration.Config in project neo4j by neo4j.

the class RecordFormatSelectorTest method selectForStoreOrConfigWithOnlyStandardStoredFormat.

@Test
public void selectForStoreOrConfigWithOnlyStandardStoredFormat() throws IOException {
    PageCache pageCache = getPageCache();
    prepareNeoStoreFile(Standard.LATEST_STORE_VERSION, pageCache);
    Config config = Config.empty();
    assertSame(Standard.LATEST_RECORD_FORMATS, selectForStoreOrConfig(config, storeDir, fs, pageCache, LOG));
}
Also used : Config(org.neo4j.kernel.configuration.Config) RecordFormatSelector.selectForStoreOrConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStoreOrConfig) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Example 62 with Config

use of org.neo4j.kernel.configuration.Config in project neo4j by neo4j.

the class RecordFormatSelectorTest method selectForStoreOrConfigWithOnlyHighLimitStoredFormat.

@Test
public void selectForStoreOrConfigWithOnlyHighLimitStoredFormat() throws IOException {
    PageCache pageCache = getPageCache();
    prepareNeoStoreFile(HighLimit.STORE_VERSION, pageCache);
    Config config = Config.empty();
    assertSame(HighLimit.RECORD_FORMATS, selectForStoreOrConfig(config, storeDir, fs, pageCache, LOG));
}
Also used : Config(org.neo4j.kernel.configuration.Config) RecordFormatSelector.selectForStoreOrConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStoreOrConfig) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Example 63 with Config

use of org.neo4j.kernel.configuration.Config in project neo4j by neo4j.

the class RecordFormatSelectorTest method selectForStoreOrConfigWithOnlyHighLimitConfiguredFormat.

@Test
public void selectForStoreOrConfigWithOnlyHighLimitConfiguredFormat() throws IOException {
    PageCache pageCache = getPageCache();
    Config config = config(HighLimit.NAME);
    assertSame(HighLimit.RECORD_FORMATS, selectForStoreOrConfig(config, storeDir, fs, pageCache, LOG));
}
Also used : Config(org.neo4j.kernel.configuration.Config) RecordFormatSelector.selectForStoreOrConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStoreOrConfig) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Example 64 with Config

use of org.neo4j.kernel.configuration.Config in project neo4j by neo4j.

the class RecordFormatSelectorTest method selectForStoreOrConfigWithSameHighLimitConfiguredAndStoredFormat.

@Test
public void selectForStoreOrConfigWithSameHighLimitConfiguredAndStoredFormat() throws IOException {
    PageCache pageCache = getPageCache();
    prepareNeoStoreFile(HighLimit.STORE_VERSION, pageCache);
    Config config = config(HighLimit.NAME);
    assertSame(HighLimit.RECORD_FORMATS, selectForStoreOrConfig(config, storeDir, fs, pageCache, LOG));
}
Also used : Config(org.neo4j.kernel.configuration.Config) RecordFormatSelector.selectForStoreOrConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStoreOrConfig) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Example 65 with Config

use of org.neo4j.kernel.configuration.Config in project neo4j by neo4j.

the class RecordFormatSelectorTest method selectNewestFormatForExistingStoreWithLegacyFormat.

@Test
public void selectNewestFormatForExistingStoreWithLegacyFormat() throws IOException {
    PageCache pageCache = getPageCache();
    prepareNeoStoreFile(StandardV2_3.STORE_VERSION, pageCache);
    Config config = Config.empty();
    assertSame(defaultFormat(), selectNewestFormat(config, storeDir, fs, getPageCache(), LOG));
}
Also used : Config(org.neo4j.kernel.configuration.Config) RecordFormatSelector.selectForStoreOrConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStoreOrConfig) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.Test)

Aggregations

Config (org.neo4j.kernel.configuration.Config)264 Test (org.junit.Test)184 File (java.io.File)54 PageCache (org.neo4j.io.pagecache.PageCache)35 InstanceId (org.neo4j.cluster.InstanceId)26 MultiPaxosContext (org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.context.MultiPaxosContext)25 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)25 LogProvider (org.neo4j.logging.LogProvider)20 Executor (java.util.concurrent.Executor)19 ClusterConfiguration (org.neo4j.cluster.protocol.cluster.ClusterConfiguration)19 Timeouts (org.neo4j.cluster.timeout.Timeouts)19 HashMap (java.util.HashMap)18 URI (java.net.URI)17 ObjectInputStreamFactory (org.neo4j.cluster.protocol.atomicbroadcast.ObjectInputStreamFactory)17 ObjectOutputStreamFactory (org.neo4j.cluster.protocol.atomicbroadcast.ObjectOutputStreamFactory)17 AcceptorInstanceStore (org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.AcceptorInstanceStore)17 IOException (java.io.IOException)16 ListenSocketAddress (org.neo4j.helpers.ListenSocketAddress)15 BoltConnector (org.neo4j.kernel.configuration.BoltConnector)15 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)15