use of org.apache.giraph.conf.GiraphConfiguration in project incubator-rya by apache.
the class TestVertexFormat method testRyaInput.
/*
Write a simple parent-child directed graph to Cloudbase.
Run a job which reads the values
into subclasses that extend CloudbaseVertex I/O formats.
Check the output after the job.
*/
@Test
public void testRyaInput() throws Exception {
AccumuloRdfConfiguration conf = getConf();
AccumuloRyaDAO ryaDAO = RyaSailFactory.getAccumuloDAO(conf);
ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"), new RyaURI("urn:test#pred1"), new RyaURI("urn:test#obj1")));
ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"), new RyaURI("urn:test#pred2"), new RyaURI("urn:test#obj2")));
ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"), new RyaURI("urn:test#pred3"), new RyaURI("urn:test#obj3")));
ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"), new RyaURI("urn:test#pred4"), new RyaURI("urn:test#obj4")));
ryaDAO.flush();
GiraphJob job = new GiraphJob(conf, getCallingMethodName());
setupConfiguration(job);
GiraphConfiguration giraphConf = job.getConfiguration();
giraphConf.setComputationClass(EdgeNotification.class);
giraphConf.setVertexInputFormatClass(RyaVertexInputFormat.class);
giraphConf.setVertexOutputFormatClass(TestTextOutputFormat.class);
if (log.isInfoEnabled())
log.info("Running edge notification job using Rya Vertex input");
}
Aggregations