hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17538) HFS.setStoragePolicy() logs errors on local fs
Date Wed, 25 Jan 2017 20:49:26 GMT

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

Ted Yu commented on HBASE-17538:
--------------------------------

Looks like HBASE-17474 didn't fully solve the unnecessary logs.

Checking HDFS should be fine in reducing such logs in pseudo-cluster.

> HFS.setStoragePolicy() logs errors on local fs
> ----------------------------------------------
>
>                 Key: HBASE-17538
>                 URL: https://issues.apache.org/jira/browse/HBASE-17538
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Enis Soztutar
>
> On a master pseudo-cluster running on local disk, the log contains a lot of these: 
> {code}
> 2017-01-25 12:30:41,542 WARN  [StoreOpener-32976c3c9b7c28ad632c041da486bfc3-1] fs.HFileSystem:
Failed to set storage policy of [file:/var/folders/h5/bbxg50c12r5bhsd9hf1n9hlr0000gp/T/hbase-enis/hbase/dat
> java.lang.UnsupportedOperationException: Cannot find specified method setStoragePolicy
>   at org.apache.hadoop.hbase.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:209)
>   at org.apache.hadoop.hbase.fs.HFileSystem.setStoragePolicy(HFileSystem.java:161)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:497)
>   at org.apache.hadoop.hbase.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:207)
>   at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.setStoragePolicy(HRegionFileSystem.java:198)
>   at org.apache.hadoop.hbase.regionserver.HStore.<init>(HStore.java:237)
>   at org.apache.hadoop.hbase.regionserver.HRegion.instantiateHStore(HRegion.java:5265)
>   at org.apache.hadoop.hbase.regionserver.HRegion$1.call(HRegion.java:988)
>   at org.apache.hadoop.hbase.regionserver.HRegion$1.call(HRegion.java:985)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.fs.LocalFileSystem.setStoragePolicy(org.apache.hadoop.fs.Path,
java.lang.String)
>   at java.lang.Class.getMethod(Class.java:1786)
>   at org.apache.hadoop.hbase.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:205)
>   ... 17 more
> {code}
> These are coming from HFS.setStoragePolicy() or HRegionFS.setStoragePolicy() . 
> This check: 
> {code}
> try {
>       ReflectionUtils.invokeMethod(this.fs, "setStoragePolicy", storeDir, policyName);
>     } catch (Exception e) {
>       if (!(this.fs instanceof LocalFileSystem)) {
>         LOG.warn("Failed to set storage policy of [" + storeDir + "] to [" + policyName
+ "]", e);
>       }
>     }
> {code} 
> does not work, because fs is not a LocalFS, but an HFS. And HFS internally does not do
this check. seStoragePolicy() is very HDFS specific, the logic should instead check whether
the underlying fs is HDFS (as opposed to checking whether it is not local FS). There are file
systems that HBase supports other than local or HDFS. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message