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 8CFD6200C0A for ; Sat, 28 Jan 2017 08:02:35 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8B968160B51; Sat, 28 Jan 2017 07:02:35 +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 D4D79160B35 for ; Sat, 28 Jan 2017 08:02:34 +0100 (CET) Received: (qmail 5598 invoked by uid 500); 28 Jan 2017 07:02:29 -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 5576 invoked by uid 99); 28 Jan 2017 07:02:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jan 2017 07:02:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 93502184907 for ; Sat, 28 Jan 2017 07:02:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7CK5qc5fjjS4 for ; Sat, 28 Jan 2017 07:02:27 +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 7DDA95FB79 for ; Sat, 28 Jan 2017 07:02:26 +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 127FAE03A3 for ; Sat, 28 Jan 2017 07:02:25 +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 612562528D for ; Sat, 28 Jan 2017 07:02:24 +0000 (UTC) Date: Sat, 28 Jan 2017 07:02:24 +0000 (UTC) From: "Yu Li (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17538) HDFS.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: Sat, 28 Jan 2017 07:02:35 -0000 [ https://issues.apache.org/jira/browse/HBASE-17538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843947#comment-15843947 ] Yu Li commented on HBASE-17538: ------------------------------- And the findbugs issue in HadoopQA report for patch v3 is irrelative to the patch here and tracked by an addendum patch in HBASE-17526 > HDFS.setStoragePolicy() logs errors on local fs > ----------------------------------------------- > > Key: HBASE-17538 > URL: https://issues.apache.org/jira/browse/HBASE-17538 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Enis Soztutar > Assignee: stack > Fix For: 2.0.0 > > Attachments: 0002-HBASE-17538-HFS.setStoragePolicy-logs-errors-on-loca.patch, HBASE-17538.master.001.patch, HBASE-17538.master.002.patch, HBASE-17538.master.003.patch > > > 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)