Author: minoru
Date: Tue Jun 25 08:41:23 2013
New Revision: 1496381

URL: http://svn.apache.org/r1496381
Log: (empty)

Modified:
    
manifoldcf/branches/CONNECTORS-728/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java

Modified: 
manifoldcf/branches/CONNECTORS-728/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-728/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java?rev=1496381&r1=1496380&r2=1496381&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-728/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-728/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/hdfs/HDFSRepositoryConnector.java
 Tue Jun 25 08:41:23 2013
@@ -157,9 +157,14 @@ public class HDFSRepositoryConnector ext
   @Override
   public void disconnect() throws ManifoldCFException {
     if (session != null) {
-      session.close();
-      session = null;
-      lastSessionFetch = -1L;
+      try {
+        session.close();
+      } catch (IOException e) {
+       throw new ManifoldCFException(e);  
+      } finally {
+        session = null;
+        lastSessionFetch = -1L;
+      }
     }
   
     config.clear();
@@ -289,9 +294,14 @@ public class HDFSRepositoryConnector ext
     long currentTime = System.currentTimeMillis();
     if (currentTime >= lastSessionFetch + timeToRelease) {
       if (session != null) {
-        session.close();
-        session = null;
-        lastSessionFetch = -1L;
+        try {
+          session.close();
+        } catch (IOException e) {
+          throw new ManifoldCFException(e);  
+        } finally {
+          session = null;
+          lastSessionFetch = -1L;
+        }
       }
     }
   }
@@ -380,12 +390,6 @@ public class HDFSRepositoryConnector ext
         } catch (InterruptedException e) {
           t.interrupt();
           throw new ManifoldCFException("Interrupted: " + e.getMessage(), e, 
ManifoldCFException.INTERRUPTED);
-        } catch (java.net.SocketTimeoutException e) {
-          Logging.connectors.warn("HDFS: Socket timeout adding seed documents: 
" + e.getMessage(), e);
-          handleIOException(e);
-        } catch (IOException e) {
-          Logging.connectors.warn("HDFS: Error adding seed documents: " + 
e.getMessage(), e);
-          handleIOException(e);
         }
       }
       i++;


Reply via email to