nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Nioche (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-1883) bin/crawl: use function to run bin/nutch and check exit value
Date Mon, 10 Nov 2014 10:10:34 GMT

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

Julien Nioche commented on NUTCH-1883:
--------------------------------------

Looks good, thanks Seb

> bin/crawl: use function to run bin/nutch and check exit value
> -------------------------------------------------------------
>
>                 Key: NUTCH-1883
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1883
>             Project: Nutch
>          Issue Type: Improvement
>    Affects Versions: 1.9, 2.2.1
>            Reporter: Sebastian Nagel
>            Assignee: Sebastian Nagel
>            Priority: Minor
>             Fix For: 2.3, 1.10
>
>         Attachments: NUTCH-1883-2x-v1.patch, NUTCH-1883-trunk-v1.patch, NUTCH-1883-trunk-v2.patch,
NUTCH-1883-trunk-v2.patch
>
>
> In bin/crawl for every Nutch command the exit value is checked explicitly:
> {code}
> "$bin/nutch" ...
> RETCODE=$?
> if [ $RETCODE -ne 0 ] 
> then exit $RETCODE 
> fi
> {code}
> This could be simplified by calling bin/nutch from one function which does the check.
The function could also echo the command, show an error message, etc. The main advantage is
short and clear code. In case a special treatment of exit values is required (cf. NUTCH-1829)
we still could call bin/nutch directly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message