Github user sujen1412 commented on a diff in the pull request:
https://github.com/apache/nutch/pull/59#discussion_r39821072
--- Diff: src/java/org/apache/nutch/crawl/CrawlDb.java ---
@@ -261,30 +262,68 @@ public int run(String[] args) throws Exception {
additionsAllowed = false;
}
- String crawldb = crawlId+"/crawldb";
- String segment_dir = crawlId+"/segments";
- File segmentsDir = new File(segment_dir);
- File[] segmentsList = segmentsDir.listFiles();
- Arrays.sort(segmentsList, new Comparator<File>(){
- @Override
- public int compare(File f1, File f2) {
- if(f1.lastModified()>f2.lastModified())
- return -1;
- else
- return 0;
- }
- });
+ Path crawlDb;
+ if(args.containsKey(Nutch.ARG_CRAWLDB)) {
+ Object crawldbPath = args.get(Nutch.ARG_CRAWLDB);
+ if(crawldbPath instanceof Path) {
+ crawlDb = (Path) crawldbPath;
--- End diff --
I am using eclipse and I did set the formatting, I don't know why this
happened. Will take care from now on.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---