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 DDACD200C86 for ; Wed, 17 May 2017 03:57:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DA663160BC9; Wed, 17 May 2017 01:57:07 +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 2BE1D160BC1 for ; Wed, 17 May 2017 03:57:07 +0200 (CEST) Received: (qmail 69977 invoked by uid 500); 17 May 2017 01:57:06 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 69968 invoked by uid 99); 17 May 2017 01:57:06 -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; Wed, 17 May 2017 01:57:06 +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 EB655D0398 for ; Wed, 17 May 2017 01:57:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 C9W9pxutmev8 for ; Wed, 17 May 2017 01:57:05 +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 E2FB85F1E7 for ; Wed, 17 May 2017 01:57: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 6259BE002B for ; Wed, 17 May 2017 01:57:04 +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 1E52C2193F for ; Wed, 17 May 2017 01:57:04 +0000 (UTC) Date: Wed, 17 May 2017 01:57:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5379) Set Hdfs Block Size based on Parquet Block Size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 17 May 2017 01:57:08 -0000 [ https://issues.apache.org/jira/browse/DRILL-5379?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1601= 3380#comment-16013380 ]=20 ASF GitHub Bot commented on DRILL-5379: --------------------------------------- Github user ppadma commented on a diff in the pull request: https://github.com/apache/drill/pull/826#discussion_r116895850 =20 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parq= uet/ParquetRecordWriter.java --- @@ -380,14 +384,21 @@ public void endRecord() throws IOException { =20 // since ParquetFileWriter will overwrite empty output file (app= end is not supported) // we need to re-apply file permission - parquetFileWriter =3D new ParquetFileWriter(conf, schema, path, = ParquetFileWriter.Mode.OVERWRITE); + if (useConfiguredBlockSize) { --- End diff -- =20 What we are doing is create parquet file as single block without changi= ng the file system default block size. For ex. default Parquet block size = is 512MB and if file system block size is 128MB, we create single file with= 4 blocks on filesystem, which can get distributed on different nodes, not = good for performance. If we change Parquet block size to 128MB (to match wi= th file system block size), for same amount of data, we end up creating 4 f= iles, one block each, which is not good either.=20 =20 JIRA wanted single HDFS block per Parquet file that is larger than file= system block size , without changing file system block size. They had fil= e system block size configured as 128MB. Lowering parquet block size (from = default value of 512MB) to match with file system block size is creating to= o many files for them. For some other reasons, they are not able to change = file system block size.=20 > Set Hdfs Block Size based on Parquet Block Size > ----------------------------------------------- > > Key: DRILL-5379 > URL: https://issues.apache.org/jira/browse/DRILL-5379 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - Parquet > Affects Versions: 1.9.0 > Reporter: F M=C3=A9thot > Fix For: Future > > > It seems there a way to force Drill to store CTAS generated parquet file = as a single block when using HDFS. Java HDFS API allows to do that, files c= ould be created with the Parquet block-size set in a session or system conf= ig. > Since it is ideal to have single parquet file per hdfs block. > Here is the HDFS API that allow to do that: > http://archive.cloudera.com/cdh4/cdh/4/hadoop/api/org/apache/hadoop/fs/Fi= leSystem.html#create(org.apache.hadoop.fs.Path,%20boolean,%20int,%20short,%= 20long) > http://archive.cloudera.com/cdh4/cdh/4/hadoop/api/org/apache/hadoop/fs/Fi= leSystem.html#create(org.apache.hadoop.fs.Path,%20boolean,%20int,%20short,%= 20long) > Drill uses the hadoop ParquetFileWriter (https://github.com/Parquet/parqu= et-mr/blob/master/parquet-hadoop/src/main/java/parquet/hadoop/ParquetFileWr= iter.java). > This is where the file creation occurs so it might be tricky. > However, ParquetRecordWriter.java (https://github.com/apache/drill/blob/m= aster/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Parq= uetRecordWriter.java) in Drill creates the ParquetFileWriter with an hadoop= configuration object. > something to explore: Could the block size be set as a property within th= e Configuration object before passing it to ParquetFileWriter constructor? -- This message was sent by Atlassian JIRA (v6.3.15#6346)