You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Souri (JIRA)" <ji...@apache.org> on 2015/02/03 01:20:35 UTC
[jira] [Comment Edited] (ANY23-248) NTriplesWriter on hadoop :
issue with MIME type
[ https://issues.apache.org/jira/browse/ANY23-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14302097#comment-14302097 ]
Souri edited comment on ANY23-248 at 2/3/15 12:19 AM:
------------------------------------------------------
So, in the local mode the code was using SesameRDFaParser , but on hadoop it was not able to find this parser (still need to figure out why).
So, I modified the following line from RDFParserFactory.java
final RDFParser parser = Rio.createParser(RDFFormat.RDFA);; (line#120)
to
final RDFParser parser = new SesameRDFaParser();
And it started working on hadoop.
was (Author: jirabug):
So, in the local mode the code was using SesameRDFaParser , but on hadoop it was not able to find this parser (still need to figure out why).
So, I modified the following line from RDFParserFactory.java
final RDFParser parser = new SesameRDFaParser(); (line#120)
to
final RDFParser parser = new SesameRDFaParser();
And it started working on hadoop.
> NTriplesWriter on hadoop : issue with MIME type
> -----------------------------------------------
>
> Key: ANY23-248
> URL: https://issues.apache.org/jira/browse/ANY23-248
> Project: Apache Any23
> Issue Type: Bug
> Affects Versions: 1.1
> Environment: hadoop,linux
> Reporter: Souri
> Priority: Minor
> Fix For: 1.2
>
>
> I am trying to create n-triples from an html string. I am using the following code to do it:
> StringDocumentSource documentSource = new StringDocumentSource(html, null);
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> final NTriplesWriter tripleHandler = new NTriplesWriter(out);
> Any23 runner = new Any23();
>
> runner.extract(documentSource,tripleHandler);
> tripleHandler.close();
> String result = out.toString("us-ascii");
> return result;
> This is giving me the error :
> java.lang.NullPointerException
> at org.apache.any23.extractor.SingleDocumentExtraction.filterExtractorsByMIMEType(SingleDocumentExtraction.java:421)
> at org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:223)
> at org.apache.any23.Any23.extract(Any23.java:298)
> at org.apache.any23.Any23.extract(Any23.java:433)
> I am running this in hadoop. When I run locally with a single file it works, but doesn't work when run on hadoop.
> Can someone please tell me how to go about this issue?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)