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 2A813200B35 for ; Tue, 5 Jul 2016 21:20:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 279B6160A60; Tue, 5 Jul 2016 19:20:10 +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 4B72C160A2C for ; Tue, 5 Jul 2016 21:20:09 +0200 (CEST) Received: (qmail 85247 invoked by uid 500); 5 Jul 2016 19:20:08 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 85236 invoked by uid 99); 5 Jul 2016 19:20:08 -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, 05 Jul 2016 19:20:08 +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 C0700180614 for ; Tue, 5 Jul 2016 19:20:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id IhSX7NzX8I9y for ; Tue, 5 Jul 2016 19:20:05 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2F1505F257 for ; Tue, 5 Jul 2016 19:20:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u65JK3D0005944; Tue, 5 Jul 2016 19:20:03 GMT Message-Id: <201607051920.u65JK3D0005944@ip-10-146-233-104.ec2.internal> Date: Tue, 5 Jul 2016 19:19:54 +0000 From: "Bikramjeet Vig (Code Review)" To: Casey Ching , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Marcel Kornacker , Taras Bobrovytsky , Matthew Jacobs , Dimitris Tsirogiannis Reply-To: bikramjeet.vig@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-3721=3A_Simplify_creating_external_Kudu_tables=0A?= X-Gerrit-Change-Id: Ic141102818b6dad3016181b179a14024d0ff709d X-Gerrit-ChangeURL: X-Gerrit-Commit: 5f8630b6d3809de494a7eb1b0ec417948fb29bf3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Tue, 05 Jul 2016 19:20:10 -0000 Bikramjeet Vig has uploaded a new patch set (#24). Change subject: IMPALA-3721: Simplify creating external Kudu tables ...................................................................... IMPALA-3721: Simplify creating external Kudu tables Creating an external Kudu table was a lot harder than it needed to be because the columns needed to be specified twice, once in Kudu and once again in Impala. Also table properties needed to be specified and that is more tedious than it needs to be. Changes: 1) Read table schema from Kudu. When attempting to create an external table "foo" in database "bar", Impala will search for a Kudu table name "foo.bar" and "bar" (Kudu doesn't have database name spaces yet.) 2) The Kudu table is now required to exist at the time of creation in Impala. 3) Disallow table properties that could conflict with an existing table. Ex: key_columns cannot be specified. 4) Add KUDU as a file format. 5) Add a startup flag to catalogd to specify the default Kudu master addresses. The flag is used as the default value for the table property kudu_master_addresses. 6) Fix a post merge issue (IMPALA-3178) where DROP DATABASE CASCADE wasn't implemented for Kudu tables and silently ignored. The Kudu tables wouldn't be removed in Kudu. 7) Moved the kudu_master_addrs flag from catalogd to impalad. The flag was originally in catalogd so there would only be one definition of the value. Unfortunately the way CTAS is implemented, the complete to-be-created table definition needs to be available during analysis. The most practical thing to do is to move the flag to the impalad so it is easily accessible. 8) Remove DDL delegates. There was only one functional delegate (for Kudu) the existence of the other delegate and the use of delegates in general has led to confusion. The Kudu delegate only exists to provide functionality missing from Hive. Eventually Hive should have the needed functionality and the Kudu delegate (renamed in this patch to KuduCatalogOpExecutor) can be removed. Now an external Kudu table can be created with "CREATE EXTERNAL TABLE t STORED AS KUDU" assuming table "t" exists in Kudu. Users can still override table properties such as the Kudu table name or master addresses in the usual way. Change-Id: Ic141102818b6dad3016181b179a14024d0ff709d --- M be/src/catalog/catalog.cc M be/src/service/frontend.cc M bin/start-catalogd.sh M bin/start-impala-cluster.py M common/thrift/CatalogObjects.thrift M fe/src/main/cup/sql-parser.cup A fe/src/main/java/com/cloudera/impala/analysis/AnalysisUtils.java M fe/src/main/java/com/cloudera/impala/analysis/ColumnDef.java M fe/src/main/java/com/cloudera/impala/analysis/CreateTableAsSelectStmt.java M fe/src/main/java/com/cloudera/impala/analysis/CreateTableDataSrcStmt.java M fe/src/main/java/com/cloudera/impala/analysis/CreateTableStmt.java M fe/src/main/java/com/cloudera/impala/analysis/ToSqlUtils.java M fe/src/main/java/com/cloudera/impala/catalog/Db.java M fe/src/main/java/com/cloudera/impala/catalog/HdfsFileFormat.java M fe/src/main/java/com/cloudera/impala/catalog/ImpaladCatalog.java M fe/src/main/java/com/cloudera/impala/catalog/KuduTable.java M fe/src/main/java/com/cloudera/impala/catalog/Table.java D fe/src/main/java/com/cloudera/impala/catalog/delegates/DdlDelegate.java D fe/src/main/java/com/cloudera/impala/catalog/delegates/KuduDdlDelegate.java D fe/src/main/java/com/cloudera/impala/catalog/delegates/UnsupportedOpDelegate.java M fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java M fe/src/main/java/com/cloudera/impala/service/Frontend.java M fe/src/main/java/com/cloudera/impala/service/JniCatalog.java M fe/src/main/java/com/cloudera/impala/service/JniFrontend.java A fe/src/main/java/com/cloudera/impala/service/KuduCatalogOpExecutor.java A fe/src/main/java/com/cloudera/impala/util/KuduClient.java M fe/src/main/java/com/cloudera/impala/util/KuduUtil.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/com/cloudera/impala/analysis/AnalyzerTest.java M fe/src/test/java/com/cloudera/impala/analysis/ParserTest.java M fe/src/test/java/com/cloudera/impala/testutil/CatalogServiceTestCatalog.java M testdata/bin/generate-schema-statements.py M testdata/datasets/functional/functional_schema_template.sql D testdata/workloads/functional-query/queries/QueryTest/create_kudu.test M testdata/workloads/functional-query/queries/QueryTest/kudu-scan-node.test M testdata/workloads/functional-query/queries/QueryTest/kudu-show-create.test M testdata/workloads/functional-query/queries/QueryTest/kudu_alter.test M testdata/workloads/functional-query/queries/QueryTest/kudu_crud.test M testdata/workloads/functional-query/queries/QueryTest/kudu_partition_ddl.test M testdata/workloads/functional-query/queries/QueryTest/kudu_stats.test A tests/common/kudu_test_suite.py A tests/custom_cluster/test_kudu.py M tests/query_test/test_kudu.py 44 files changed, 1,355 insertions(+), 801 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/17/2617/24 -- To view, visit http://gerrit.cloudera.org:8080/2617 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic141102818b6dad3016181b179a14024d0ff709d Gerrit-PatchSet: 24 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Casey Ching Gerrit-Reviewer: Bikramjeet Vig Gerrit-Reviewer: Casey Ching Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Taras Bobrovytsky