use of com.thinkaurelius.titan.core.TitanVertex in project titan by thinkaurelius.
the class CassandraScanJobIT method testPartitionedVertexScan.
@Test
public void testPartitionedVertexScan() throws Exception {
tearDown();
clearGraph(getConfiguration());
WriteConfiguration partConf = getConfiguration();
open(partConf);
mgmt.makeVertexLabel("part").partition().make();
finishSchema();
TitanVertex supernode = graph.addVertex("part");
for (int i = 0; i < 128; i++) {
TitanVertex v = graph.addVertex("part");
v.addEdge("default", supernode);
if (0 < i && 0 == i % 4)
graph.tx().commit();
}
graph.tx().commit();
org.apache.hadoop.conf.Configuration c = new org.apache.hadoop.conf.Configuration();
c.set(ConfigElement.getPath(TitanHadoopConfiguration.GRAPH_CONFIG_KEYS, true) + "." + "storage.cassandra.keyspace", getClass().getSimpleName());
c.set(ConfigElement.getPath(TitanHadoopConfiguration.GRAPH_CONFIG_KEYS, true) + "." + "storage.backend", "cassandrathrift");
c.set("cassandra.input.partitioner.class", "org.apache.cassandra.dht.Murmur3Partitioner");
Job job = getVertexJobWithDefaultMapper(c);
// Should throw an exception since filter-partitioned-vertices wasn't enabled
assertFalse(job.waitForCompletion(true));
}
use of com.thinkaurelius.titan.core.TitanVertex in project incubator-atlas by apache.
the class Titan0Vertex method getPropertyValues.
@Override
public <T> Collection<T> getPropertyValues(String key, Class<T> clazz) {
TitanVertex tv = getAsTitanVertex();
Collection<T> result = new ArrayList<>();
for (TitanProperty property : tv.getProperties(key)) {
result.add((T) property.getValue());
}
return result;
}
Aggregations