hello guys:
I'm trying to test the new feature PersistentStore, and got below
questions:
1. streamer.addData() only support Nothing type input, how to make it
support Int,String and others? here is my code:
import java.util.List;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.Ignition;
import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
object singlenodepersist {
def main(args:Array[String]){
Ignition.setClientMode(true)
val config = "config/test.xml"
val ig = Ignition.start(config)
ig.active(true)
val cache = createCache$[Int, String]("organization")
val streamer = ig.dataStreamer("organization")
streamer.allowOverwrite(true)
for(i<- 1 to 10000){
streamer.addData(1, "1") //I got problem in this line :typemismatch;
found : Int(1) required: Nothing
}
}
}
I am using scala 2.10.6
2. In the path of IGNITE_HOME, I did no changes and tried to run
bin/ignite.shexamples/config/persistentstore/example-persistent-store.xml,
I got below exception:
classorg.apache.ignite.IgniteException: Failed to instantiate Spring XML
application context (make sure all classes used in Spring configuration are
present at CLASSPATH)
Caused by: java.lang.ClassNotFoundException:
org.apache.ignite.examples.model.Organization
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at
org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:284)
... 40 more
......
Failed to start grid: Failed to instantiate Spring XML application context
(make sure all classes used in Spring configuration are present at CLASSPATH)
[springUrl=file:/data/disk01/huzongxing/ignite/examples/config/persistentstore/example-persistent-store.xml]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.
It seems that I need to include the class
org.apache.ignite.examples.model.Organization into my classpath, in which
library it locates?
3.I want to set the persistentstore path to my SSD mount point, which
configuration I can apply?
Any ideas are appreciated!
San.Luo