From dev-return-55938-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Apr 2 12:26:55 2019 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 07CF5180668 for ; Tue, 2 Apr 2019 14:26:54 +0200 (CEST) Received: (qmail 44094 invoked by uid 500); 2 Apr 2019 12:26:52 -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 43311 invoked by uid 99); 2 Apr 2019 12:26:51 -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; Tue, 02 Apr 2019 12:26:51 +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 23B63181B12 for ; Tue, 2 Apr 2019 12:26:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.052 X-Spam-Level: X-Spam-Status: No, score=0.052 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AmHmqx5PhLXo for ; Tue, 2 Apr 2019 12:26:49 +0000 (UTC) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E14BF624B1 for ; Tue, 2 Apr 2019 12:26:48 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id d1so4507990plj.8 for ; Tue, 02 Apr 2019 05:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=HJhsOjLuJE9QJympD50CzdLOXWOZJ9C80Mwfu0GpMEA=; b=UpmCeDNGDviwR30PCYZmH3mBKysQJoQqdEQf7T8vnGfXx12paXF/0cbPsvYIA18S8t NF3kNXZz6LkCoXe85Uzp2jeiUIC3nT/mUEYCvCWulsmWs+Byh1pR616CqkGajyZVujsw OYXNyBp39OGsq9lXWdWDQBzHmArzIvuyjLzrjjQ0bH9rFnuf5vJ1oP0UmATtlUt2JgRt YFs144+86s7M2ZTYux1Z8Vq9Nc4jkZy1Hdg4GFjJVmmhVccr+ZdDJKdHyeeoiTEzi1QW DU/S+vE4Lc8+eOorKD5PD3/aAvdtSgjyGzVRLlYL+KNEx7OY32jWUSauD1VLi2aHIpzM uaPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=HJhsOjLuJE9QJympD50CzdLOXWOZJ9C80Mwfu0GpMEA=; b=cY8MQY23QbZGYHnrTLjdciI2p8JeJr+qAI/1FB8DKKvj/B1WoT69NUHcMwQtrClZdF VliYSsOsyNkovO9c2hnvs5o2FFtUD1F1Ve4jmLCLKQKh0D1I3ivfORzKZYy6TORDM+2M E1G8cU8nM+6hmNsGkip4V2H3WUXxu+mG0HXheNFkBXafLj48A3E6Lj2TUlPQvqerD3vt 4uu6GoJRE/oaHKMRCsRHi2grjNK4YBcMjnDU3hTaWVelIVtbduh11Vy0fMIVQHsZSt7D tHkDUiH4Y0IlqxnJ7bXwelME+zZKjrliv07QqdyJmTCeV32QOLuDGjIrnw+wIzxgxN2e D3tQ== X-Gm-Message-State: APjAAAWoHbdBpk6VR1H7AK2tvhtE9LJtYwqnh7Sre9pmKNqMXwj5b0nW /PDYO100ZQe0u4cQgFGO3y5+OOLO X-Google-Smtp-Source: APXvYqzzT2Wt3piVJ3Nlv7Cj9jdiVI7Q+iomNelD4MqMDgbwSkSdY2/tUnsE+jkGYdVWol98LBSlmg== X-Received: by 2002:a17:902:2aa6:: with SMTP id j35mr69732973plb.56.1554208007085; Tue, 02 Apr 2019 05:26:47 -0700 (PDT) Received: from [192.168.1.15] (cpe-76-89-153-178.socal.res.rr.com. [76.89.153.178]) by smtp.gmail.com with ESMTPSA id g4sm23268379pfm.115.2019.04.02.05.26.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 05:26:46 -0700 (PDT) From: anil gupta Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Tue, 2 Apr 2019 05:26:45 -0700 Subject: Re: About mapping a phoenix table Message-Id: <7BB0ECEE-9B9E-4EF6-B9AB-A3574B63E491@gmail.com> References: In-Reply-To: To: dev@phoenix.apache.org X-Mailer: iPhone Mail (16E227) Hey Reid, AFAIK, there is no official Phoenix tool to copy table between clusters. IMO= , it would be great to have an official tool to copy tables. In our case, source and destination clusters are running Phoenix4.7. IMO, co= py between 4.7-4.14 might have some version incompatibility. So, you might n= eed to test following in non-prod first.=20 Approach 1: We usually move tables by taking a snapshot of hbase table, expo= rting the snapshot to remote cluster, create Phoenix table, delete underlyin= g hbase table, and restoring the snapshot. Please keep in mind that you will= need to do similar exercise if your table has secondary indexes since they a= re stored in another hbase table. Also, make sure that you don=E2=80=99t ha= ve any live traffic to Phoenix table in destination cluster until restoring o= f snapshot and verification of data in table. Approach 2: Use copyTable util of hbase. In this case, you will just need to= create Phoenix table on remote cluster and then kick off hbase copy table. I= n this approach also, you will need to perform copyTable for each secondary i= ndex.=20 We usually use approach1 because it=E2=80=99s usually faster and doesn=E2=80= =99t puts write load on cluster. HTH, Anil Gupta > On Apr 2, 2019, at 4:32 AM, Reid Chan wrote: >=20 > Hi team, >=20 > I'm trying to transport a phoenix table between two clusters, by copying a= ll related hbase files on hdfs from cluster A to cluster B. > But after i executed CreateTableStatement in phoenix, phoenix failed to ma= p those files into table, and `select *` got nothing. >=20 > The questions are, > Is there a proper way or tool to do the table transportation? > If answer is no, can team provide some code pointers if i want to implemen= t it? > Or reason why is this infeasible? >=20 > FYI, > both hbase version are both 1.x but different in minor version, > phoenix version gap is huge, 4.7.0 and 4.14.1. >=20 > Any suggestions are appreciated! > Thanks >=20 >=20 > -------------------------- >=20 > Best regards, > R.C >=20 >=20