From issues-return-343791-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Fri Apr 13 18:54:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EC5F1180718 for ; Fri, 13 Apr 2018 18:54:04 +0200 (CEST) Received: (qmail 1712 invoked by uid 500); 13 Apr 2018 16:54:03 -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 1700 invoked by uid 99); 13 Apr 2018 16:54:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2018 16:54:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 76E51C00A6 for ; Fri, 13 Apr 2018 16:54:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id g6X5daiW63we for ; Fri, 13 Apr 2018 16:54:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 923EF5FBC5 for ; Fri, 13 Apr 2018 16:54:01 +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 C6428E0C25 for ; Fri, 13 Apr 2018 16:54:00 +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 574BE241CC for ; Fri, 13 Apr 2018 16:54:00 +0000 (UTC) Date: Fri, 13 Apr 2018 16:54:00 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HBASE-20145) HMaster start fails with IllegalStateException when HADOOP_HOME is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-20145?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D164= 37475#comment-16437475 ]=20 Wei-Chiu Chuang edited comment on HBASE-20145 at 4/13/18 4:53 PM: ------------------------------------------------------------------ Thanks [~rohithsharma] now I understand why: Turns out that if you point env HADOOP_HOME to a Hadoop3 path with hbase2.0= convenience binary, the classpath will contain both Hadoop 2.7.4 and Hadoo= p 3 jar files. Effectively causing class conflicts. Since Hadoop 3 jars are available, HBase is able to query StreamCapabilitie= s of the output stream. However, because Hadoop 2.7.4 jars is loaded before= Hadoop 3 jars in classpath, it loaded the HdfsDataOutputStream class imple= mented in Hadoop 2.7.4, which does not inherit from StreamCapabilities. {code:java} if (StreamCapabilities.CLASS.isAssignableFrom(stream.getClass())) { try { result =3D ((Boolean)StreamCapabilities.METHOD.invoke(stream, cap= ability)).booleanValue(); } catch (IllegalAccessException|IllegalArgumentException|Invocation= TargetException exception) { LOG.warn("Your Hadoop installation's StreamCapabilities implement= ation doesn't match " + "our understanding of how it's supposed to work. Please file = a JIRA and include " + "the following stack trace. In the mean time we're interpreti= ng this behavior " + "difference as a lack of capability support, which will proba= bly cause a failure.", exception); } } {code} This is not a problem in the code itself. But the code can be improved to l= og a warning message when output stream class does not inherit from StreamC= apabilities. was (Author: jojochuang): Thanks [~rohithsharma] now I understand why: Turns out that if you point env HADOOP_HOME to a Hadoop3 path with hbase2.0= convenience binary, the classpath will contain both Hadoop 2.7.4 and Hadoo= p 3 jar files. Effectively causing class conflicts. Since Hadoop 3 jars are available, HBase is able to query StreamCapabilitie= s of the output stream. However, because Hadoop 2.7.4 jars is loaded before= Hadoop 3 jars in classpath, it loaded the HdfsDataOutputStream class imple= mented in Hadoop 2.7.4, which does not inherit from StreamCapabilities. {code:java} if (StreamCapabilities.CLASS.isAssignableFrom(stream.getClass())) { try { LOG.warn("stream type =3D " + stream.getWrappedStream().getClass(= ).getCanonicalName()); result =3D ((Boolean)StreamCapabilities.METHOD.invoke(stream, cap= ability)).booleanValue(); } catch (IllegalAccessException|IllegalArgumentException|Invocation= TargetException exception) { LOG.warn("Your Hadoop installation's StreamCapabilities implement= ation doesn't match " + "our understanding of how it's supposed to work. Please file = a JIRA and include " + "the following stack trace. In the mean time we're interpreti= ng this behavior " + "difference as a lack of capability support, which will proba= bly cause a failure.", exception); } } {code} This is not a problem in the code itself. But the code can be improved to l= og warning message when output stream class does not inherit from StreamCap= abilities. > HMaster start fails with IllegalStateException when HADOOP_HOME is set > ---------------------------------------------------------------------- > > Key: HBASE-20145 > URL: https://issues.apache.org/jira/browse/HBASE-20145 > Project: HBase > Issue Type: Bug > Environment: HBase-2.0-beta1. > Hadoop trunk version. > java version "1.8.0_144" > Reporter: Rohith Sharma K S > Assignee: Wei-Chiu Chuang > Priority: Critical > > It is observed that HMaster start is failed when HADOOP_HOME is set as en= v while starting HMaster. HADOOP_HOME is pointing to Hadoop trunk version. > {noformat} > 2018-03-07 16:59:52,654 ERROR [master//10.200.4.200:16000] master.HMaster= : Failed to become active master > java.lang.IllegalStateException: The procedure WAL relies on the ability = to hsync for proper operation during component failures, but the underlying= filesystem does not support doing so. Please check the config value of 'hb= ase.procedure.store.wal.use.hsync' to set the desired level of robustness a= nd ensure the config value of 'hbase.wal.dir' points to a FileSystem mount = that can provide it. > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.procedure2.store.wal.WALPro= cedureStore.rollWriter(WALProcedureStore.java:1036) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.procedure2.store.wal.WALPro= cedureStore.recoverLease(WALProcedureStore.java:374) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.procedure2.ProcedureExecuto= r.start(ProcedureExecutor.java:532) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.master.HMaster.startProcedu= reExecutor(HMaster.java:1232) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.master.HMaster.startService= Threads(HMaster.java:1145) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.master.HMaster.finishActive= MasterInitialization(HMaster.java:837) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.master.HMaster.startActiveM= asterManager(HMaster.java:2026) > =C2=A0=C2=A0 =C2=A0at org.apache.hadoop.hbase.master.HMaster.run(HMaster.= java:547) > =C2=A0=C2=A0 =C2=A0at java.lang.Thread.run(Thread.java:748) > {noformat} > The same configs is working in HBase-1.2.6 build properly.=20 -- This message was sent by Atlassian JIRA (v7.6.3#76005)