Created
April 23, 2013 16:08
-
-
Save rkroll/5444957 to your computer and use it in GitHub Desktop.
Run a faunus job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final String file = "bin/titan-cassandra-input.properties"; | |
final Properties fileConfiguration = new Properties(); | |
final Properties commandLineConfiguration = new Properties(); | |
fileConfiguration.load(new FileInputStream(file)); | |
final Configuration conf = new Configuration(); | |
for (Map.Entry<Object, Object> entry : fileConfiguration.entrySet()) { | |
conf.set(entry.getKey().toString(), entry.getValue().toString()); | |
} | |
for (Map.Entry<Object, Object> entry : commandLineConfiguration.entrySet()) { | |
conf.set(entry.getKey().toString(), entry.getValue().toString()); | |
} | |
FaunusGraph g = new FaunusGraph(conf); | |
FaunusPipeline pipe = new FaunusPipeline(g); | |
pipe.V().has("idx_country_id", "us") | |
.out("country_has_state") | |
.out("state_has_city") | |
.out("city_has_address") | |
.count(); | |
FaunusCompiler compiler = pipe.getCompiler(); | |
compiler.completeSequence(); | |
compiler.run(new String[] {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment