Hi,
I'm guessing that this is a FAQ but I cannot find the answer.
Using Titan 1.0.0 with Hadoop 1 – recommended (signature) on redhat linux 5.5, jdk 1.8.0_45 64 bit, using the cassandra and elastic search distributions that come in the titan download.In order to cleanup data in development, I call the following in my factory class ( trivial modelled on GraphOfTheGodsFactory,java ):
TitanCleanup.clear( graph );
This throws:
==>standardtitangraph[cassandrathrift:[127.0.0.1]]
Exception in thread "main" java.lang.IllegalArgumentException: Graph needs to be shut down before it can be cleared.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.thinkaurelius.titan.core.util.TitanCleanup.clear(TitanCleanup.java:33)
at GrantGraphFactory.load(GrantGraphFactory.java:55)
at GrantGraphFactory.load(GrantGraphFactory.java:50)
at GrantGraphFactory$load.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.apache.tinkerpop.gremlin.console.Console.initializeShellWithScript(Console.groovy:290)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:141)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
It looks like the shutdown method from previous releases of titan on TitanGraph has been removed recently.
What is the current way to shutdown the graph prior to clearing it?
Thanks.