[ https://issues.apache.org/jira/browse/HBASE-12848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276111#comment-14276111 ]
Sean Busbey commented on HBASE-12848: ------------------------------------- {code} + /** Configuration name of HLog storage policy */ {code} Should be "WAL storage policy" and not HLog. {code} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java index 1fad93d..62ef364 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java @@ -82,6 +82,7 @@ import org.apache.hadoop.hbase.wal.WALKey; import org.apache.hadoop.hbase.wal.WALPrettyPrinter; import org.apache.hadoop.hbase.wal.WALProvider.Writer; import org.apache.hadoop.hbase.wal.WALSplitter; +import org.apache.hadoop.hdfs.DistributedFileSystem; {code} nit: this import is no longer needed in FSHLog. {code} + * @param fs the FileSystem + * @param conf the Configuration {code} nit: just leave out these javadocs since they aren't adding any info. {code} + String storagePolicy = conf.get(HConstants.WAL_STORAGE_POLICY, + HConstants.DEFAULT_WAL_STORAGE_POLICY).toUpperCase(); + if (!storagePolicy.equals(HConstants.DEFAULT_WAL_STORAGE_POLICY) && + fs instanceof DistributedFileSystem) { {code} Pull this part into FSHLog and make the FSUtils method just take a storage policy as a param. That will allow the method to be reused as-is for non-WAL paths. {code} + String storagePolicy = conf.get(HConstants.WAL_STORAGE_POLICY, + HConstants.DEFAULT_WAL_STORAGE_POLICY).toUpperCase(); {code} nit: should be indented 4 spaces for line continuation. {code} + m = dfsClass.getDeclaredMethod("setStoragePolicy", + new Class<?>[] { Path.class, String.class }); {code} nit: should be indented 4 spaces for line continuation. {code} + LOG.info("setting " + storagePolicy + " for " + path); {code} nit: use "set" instead of "setting" so it's clear the action succeeded at this point. > Utilize Flash storage for WAL > ----------------------------- > > Key: HBASE-12848 > URL: https://issues.apache.org/jira/browse/HBASE-12848 > Project: HBase > Issue Type: Improvement > Reporter: Ted Yu > Assignee: Ted Yu > Fix For: 2.0.0, 1.1.0 > > Attachments: 12848-v1.patch, 12848-v2.patch > > > One way to improve data ingestion rate is to make use of Flash storage. > HDFS is doing the heavy lifting - see HDFS-7228. > We assume an environment where: > 1. Some servers have a mix of flash, e.g. 2 flash drives and 4 traditional > drives. > 2. Some servers have all traditional storage. > 3. RegionServers are deployed on both profiles within one HBase cluster. > This JIRA allows WAL to be managed on flash in a mixed-profile environment. -- This message was sent by Atlassian JIRA (v6.3.4#6332)