Repository: accumulo Updated Branches: refs/heads/1.5.2-SNAPSHOT 1e16159cd -> 6dfcf8ff7 refs/heads/1.6.1-SNAPSHOT 66f312803 -> 05cf91849 refs/heads/master a7884bbea -> 47d593311
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.5.2-SNAPSHOT Commit: 6dfcf8ff730502abe74fa5d61126ccc2f4bb30f8 Parents: 1e16159 Author: Josh Elser <els...@apache.org> Authored: Wed Jun 4 16:38:27 2014 -0400 Committer: Josh Elser <els...@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.