[
https://issues.apache.org/jira/browse/NUTCH-2180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049695#comment-15049695
]
ASF GitHub Bot commented on NUTCH-2180:
---------------------------------------
Github user lewismc commented on a diff in the pull request:
https://github.com/apache/nutch/pull/85#discussion_r47173268
--- Diff: src/java/org/apache/nutch/tools/FileDumper.java ---
@@ -172,6 +172,11 @@ public boolean accept(File file) {
}
});
+ if (partDirs == null) {
+ LOG.warn("Skipping Corrupt Segment: [" + segment.getAbsolutePath()
+ "]");
--- End diff --
Note that this is not good syntax for slf4j. Line could be made much more
performant by using
```
LOG.warn("Skipping Corrupt Segment: [{}]", segment.getAbsolutePath());
```
I am +1 to merge this, I will make the change locally and commit.
> FileDumper dumps data, but breaks midway on corrupt segments
> ------------------------------------------------------------
>
> Key: NUTCH-2180
> URL: https://issues.apache.org/jira/browse/NUTCH-2180
> Project: Nutch
> Issue Type: Bug
> Components: bin, dumpers
> Affects Versions: 1.11
> Environment: Ubuntu 14.04.3 x64
> Reporter: Harshavardhan Manjunatha
> Assignee: Michael Joyce
> Fix For: 1.12
>
>
> FileDumper should ignore corrupt segments, and continue dumping data instead
> of throwing NullPointerException
> $ bin/nutch dump -segment ../../../segments/ -outputDir ./firstDump/ -flatdir
> java.lang.NullPointerException
> at org.apache.nutch.tools.FileDumper.dump(FileDumper.java:175)
> at org.apache.nutch.tools.FileDumper.main(FileDumper.java:417)
> $
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)