@Test public void testStatementInput() throws Exception { RdfFileInputFormat.setRDFFormat(job, RDFFormat.NTRIPLES); init(NT_INPUT); String prefix = "urn:lubm:rdfts#"; IRI[] gs = { VF.createIRI(prefix + "GraduateStudent01"), VF.createIRI(prefix + "GraduateStudent02"), VF.createIRI(prefix + "GraduateStudent03"), VF.createIRI(prefix + "GraduateStudent04") }; IRI hasFriend = VF.createIRI(prefix + "hasFriend"); Statement[] statements = { VF.createStatement(gs[0], hasFriend, gs[1]), VF.createStatement(gs[1], hasFriend, gs[2]), VF.createStatement(gs[2], hasFriend, gs[3]) }; int count = 0; while (reader.nextKeyValue()) { Assert.assertEquals(statements[count], RyaToRdfConversions.convertStatement(reader.getCurrentValue().getRyaStatement())); count++; Assert.assertEquals(count, reader.getCurrentKey().get()); } Assert.assertEquals(3, count); }
public static void setRDFFormat(Job job, RDFFormat format) { job.getConfiguration().set(FORMAT_PROP, format.getName()); }
RdfFileInputFormat extends FileInputFormat<LongWritable, RyaStatementWritable> { public static void setRDFFormat(Job job, RDFFormat format) { job.getConfiguration().set(FORMAT_PROP, format.getName()); } }
RdfFileInputFormat extends FileInputFormat<LongWritable, RyaStatementWritable> { public static void setRDFFormat(Job job, RDFFormat format) { job.getConfiguration().set(FORMAT_PROP, format.getName()); }  }
RdfFileInputFormat extends FileInputFormat<LongWritable, RyaStatementWritable> { public static void setRDFFormat(Job job, RDFFormat format) { job.getConfiguration().set(FORMAT_PROP, format.getName()); }  static void setRDFFormat(Job job, RDFFormat format); static void setCharBufferSize(Job job, int size); static void setStatementBufferSize(Job job, int size); static void setTimeout(Job job, int seconds); @Override RecordReader<LongWritable, RyaStatementWritable> createRecordReader(InputSplit inputSplit,
            TaskAttemptContext taskAttemptContext); }
RdfFileInputFormat extends FileInputFormat<LongWritable, RyaStatementWritable> { public static void setRDFFormat(Job job, RDFFormat format) { job.getConfiguration().set(FORMAT_PROP, format.getName()); }  static void setRDFFormat(Job job, RDFFormat format); static void setCharBufferSize(Job job, int size); static void setStatementBufferSize(Job job, int size); static void setTimeout(Job job, int seconds); @Override RecordReader<LongWritable, RyaStatementWritable> createRecordReader(InputSplit inputSplit,
            TaskAttemptContext taskAttemptContext);  }