Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AF2D9200C09 for ; Wed, 25 Jan 2017 21:42:39 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ADD0F160B4E; Wed, 25 Jan 2017 20:42:39 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 028D5160B3D for ; Wed, 25 Jan 2017 21:42:38 +0100 (CET) Received: (qmail 20315 invoked by uid 500); 25 Jan 2017 20:42:38 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 20304 invoked by uid 99); 25 Jan 2017 20:42:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2017 20:42:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B0A7CC16AA for ; Wed, 25 Jan 2017 20:42:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WPFQOZFVTqiz for ; Wed, 25 Jan 2017 20:42:35 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 99DAB5F2F1 for ; Wed, 25 Jan 2017 20:42:34 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 1E169E0410 for ; Wed, 25 Jan 2017 20:42:27 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 79B0A2528D for ; Wed, 25 Jan 2017 20:42:26 +0000 (UTC) Date: Wed, 25 Jan 2017 20:42:26 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17538) HFS.setStoragePolicy() logs errors on local fs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 25 Jan 2017 20:42:39 -0000 [ https://issues.apache.org/jira/browse/HBASE-17538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15838536#comment-15838536 ] Enis Soztutar commented on HBASE-17538: --------------------------------------- [~tedyu] any idea? > 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.(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)