You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yu Li (JIRA)" <ji...@apache.org> on 2017/01/17 05:46:26 UTC

[jira] [Commented] (HBASE-17474) Reduce frequency of NoSuchMethodException when calling setStoragePolicy()

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

Yu Li commented on HBASE-17474:
-------------------------------

Maybe simply add an if clause to exempt LocalFileSystem could fix this, like below:
{code}
      if (!(this.fs instanceof LocalFileSystem)) {
        LOG.warn("Failed to set storage policy of [" + storeDir + "] to [" + policyName + "]", e);
      }
{code}

Sounds good [~tedyu]? If so, will make a straight-forward patch. Thanks.

> Reduce frequency of NoSuchMethodException when calling setStoragePolicy()
> -------------------------------------------------------------------------
>
>                 Key: HBASE-17474
>                 URL: https://issues.apache.org/jira/browse/HBASE-17474
>             Project: HBase
>          Issue Type: Test
>            Reporter: Ted Yu
>            Priority: Minor
>
> Saw the following in test output:
> {code}
> 2017-01-15 09:37:53,383 WARN  [StoreOpener-98f4c892b5bcd9188f06331426e710f9-1] regionserver.HRegionFileSystem(199): Failed to set storage policy of [/Users/tyu/trunk/hbase-      server/target/test-data/e052b6ad-02e2-41bf-a806-d617900a8c22/TestStoreFileRefresherChore/data/default/testIsStale/98f4c892b5bcd9188f06331426e710f9/cf] to [HOT]
> java.lang.UnsupportedOperationException: Cannot find specified method setStoragePolicy
>   at org.apache.hadoop.hbase.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:209)
>   at org.apache.hadoop.hbase.regionserver.HRegionFileSystem.setStoragePolicy(HRegionFileSystem.java:197)
>   at org.apache.hadoop.hbase.regionserver.HStore.<init>(HStore.java:244)
>   at org.apache.hadoop.hbase.regionserver.HRegion.instantiateHStore(HRegion.java:5254)
>   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)
>   ... 11 more
> {code}
> setStoragePolicy() is not implemented by LocalFileSystem.
> We should reduce the frequency of the above log since it clutters test output.



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