[
https://issues.apache.org/jira/browse/HBASE-19841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339476#comment-16339476
]
Josh Elser commented on HBASE-19841:
------------------------------------
{code}
diff --git
a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 9efec07915..bb98c407b4 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -394,7 +394,13 @@ public abstract class CommonFSUtils {
public static FileSystem getWALFileSystem(final Configuration c) throws
IOException {
Path p = getWALRootDir(c);
- return p.getFileSystem(c);
+ FileSystem fs = p.getFileSystem(c);
+ // Need to copy this to the new filesystem we are returning in case it is
localFS
+ String enforceStreamCapabilities =
c.get(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE);
+ if (enforceStreamCapabilities != null) {
+ fs.getConf().set(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE,
enforceStreamCapabilities);
+ }
+ return fs;
}
{code}
I'm surprised/confused by this. I would have thought that the FS's
configuration would have been the Configuration which you provided when
constructing it from the Path. I assume that must not be the case?
> Tests against hadoop3 fail with StreamLacksCapabilityException
> --------------------------------------------------------------
>
> Key: HBASE-19841
> URL: https://issues.apache.org/jira/browse/HBASE-19841
> Project: HBase
> Issue Type: Test
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Major
> Fix For: 2.0.0-beta-2
>
> Attachments: 19841.v0.txt, 19841.v1.txt, HBASE-19841.v2.patch,
> HBASE-19841.v3.patch, HBASE-19841.v4.patch, HBASE-19841.v5.patch
>
>
> The following can be observed running against hadoop3:
> {code}
> java.io.IOException: cannot get log writer
> at
> org.apache.hadoop.hbase.regionserver.TestCompactingMemStore.compactingSetUp(TestCompactingMemStore.java:107)
> at
> org.apache.hadoop.hbase.regionserver.TestCompactingMemStore.setUp(TestCompactingMemStore.java:89)
> Caused by:
> org.apache.hadoop.hbase.util.CommonFSUtils$StreamLacksCapabilityException:
> hflush and hsync
> at
> org.apache.hadoop.hbase.regionserver.TestCompactingMemStore.compactingSetUp(TestCompactingMemStore.java:107)
> at
> org.apache.hadoop.hbase.regionserver.TestCompactingMemStore.setUp(TestCompactingMemStore.java:89)
> {code}
> This was due to hbase-server/src/test/resources/hbase-site.xml not being
> picked up by Configuration object. Among the configs from this file, the
> value for "hbase.unsafe.stream.capability.enforce" relaxes check for presence
> of hflush and hsync. Without this config entry,
> StreamLacksCapabilityException is thrown.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)