You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/06/05 06:43:13 UTC

[31/35] git commit: ACCUMULO-2858 Ensure that we only look for 'sync' when we couldn't load configured method

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/ACCUMULO-378
Commit: 6dfcf8ff730502abe74fa5d61126ccc2f4bb30f8
Parents: 1e16159
Author: Josh Elser <el...@apache.org>
Authored: Wed Jun 4 16:38:27 2014 -0400
Committer: Josh Elser <el...@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.