[ 
https://issues.apache.org/jira/browse/NUTCH-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496741#comment-16496741
 ] 

Sebastian Nagel commented on NUTCH-2590:
----------------------------------------

The old mapred SequenceFileOutputFormat provides a method 
[getReaders(...)|https://hadoop.apache.org/docs/r2.7.4/api/org/apache/hadoop/mapred/SequenceFileOutputFormat.html#getReaders-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-],
 the new 
[o.a.h.mapreduce.lib.output.SequenceFileOutputFormat|https://hadoop.apache.org/docs/r2.7.4/api/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.html]
 does not. Using MapFileOutputFormat does not work as it requires a different 
output - not a single file but a directory containing "data" and "index".

> SegmentReader -get fails
> ------------------------
>
>                 Key: NUTCH-2590
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2590
>             Project: Nutch
>          Issue Type: Bug
>          Components: segment
>    Affects Versions: 1.15
>            Reporter: Sebastian Nagel
>            Priority: Major
>             Fix For: 1.15
>
>
> SegmentReader -get fails in local and (pseudo-)distributed mode:
> {noformat}
> % bin/nutch readseg -get crawl/segments/20180531124348/ 
> "https://nutch.apache.org/";
> SegmentReader: get 'https://nutch.apache.org/'
> Exception:
> java.io.FileNotFoundException: File 
> file:.../crawl/segments/20180531124348/crawl_generate/part-r-00000/data does 
> not exist
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:611)
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:824)
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:601)
>         at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:428)
>         at 
> org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1820)
>         at 
> org.apache.hadoop.io.MapFile$Reader.createDataFileReader(MapFile.java:456)
>         at org.apache.hadoop.io.MapFile$Reader.open(MapFile.java:429)
>         at org.apache.hadoop.io.MapFile$Reader.<init>(MapFile.java:399)
>         at org.apache.hadoop.io.MapFile$Reader.<init>(MapFile.java:408)
>         at 
> org.apache.hadoop.mapreduce.lib.output.MapFileOutputFormat.getReaders(MapFileOutputFormat.java:98)
>         at 
> org.apache.nutch.segment.SegmentReader.getSeqRecords(SegmentReader.java:443)
>         at 
> org.apache.nutch.segment.SegmentReader.access$200(SegmentReader.java:72)
>         at 
> org.apache.nutch.segment.SegmentReader$3.run(SegmentReader.java:341)
> Exception:
> java.io.FileNotFoundException: File 
> file:.../crawl/segments/20180531124348/crawl_parse/part-r-00000/data does not 
> exist
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:611)
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:824)
>         at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:601)
>         at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:428)
>         at 
> org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1820)
>         at 
> org.apache.hadoop.io.MapFile$Reader.createDataFileReader(MapFile.java:456)
>         at org.apache.hadoop.io.MapFile$Reader.open(MapFile.java:429)
>         at org.apache.hadoop.io.MapFile$Reader.<init>(MapFile.java:399)
>         at org.apache.hadoop.io.MapFile$Reader.<init>(MapFile.java:408)
>         at 
> org.apache.hadoop.mapreduce.lib.output.MapFileOutputFormat.getReaders(MapFileOutputFormat.java:98)
>         at 
> org.apache.nutch.segment.SegmentReader.getSeqRecords(SegmentReader.java:443)
>         at 
> org.apache.nutch.segment.SegmentReader.access$200(SegmentReader.java:72)
>         at 
> org.apache.nutch.segment.SegmentReader$4.run(SegmentReader.java:353)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to