Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F84418511 for ; Wed, 11 Nov 2015 05:26:34 +0000 (UTC) Received: (qmail 17601 invoked by uid 500); 11 Nov 2015 05:26:33 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 17512 invoked by uid 500); 11 Nov 2015 05:26:33 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 17502 invoked by uid 99); 11 Nov 2015 05:26:33 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2015 05:26:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8466D1A2CF1 for ; Wed, 11 Nov 2015 05:26:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6R99gV1811tw for ; Wed, 11 Nov 2015 05:26:31 +0000 (UTC) Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 834C820314 for ; Wed, 11 Nov 2015 05:26:30 +0000 (UTC) Received: by qkao63 with SMTP id o63so8187211qka.2 for ; Tue, 10 Nov 2015 21:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WsOAVMLYm6tU109A0Pux4yiSHg6bZUCsfNSes8JPntc=; b=YPA6gKbsM7eTIcJN6rJyFmGNS1vQnEYgXKQdz/KTXlsQTTT9lP4n356mjbfNB4MQHc u9Z9+kKhbfE5C51ZnvZdM0IvVr8PKJVVcu5ROZb3gh30i6wte3DnGC96WwVoGKsYr3Bg sVbUHBONWT7WrBpqm0FBdCaEMyfHrXY9q/zAwmO1IB13UFg573cEtHULXgz68/mhObKQ IcjiaihWde/amxWC0dJegSwc9sfrxqkE9ukg6IGdEt3MnZnvuiEzd3WtEb/EvIxEvZpL P0/eOJRrUyVoiE1Q+a4JS7H97AJ4+5rQoIutz3fOCZ0VaOrZSzO6kddLT7Ghr5jAGHPE 1ffA== MIME-Version: 1.0 X-Received: by 10.55.75.21 with SMTP id y21mr9086971qka.2.1447219589667; Tue, 10 Nov 2015 21:26:29 -0800 (PST) Received: by 10.55.186.66 with HTTP; Tue, 10 Nov 2015 21:26:29 -0800 (PST) Date: Tue, 10 Nov 2015 21:26:29 -0800 Message-ID: Subject: Small files under SequenceFile table partition directories From: reveen joe To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a114a6a7a8de38605243d11de --001a114a6a7a8de38605243d11de Content-Type: text/plain; charset=UTF-8 Hi, Most of our Hive tables are SequenceFile tables and there are currently many small file ranging from *1-4 MB* under the Partition directories (created by insert-overwrite). I am assuming this is due to 2 reasons 1. Some of our tables are Bucketed and so individual files are created for each bucket of data for a given partition. 2. The places where we have set number of Reducers, produce 1 file per Reducer. So, the dir structure looks like below. /PATH/TO/TABLE/DIR/partition_column=2015-11-01//000000_0 /PATH/TO/TABLE/DIR/partition_column=2015-11-01//000001_0 /PATH/TO/TABLE/DIR/partition_column=2015-11-01//000002_0 /PATH/TO/TABLE/DIR/partition_column=2015-11-01//000003_0 ............................................................................................ ............................................................................................ ............................................................................................ /PATH/TO/TABLE/DIR/partition_column=2015-11-01//000379_0 The Block size of the cluster is 128 MB. I know that sequence file can store FileName as Key and FileContent as Value in sequence Files but in this case they are independent files. Am I right that - this would add overhead to the further processing of this data as each file would need to spin up a JVM to start a Map Task against that file and also because of the Disk IO overhead? If so, what could be the best remedy to combine the small files under a partition directory? Thank you. --001a114a6a7a8de38605243d11de Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Most of our Hive tables are=C2=A0Se= quenceFile tables and there are currently many small file ranging from 1= -4 MB under the Partition directories (created by insert-overwrite). I = am assuming this is due to 2 reasons

1. Some of ou= r tables are Bucketed and so individual files are created for each bucket o= f data for a given partition.=C2=A0

2. The places = where we have set number of Reducers, produce 1 file per Reducer.=C2=A0

So, the dir structure looks like below.=C2=A0

/PATH/TO/TABLE/DIR/partition_column=3D2015-11-01//000000_= 0
/PATH/TO/TABLE/DIR/partition_column=3D2015-11-01//000001_0<= br>
/PATH/TO/TABLE/DIR/partition_column=3D2015-11-01//000002_0
/PATH/TO/TABLE/DIR/partition_column=3D2015-11-01//000003_0
<= /div>
.................................................................= ...........................
.....................................= .......................................................
.....= ...........................................................................= ............
/PATH/TO/TABLE/DIR/partition_column=3D2015-11-01= //000379_0

The Block size of the cluster is 12= 8 MB. I know that sequence file can store FileName as Key and FileContent a= s Value in sequence Files but in this case they are independent files.=C2= =A0

Am I right that - this would add overhead to t= he further processing of this data as each file would need to spin up a JVM= to start a Map Task against that file and also because of the Disk IO over= head?=C2=A0

If so, what could be the best remedy t= o combine the small files under a partition directory? Thank you.=C2=A0

--001a114a6a7a8de38605243d11de--