logger.debug("Snap " + algorithm + ": finished job: " + jobId);
}
private void createIndices(DendriteGraph graph, String algorithm) {
TitanTransaction tx = graph.newTransaction();
if (algorithm.equals("centrality")) {
if (tx.getType("snap_degree") == null) {
tx.makeKey("snap_degree")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_closeness") == null) {
tx.makeKey("snap_closeness")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_betweenness") == null) {
tx.makeKey("snap_betweenness")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_eigenvector") == null) {
tx.makeKey("snap_eigenvector")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_network_constraint") == null) {
tx.makeKey("snap_network_constraint")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_clustering_coefficient") == null) {
tx.makeKey("snap_clustering_coefficient")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_pagerank") == null) {
tx.makeKey("snap_pagerank")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_hub_score") == null) {
tx.makeKey("snap_hub_score")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
if (tx.getType("snap_authority_score") == null) {
tx.makeKey("snap_authority_score")
.dataType(FullDouble.class)
.indexed(DendriteGraph.INDEX_NAME, Vertex.class)
.make();
}
}
tx.commit();
}