You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by GitBox <gi...@apache.org> on 2020/06/10 18:25:47 UTC

[GitHub] [nutch] sebastian-nagel commented on a change in pull request #533: NUTCH-2791 Handle GCS URLs in stats commands

sebastian-nagel commented on a change in pull request #533:
URL: https://github.com/apache/nutch/pull/533#discussion_r438319215



##########
File path: src/java/org/apache/nutch/util/CrawlCompletionStats.java
##########
@@ -153,9 +153,7 @@ public int run(String[] args) throws Exception {
 
     String[] inputDirsSpecs = inputDir.split(",");
     for (int i = 0; i < inputDirsSpecs.length; i++) {
-      File completeInputPath = new File(new File(inputDirsSpecs[i]), "crawldb/current");
-      FileInputFormat.addInputPath(job, new Path(completeInputPath.toString()));
-      
+      FileInputFormat.addInputPath(job, new Path(inputDirsSpecs[i], "current"));

Review comment:
       This would require to change the command-line help as well:
   ```
   $> bin/nutch crawlcomplete
   usage: CrawlCompletionStats [-h] -inputDirs <inputDirs> -mode <mode>
          [-numReducers <numReducers>] -outputDir <outputDir>
    -h,--help                    Show this message
    -inputDirs <inputDirs>       Comma separated list of crawl directories
                                 (e.g., "./crawl1,./crawl2")
    ...
   ```
   
   This changes the behavior of the completion stats. But I agree with the change, we cannot assume that the name of the crawldb is fix - although this is the name used by the script "bin/crawl".




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org