From issues-return-237680-apmail-spark-issues-archive=spark.apache.org@spark.apache.org Tue Oct 1 20:04:02 2019 Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 7413C1913F for ; Tue, 1 Oct 2019 20:04:02 +0000 (UTC) Received: (qmail 921 invoked by uid 500); 1 Oct 2019 20:04:01 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 906 invoked by uid 500); 1 Oct 2019 20:04:01 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 893 invoked by uid 99); 1 Oct 2019 20:04:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2019 20:04:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 00C87E2F0E for ; Tue, 1 Oct 2019 20:04:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 4E85B780799 for ; Tue, 1 Oct 2019 20:04:00 +0000 (UTC) Date: Tue, 1 Oct 2019 20:04:00 +0000 (UTC) From: "JP Bordenave (Jira)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SPARK-13446) Spark need to support reading data from Hive 2.0.0 metastore 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/SPARK-13446?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D169= 42275#comment-16942275 ]=20 JP Bordenave edited comment on SPARK-13446 at 10/1/19 8:03 PM: --------------------------------------------------------------- 1) ok i am back,=C2=A0 after some internet issue,=C2=A0 i make restore all = hive 1.2.1=C2=A0 jars from spark 2.4.4 2) hive v2.3.3 get conflict mysql schema 2.3.0 with spark 2.4.4 because it = use 1.2.1 schema 3) i make cp hive-site.xml into spark/conf and i disable schema check,=C2= =A0 it is working fine under spark-shell {{}} {\{ hive.metastore.schema.verification}} {\{ false}} {{}} {{But i doenst understand why spark 2.4.4 use old hive schema 1.2.1 (not re= aly clear for me)}} {{}} {noformat} ^ scala> spark.sql("show databases").show +------------+ |databaseName| +------------+ | default| +------------+ scala> spark.sql("show tables").show 19/10/01 21:44:07 WARN metastore.ObjectStore: Failed to get database global= _temp, returning NoSuchObjectException +--------+---------+-----------+ |database|tableName|isTemporary| +--------+---------+-----------+ | default| employee| false| +--------+---------+-----------+ scala> spark.sql("select * from employee").show +---+-----------+---------+ | id| name| dept| +---+-----------+---------+ | 1| Allen| IT| | 2| Mag| Sales| | 14| Pierre| xXx| | 1| Allen| IT| | 3| Rob| Sales| | 4| Dana| IT| | 7| Pierre| xXx| | 11| Pierre| xXx| | 10| Pierre| xXx| | 12| Pierre| xXx| | 13| Pierre| xXx| +---+-----------+---------+ {noformat} {{}} {{}} {{}} was (Author: jpbordi): 1) ok i am back,=C2=A0 after some internet issue,=C2=A0 i make restore all = hive 1.2.1=C2=A0 jars from spark 2.4.4 2) hive v2.3.3 get conflict mysql schema 2.3.0 with spark 2.4.4 because it = use 1.2.1 schema 3) i make cp hive-site.xml into spark/conf and i disable schema check,=C2= =A0 it is working fine under spark-shell {{}} {\{ hive.metastore.schema.verification}} {\{ false}} {{}} {{But i doenst understand why spark 2.4.4 use old hive schema 1.2.1 (not re= aly clear for me)}} {{}} {noformat} +------------+ |databaseName| +------------+ | default| +------------+ scala> select * from employee; :24: error: not found: value select select * from employee; ^ :24: error: not found: value from select * from employee; ^scala> spark.sql("show databases").show +------------+ |databaseName| +------------+ | default| +------------+ scala> spark.sql("show tables").show 19/10/01 21:44:07 WARN metastore.ObjectStore: Failed to get database global= _temp, returning NoSuchObjectException +--------+---------+-----------+ |database|tableName|isTemporary| +--------+---------+-----------+ | default| employee| false| +--------+---------+-----------+ scala> spark.sql("select * from employee").show +---+-----------+---------+ | id| name| dept| +---+-----------+---------+ | 1| Allen| IT| | 2| Mag| Sales| | 14| Pierre| xXx| | 1| Allen| IT| | 3| Rob| Sales| | 4| Dana| IT| | 7| Pierre| xXx| | 11| Pierre| xXx| | 10| Pierre| xXx| | 12| Pierre| xXx| | 13| Pierre| xXx| +---+-----------+---------+ {noformat} {{}} {{}} {{}} > Spark need to support reading data from Hive 2.0.0 metastore > ------------------------------------------------------------ > > Key: SPARK-13446 > URL: https://issues.apache.org/jira/browse/SPARK-13446 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 1.6.0 > Reporter: Lifeng Wang > Assignee: Xiao Li > Priority: Major > Fix For: 2.2.0 > > > Spark provided HIveContext class to read data from hive metastore directl= y. While it only supports hive 1.2.1 version and older. Since hive 2.0.0 ha= s released, it's better to upgrade to support Hive 2.0.0. > {noformat} > 16/02/23 02:35:02 INFO metastore: Trying to connect to metastore with URI= thrift://hsw-node13:9083 > 16/02/23 02:35:02 INFO metastore: Opened a connection to metastore, curre= nt connections: 1 > 16/02/23 02:35:02 INFO metastore: Connected to metastore. > Exception in thread "main" java.lang.NoSuchFieldError: HIVE_STATS_JDBC_TI= MEOUT > at org.apache.spark.sql.hive.HiveContext.configure(HiveContext.sc= ala:473) > at org.apache.spark.sql.hive.HiveContext.metadataHive$lzycompute(= HiveContext.scala:192) > at org.apache.spark.sql.hive.HiveContext.metadataHive(HiveContext= .scala:185) > at org.apache.spark.sql.hive.HiveContext$$anon$1.(HiveConte= xt.scala:422) > at org.apache.spark.sql.hive.HiveContext.catalog$lzycompute(HiveC= ontext.scala:422) > at org.apache.spark.sql.hive.HiveContext.catalog(HiveContext.scal= a:421) > at org.apache.spark.sql.hive.HiveContext.catalog(HiveContext.scal= a:72) > at org.apache.spark.sql.SQLContext.table(SQLContext.scala:739) > at org.apache.spark.sql.SQLContext.table(SQLContext.scala:735) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org