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 6D02F200D4A for ; Tue, 14 Nov 2017 02:12:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6B5E7160C06; Tue, 14 Nov 2017 01:12:04 +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 B17DB160BF3 for ; Tue, 14 Nov 2017 02:12:03 +0100 (CET) Received: (qmail 58783 invoked by uid 500); 14 Nov 2017 01:12:02 -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 58772 invoked by uid 99); 14 Nov 2017 01:12:02 -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; Tue, 14 Nov 2017 01:12:02 +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 E3E39C0FD4 for ; Tue, 14 Nov 2017 01:12:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bO-VTusMpYpg for ; Tue, 14 Nov 2017 01:12:01 +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 D44865F2C3 for ; Tue, 14 Nov 2017 01:12:00 +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 628D3E0DF9 for ; Tue, 14 Nov 2017 01:12: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 1C42B240D6 for ; Tue, 14 Nov 2017 01:12:00 +0000 (UTC) Date: Tue, 14 Nov 2017 01:12:00 +0000 (UTC) From: "Vincent Poon (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (PHOENIX-3554) Building async local index by IndexTool generate wrong data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 14 Nov 2017 01:12:04 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vincent Poon resolved PHOENIX-3554. ----------------------------------- Resolution: Not A Bug Opened PHOENIX-4373 which causes the issue described here, since it's not actually a problem with the IndexTool itself > Building async local index by IndexTool generate wrong data > ----------------------------------------------------------- > > Key: PHOENIX-3554 > URL: https://issues.apache.org/jira/browse/PHOENIX-3554 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.8.0 > Environment: phoenix4.8.0 > Reporter: chenzhiming > Assignee: Vincent Poon > > 1.a salt table which pk is varchar > CREATE TABLE C_PICRECORD ( > ID VARCHAR NOT NULL PRIMARY KEY, > "info".CAR_NUM VARCHAR(18) NULL, > "info".CAP_DATE VARCHAR NULL, > "info".ORG_ID BIGINT NULL, > "info".ORG_NAME VARCHAR(255) NULL > ) SALT_BUCKETS=3; > 2.upsert into the table > UPSERT INTO C_PICRECORD(ID,CAR_NUM,CAP_DATE,ORG_ID,ORG_NAME) VALUES('1','car1','2016-01-01 00:00:00',11,'orgname1'); > 3.create async local index > CREATE LOCAL INDEX C_PICRECORD_IDX_1 on C_PICRECORD("info".CAR_NUM,"info".CAP_DATE) ASYNC; > 4.use IndexTool to build index > hbase org.apache.phoenix.mapreduce.index.IndexTool --data-table C_PICRECORD --index-table C_PICRECORD_IDX_1 --output-path /tmp/C_PICRECORD_IDX_1 > 5.enter into "hbase shell" and scan salt table > ------------------------------------------------------------------------ > hbase(main):102:0> scan 'C_PICRECORD' > ROW COLUMN+CELL > \x02\x00\x0Ecar1\x002016-01-01 00:00:00\x001\x0 column=L#0:_0, timestamp=1483108992853, value=x > 0\x00\x00\x00 > \x021 column=info:CAP_DATE, timestamp=1483021375797, value=2016-01-01 00:00:00 > \x021 column=info:CAR_NUM, timestamp=1483021375797, value=car1 > \x021 column=info:ORG_ID, timestamp=1483021375797, value=\x80\x00\x00\x00\x00\x00\x00\x0B > \x021 column=info:ORG_NAME, timestamp=1483021375797, value=orgname1 > \x021 column=info:_0, timestamp=1483021375797, value=x > -------------------------------------------------------------------------- > look here,the index data is wrong: > \x02\x00\x0Ecar1\x002016-01-01 00:00:00\x001\x00\x00\x00\x00 > the right index data should be: > \x02\x00\x0Ecar1\x002016-01-01 00:00:00\x001 > this is the reason i get any null value(the column not in index): > 0: jdbc:phoenix:master> SELECT ORG_ID,CAP_DATE,CAR_NUM,ORG_NAME FROM C_PICRECORD WHERE CAR_NUM='car1' AND CAP_DATE>='2016-01-01' AND CAP_DATE<='2016-05-02' LIMIT 10; > | ORG_ID | CAP_DATE | CAR_NUM | ORG_NAME | > | null | 2016-01-01 00:00:00 | car1 | | > PS: I can get the right index data if change pk's datatype to bigint or upsert some string as pk such as 'abc'. -- This message was sent by Atlassian JIRA (v6.4.14#64029)