Skip to content
Permalink
Browse files
Ignite DB runner
  • Loading branch information
dpavlov committed Aug 3, 2017
1 parent 00de4e0 commit b10626353e1502cf2edfbc8f05d71c29db3c8b59
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
@@ -10,5 +10,7 @@ repositories {
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '22.0'

compile group: 'org.apache.ignite', name: 'ignite-core', version: '2.1.0'

testCompile group: 'junit', name: 'junit', version: '4.+'
}
@@ -0,0 +1,36 @@
package org.apache.ignite.ci;

import java.io.File;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.configuration.PersistentStoreConfiguration;

/**
* Created by dpavlov on 03.08.2017.
*/
public class IgnitePersistRunner {
public static void main(String[] args) {
final IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setIgniteHome(new File(".").getAbsolutePath());
cfg.setConsistentId("TcHelper");
PersistentStoreConfiguration psCfg = new PersistentStoreConfiguration();
cfg.setPersistentStoreConfiguration(psCfg);

try (Ignite ignite = Ignition.start(cfg)){
ignite.active(true);

IgniteCache<String, String> cache = ignite.getOrCreateCache("test");
Object test1 = cache.get("test");
System.out.println("prev value " + test1 + " Prev size " + cache.size());

cache.put("test", test1 + ".1");
for (int i = 0; i < 1000; i++) {
if (i % 100 == 0)
System.out.println("Total " + i + " keys saved");
cache.put("Key_" + i, "Value" + i);
}
}
}
}
@@ -0,0 +1,19 @@
package org.apache.ignite.ci;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.apache.ignite.ci.model.conf.BuildType;

/**
* Created by dpavlov on 03.08.2017
*/
public class IgnitePersistentTeamcity implements ITeamcity {

@Override public CompletableFuture<List<BuildType>> getProjectSuites(String projectId) {
return null;
}

@Override public void close() throws Exception {

}
}

0 comments on commit b106263

Please sign in to comment.