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 485B0200AC5 for ; Sun, 1 May 2016 05:17:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 46DFF1609A7; Sun, 1 May 2016 05:17:19 +0200 (CEST) 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 8E632160131 for ; Sun, 1 May 2016 05:17:18 +0200 (CEST) Received: (qmail 99766 invoked by uid 500); 1 May 2016 03:17:17 -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 99754 invoked by uid 99); 1 May 2016 03:17:17 -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; Sun, 01 May 2016 03:17:17 +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 0EE01C0B90 for ; Sun, 1 May 2016 03:17:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id leUmcvUSNI8C for ; Sun, 1 May 2016 03:17:14 +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 4D0BF5F369 for ; Sun, 1 May 2016 03:17:13 +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 u413H4sB024276; Sun, 1 May 2016 03:17:04 GMT Message-Id: <201605010317.u413H4sB024276@ip-10-146-233-104.ec2.internal> Date: Sun, 1 May 2016 03:16:37 +0000 From: "Sailesh Mukil (Code Review)" To: Michael Brown , Taras Bobrovytsky , Dan Hecht , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Marcel Kornacker , Henry Robinson , Mostafa Mokhtar Reply-To: sailesh@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_IMPALA-1878:_Support_INSERT_and_LOAD_DATA_on_S3_and_between_filesystems=0A?= X-Gerrit-Change-Id: I94e15ad67752dce21c9b7c1dced6e114905a942d X-Gerrit-ChangeURL: X-Gerrit-Commit: cb7fca71e34330c77edc3649f3976460ec4f62bb 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.10-rc0 archived-at: Sun, 01 May 2016 03:17:19 -0000 Hello Michael Brown, Taras Bobrovytsky, Dan Hecht, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/2574 to look at the new patch set (#29). Change subject: IMPALA-1878: Support INSERT and LOAD DATA on S3 and between filesystems ...................................................................... IMPALA-1878: Support INSERT and LOAD DATA on S3 and between filesystems Previously Impala disallowed LOAD DATA and INSERT on S3. This patch functionally enables LOAD DATA and INSERT on S3 without making major changes for the sake of improving performance over S3. This patch also enables both INSERT and LOAD DATA between file systems. S3 does not support the rename operation, so the staged files in S3 are copied instead of renamed, which contributes to the slow performance on S3. The FinalizeSuccessfulInsert() function now does not make any underlying assumptions of the filesystem it is on and works across all supported filesystems. This is done by adding a full URI field to the base directory for a partition in the TInsertPartitionStatus. Also, the HdfsOp class now does not assume a single filesystem and gets connections to the filesystems based on the URI of the file it is operating on. Added a python S3 client called 'boto3' to access S3 from the python tests. A new class called S3Client is introduced which creates wrappers around the boto3 functions and have the same function signatures as PyWebHdfsClient by deriving from a base abstract class BaseFileSystem so that they can be interchangeably through a 'generic_client'. test_load.py is refactored to use this generic client. The ImpalaTestSuite setup creates a client according to the TARGET_FILESYSTEM environment variable and assigns it to the 'generic_client'. P.S: Currently, the test_load.py runs 4x slower on S3 than on HDFS. Performance needs to be improved in future patches. INSERT performance is slower than on HDFS too. This is mainly because of an extra copy that happens between staging and the final location of a file. However, larger INSERTs come closer to HDFS permformance than smaller inserts. ACLs are not taken care of for S3 in this patch. It is something that still needs to be discussed before implementing. Change-Id: I94e15ad67752dce21c9b7c1dced6e114905a942d --- M be/src/exec/hdfs-parquet-table-writer.cc M be/src/exec/hdfs-table-sink.cc M be/src/exec/hdfs-table-sink.h M be/src/runtime/coordinator.cc M be/src/runtime/disk-io-mgr-scan-range.cc M be/src/runtime/disk-io-mgr.cc M be/src/runtime/hdfs-fs-cache.h M be/src/util/CMakeLists.txt M be/src/util/hdfs-bulk-ops.cc M be/src/util/hdfs-bulk-ops.h A be/src/util/hdfs-util-test.cc M be/src/util/hdfs-util.cc M be/src/util/hdfs-util.h M common/thrift/ImpalaInternalService.thrift M fe/src/main/java/com/cloudera/impala/analysis/InsertStmt.java M fe/src/main/java/com/cloudera/impala/analysis/LoadDataStmt.java M fe/src/main/java/com/cloudera/impala/common/FileSystemUtil.java M fe/src/main/java/com/cloudera/impala/service/Frontend.java M fe/src/test/java/com/cloudera/impala/planner/S3PlannerTest.java A infra/python/deps/boto3-1.2.3-py2.py3-none-any.whl A infra/python/deps/botocore-1.3.30-py2.py3-none-any.whl A infra/python/deps/docutils-0.12.tar.gz A infra/python/deps/futures-3.0.5-py2-none-any.whl A infra/python/deps/jmespath-0.9.0-py2.py3-none-any.whl A infra/python/deps/python_dateutil-2.5.2-py2.py3-none-any.whl M infra/python/deps/requirements.txt A infra/python/deps/simplejson-3.3.0.tar.gz M testdata/workloads/functional-query/queries/QueryTest/insert_permutation.test M testdata/workloads/functional-query/queries/QueryTest/multiple-filesystems.test M testdata/workloads/functional-query/queries/QueryTest/truncate-table.test M testdata/workloads/tpch/queries/insert_parquet.test M tests/common/impala_test_suite.py M tests/common/skip.py M tests/custom_cluster/test_insert_behaviour.py M tests/custom_cluster/test_parquet_max_page_header.py M tests/data_errors/test_data_errors.py M tests/metadata/test_col_stats.py M tests/metadata/test_compute_stats.py M tests/metadata/test_ddl.py M tests/metadata/test_explain.py M tests/metadata/test_hdfs_encryption.py M tests/metadata/test_hdfs_permissions.py M tests/metadata/test_last_ddl_time_update.py M tests/metadata/test_load.py M tests/metadata/test_partition_metadata.py M tests/metadata/test_recover_partitions.py M tests/metadata/test_show_create_table.py M tests/query_test/test_aggregation.py M tests/query_test/test_cancellation.py M tests/query_test/test_chars.py M tests/query_test/test_compressed_formats.py M tests/query_test/test_delimited_text.py M tests/query_test/test_insert.py M tests/query_test/test_insert_behaviour.py M tests/query_test/test_insert_parquet.py M tests/query_test/test_insert_permutation.py M tests/query_test/test_join_queries.py M tests/query_test/test_multiple_filesystems.py M tests/query_test/test_partitioning.py M tests/query_test/test_queries.py M tests/query_test/test_scanners.py M tests/shell/test_shell_commandline.py A tests/util/filesystem_base.py M tests/util/filesystem_utils.py M tests/util/hdfs_util.py A tests/util/s3_util.py 66 files changed, 804 insertions(+), 450 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/74/2574/29 -- To view, visit http://gerrit.cloudera.org:8080/2574 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94e15ad67752dce21c9b7c1dced6e114905a942d Gerrit-PatchSet: 29 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Sailesh Mukil Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Henry Robinson Gerrit-Reviewer: Marcel Kornacker Gerrit-Reviewer: Michael Brown Gerrit-Reviewer: Mostafa Mokhtar Gerrit-Reviewer: Sailesh Mukil Gerrit-Reviewer: Taras Bobrovytsky