You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2013/05/31 21:15:20 UTC
[jira] [Commented] (NUTCH-1576) Need to keep hotStore.flush()
exception catching
[ https://issues.apache.org/jira/browse/NUTCH-1576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13671748#comment-13671748 ]
Lewis John McGibbney commented on NUTCH-1576:
---------------------------------------------
Hi James, thanks for pointing this out.
I applied your patch, it applies with some fuzz, then I compile and I get
{code}
[javac] Compiling 1 source file to /home/lewismc/ASF/2.x/build/classes
[javac] /home/lewismc/ASF/2.x/src/java/org/apache/nutch/host/HostDb.java:92: exception java.io.IOException is never thrown in body of corresponding try statement
[javac] } catch (IOException e) {
[javac] ^
[javac] 1 error
BUILD FAILED
/home/lewismc/ASF/2.x/build.xml:101: Compile failed; see the compiler error output for details.
{code}
> Need to keep hotStore.flush() exception catching
> ------------------------------------------------
>
> Key: NUTCH-1576
> URL: https://issues.apache.org/jira/browse/NUTCH-1576
> Project: Nutch
> Issue Type: Bug
> Affects Versions: 2.2
> Reporter: James Sullivan
> Priority: Minor
> Attachments: patch.txt
>
>
> Still need exception checking for hoststorelflush() for those who have to use gora-core 0.2.1 otherwise Nutch 2.x will not compile.
> <!-- Uncomment this to use SQL as Gora backend. It should be noted that the
> gora-sql 0.1.1-incubating artifact is NOT compatable with gora-core 0.3. Users should
> downgrade to gora-core 0.2.1 in order to use SQL as a backend. -->
> Index: src/java/org/apache/nutch/host/HostDb.java
> ===================================================================
> --- java/workspace/2.x/src/java/org/apache/nutch/host/HostDb.java (revision 1487824)
> +++ java/workspace/2.x/src/java/org/apache/nutch/host/HostDb.java (working copy)
> @@ -87,7 +87,11 @@
> CacheHost removeFromCacheHost = notification.getValue();
> if (removeFromCacheHost != NULL_HOST) {
> if (removeFromCacheHost.timestamp < lastFlush.get()) {
> - hostStore.flush();
> + try {
> + hostStore.flush();
> + } catch (IOException e) {
> + throw new RuntimeException(e);
> + }
> lastFlush.set(System.currentTimeMillis());
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira