bharathv commented on a change in pull request #1408: HBASE-24086 Disable 
output stream capability enforcement when running in standalone mode
URL: https://github.com/apache/hbase/pull/1408#discussion_r402059418
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
 ##########
 @@ -350,11 +349,19 @@ public static void setWALRootDir(final Configuration c, 
final Path root) {
   public static FileSystem getWALFileSystem(final Configuration c) throws 
IOException {
     Path p = getWALRootDir(c);
     FileSystem fs = p.getFileSystem(c);
-    // hadoop-core does fs caching, so need to propogate this if set
+    // hadoop-core does fs caching, so need to propagate this if set
     String enforceStreamCapability = c.get(UNSAFE_STREAM_CAPABILITY_ENFORCE);
     if (enforceStreamCapability != null) {
       fs.getConf().set(UNSAFE_STREAM_CAPABILITY_ENFORCE, 
enforceStreamCapability);
     }
+    if (!c.getBoolean(HConstants.CLUSTER_DISTRIBUTED, false)
 
 Review comment:
   Hmm.. I too think it should just be (fs instanceof LocalFS).. With this 
patch, try using the following combination (distributed cluster + localfs), it 
fails with the same error when it should work..
   
   ```
   <configuration>
       <property>
             <name>hbase.cluster.distributed</name>
             <value>true</value>
       </property>
   </configuration>
   ```
   
   Point being that, these two configuration params are disjoint. Meaning a 
distributed/non-distributed cluster should work with a local file system. 
Stream capability is a property of the FS in use, so just a check on FS should 
be good IMO.
   
   I poked around a little bit about RawFS in the hadoop code, didn't fully 
understand its use but it appears that FileSystem when parsing the config would 
pick LocalFileSystem when the scheme is file:///. So I think just doing it for 
LocalFileSystem should be ok.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to