accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] git commit: ACCUMULO-2858 Ensure that we only look for 'sync' when we couldn't load configured method
Date Wed, 04 Jun 2014 20:41:14 GMT
ACCUMULO-2858 Ensure that we only look for 'sync' when we couldn't load configured method


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6dfcf8ff
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6dfcf8ff
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6dfcf8ff

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 6dfcf8ff730502abe74fa5d61126ccc2f4bb30f8
Parents: 1e16159
Author: Josh Elser <elserj@apache.org>
Authored: Wed Jun 4 16:38:27 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Jun 4 16:38:27 2014 -0400

----------------------------------------------------------------------
 .../accumulo/server/tabletserver/log/DfsLogger.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/6dfcf8ff/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
b/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
index fb21ba5..1f72c71 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
@@ -253,17 +253,17 @@ public class DfsLogger {
 
       String syncMethod = conf.getConfiguration().get(Property.TSERV_WAL_SYNC_METHOD);
       try {
-        try {
-          // hsync: send data to datanodes and sync the data to disk
-          sync = logFile.getClass().getMethod(syncMethod);
-        } catch (NoSuchMethodException ex) {
-          log.warn("Could not find configured " + syncMethod + " method, trying to fall back
to old Hadoop sync method", ex);
+        // hsync: send data to datanodes and sync the data to disk
+        sync = logFile.getClass().getMethod(syncMethod);
+      } catch (Exception ex) {
+        log.warn("Could not find configured " + syncMethod + " method, trying to fall back
to old Hadoop sync method", ex);
 
+        try {
           // sync: send data to datanodes
           sync = logFile.getClass().getMethod("sync");
+        } catch (Exception e) {
+          throw new RuntimeException(e);
         }
-      } catch (Exception e) {
-        throw new RuntimeException(e);
       }
 
       // Initialize the crypto operations.


Mime
View raw message