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

ASF GitHub Bot commented on NUTCH-2791:
---------------------------------------

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:
[email protected]


> domainstats, protocolstats and crawlcomplete do not handle GCS URLs
> -------------------------------------------------------------------
>
>                 Key: NUTCH-2791
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2791
>             Project: Nutch
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.17
>            Reporter: Patrick Mézard
>            Priority: Trivial
>
> I am running Nutch in GCP Dataproc. The domainstats, protocolstats and 
> crawlcomplete commands do not resolve crawldb paths correctly from GCS URLs.
> Also:
>  * protocolstats has an off-by-one error when resolving the numReducers 
> argument
>  * crawlcomplete -inputDirs is inconsistent with other command: where 
> domainstats expect directories containing a "current" path, crawlcomplete 
> looks for directories containing a "crawldb/current" path.
> I will send a PR after creating the issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to