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 B8326200CEF for ; Mon, 4 Sep 2017 16:21:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B6BB3164B3A; Mon, 4 Sep 2017 14:21:11 +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 0B002164B13 for ; Mon, 4 Sep 2017 16:21:10 +0200 (CEST) Received: (qmail 21567 invoked by uid 500); 4 Sep 2017 14:21:10 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 21556 invoked by uid 99); 4 Sep 2017 14:21:10 -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; Mon, 04 Sep 2017 14:21:10 +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 89DC4C270D for ; Mon, 4 Sep 2017 14:21:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 yMvSQlhfjxVP for ; Mon, 4 Sep 2017 14:21:04 +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 670CA5F6C8 for ; Mon, 4 Sep 2017 14:21:04 +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 E2E39E00C9 for ; Mon, 4 Sep 2017 14:21:03 +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 057F523F0D for ; Mon, 4 Sep 2017 14:21:02 +0000 (UTC) Date: Mon, 4 Sep 2017 14:21:00 +0000 (UTC) From: "Aritomo Abe (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-3460) Phoenix Spark plugin cannot find table with a Namespace prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 04 Sep 2017 14:21:11 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152659#comment-16152659 ] Aritomo Abe commented on PHOENIX-3460: -------------------------------------- I have the same problem. But I cannot just use "." to solve this issue. My scheme was created using the following syntax: create table if not exists "create table "test_namespace:test_table" (id varchar not null primary key); I can work with the table through JDBC, Phoenix console, etc. But not from Spark: org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=test_namespace:test_table Spark code is really simple: {code:java} import org.apache.hadoop.conf.Configuration import org.apache.spark.SparkContext import org.apache.spark.sql.SQLContext import org.apache.phoenix.spark._ val configuration = new Configuration() val sqlContext = new SQLContext(sc) val df = sqlContext.phoenixTableAsDataFrame( "\"test_namespace:test_table\"", Array("id"), conf = configuration ) {code} > Phoenix Spark plugin cannot find table with a Namespace prefix > -------------------------------------------------------------- > > Key: PHOENIX-3460 > URL: https://issues.apache.org/jira/browse/PHOENIX-3460 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.8.0 > Environment: HDP 2.5 > Reporter: Xindian Long > Labels: phoenix, spark > Fix For: 4.7.0 > > > I am testing some code using Phoenix Spark plug in to read a Phoenix table with a namespace prefix in the table name (the table is created as a phoenix table not a hbase table), but it returns an TableNotFoundException. > The table is obviously there because I can query it using plain phoenix sql through Squirrel. In addition, using spark sql to query it has no problem at all. > I am running on the HDP 2.5 platform, with phoenix 4.7.0.2.5.0.0-1245 > The problem does not exist at all when I was running the same code on HDP 2.4 cluster, with phoenix 4.4. > Neither does the problem occur when I query a table without a namespace prefix in the DB table name, on HDP 2.5 > The log is in the attached file: tableNoFound.txt > My testing code is also attached. > The weird thing is in the attached code, if I run testSpark alone it gives the above exception, but if I run the testJdbc first, and followed by testSpark, both of them work. > After changing to create table by using > create table ACME.ENDPOINT_STATUS > The phoenix-spark plug in seems working. I also find some weird behavior, > If I do both the following > create table ACME.ENDPOINT_STATUS ... > create table "ACME:ENDPOINT_STATUS" ... > Both table shows up in phoenix, the first one shows as Schema ACME, and table name ENDPOINT_STATUS, and the later on shows as scheme none, and table name ACME:ENDPOINT_STATUS. > However, in HBASE, I only see one table ACME:ENDPOINT_STATUS. In addition, upserts in the table ACME.ENDPOINT_STATUS show up in the other table, so is the other way around. > -- This message was sent by Atlassian JIRA (v6.4.14#64029)