You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "James Sullivan (JIRA)" <ji...@apache.org> on 2013/05/31 03:32:19 UTC

[jira] [Created] (NUTCH-1576) Need to keep hotStore.flush() exception catching

James Sullivan created NUTCH-1576:
-------------------------------------

             Summary: 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


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