[ 
https://issues.apache.org/jira/browse/HBASE-19024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219728#comment-16219728
 ] 

Andrew Purtell commented on HBASE-19024:
----------------------------------------

Mostly lgtm, one minor nit:

{code}
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index a272fc8..c1a50bf 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1327,6 +1327,10 @@ public final class HConstants {
 
   public static final String NOT_IMPLEMENTED = "Not implemented";
 
+  public static final String USE_HSYNC_CONF_KEY = "hbase.wal.use.hsync";
+
+  public static final boolean DEFAULT_USE_HSYNC = false;
+
   private HConstants() {
     // Can't be instantiated with this ctor.
   }
{code}

Like maybe:
{code}
+  public static final String WAL_HSYNC_CONF_KEY = "hbase.wal.hsync";
+  public static final boolean DEFAULT_WAL_HSYNC = false;
{code}


> provide a configurable option to hsync WAL edits to the disk for better 
> durability
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-19024
>                 URL: https://issues.apache.org/jira/browse/HBASE-19024
>             Project: HBase
>          Issue Type: Improvement
>          Components: wal
>         Environment: 
>            Reporter: Vikas Vishwakarma
>            Assignee: Harshal Jain
>         Attachments: master.patch
>
>
> At present we do not have an option to hsync WAL edits to the disk for better 
> durability. In our local tests we see 10-15% latency impact of using hsync 
> instead of hflush which is not very high.  
> We should have a configurable option to hysnc WAL edits instead of just 
> sync/hflush which will call the corresponding API on the hadoop side. 
> Currently HBase handles both SYNC_WAL and FSYNC_WAL as the same calling 
> FSDataOutputStream sync/hflush on the hadoop side. This can be modified to 
> let FSYNC_WAL call hsync on the hadoop side instead of sync/hflush. We can 
> keep the default value to sync as the current behavior and hsync can be 
> enabled based on explicit configuration.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to