Return-Path: X-Original-To: apmail-flume-user-archive@www.apache.org Delivered-To: apmail-flume-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 98347F378 for ; Tue, 30 Apr 2013 18:01:12 +0000 (UTC) Received: (qmail 86573 invoked by uid 500); 30 Apr 2013 18:01:12 -0000 Delivered-To: apmail-flume-user-archive@flume.apache.org Received: (qmail 86491 invoked by uid 500); 30 Apr 2013 18:01:11 -0000 Mailing-List: contact user-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flume.apache.org Delivered-To: mailing list user@flume.apache.org Received: (qmail 86482 invoked by uid 99); 30 Apr 2013 18:01:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 18:01:11 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chen.song.82@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2013 18:01:05 +0000 Received: by mail-ie0-f172.google.com with SMTP id c12so1010325ieb.3 for ; Tue, 30 Apr 2013 11:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=GGVUstTtytk0hZGK6vtb1Zmz0tA9oQz43E716ALhBZ4=; b=Gb29fln5+Sp0LcvQB6ge5DCQ0aIsNl1n59laY9rMeyEnFg9NKHJI35LP394zVw1EQM K3zr9RJb6vtzWi3GYgr6TYiZ9CgjejF5gGPfGOJVTur4UNZb1SsaRgM1KTTANN5KogJz BqLB0BkNiE9IYZPo7hj8Mg7udZoGp/27L9ipKJj4/x6FtANI6clBc7zOV64jSdCetRjj OUgfCBoy40rEbvnMv2Bn+IhSeWy28lk8er/mR63rS8PT1cm68C3ttN4lroZjnjWex+lg eLCFIr0a21KcqqgOVad8yB39sGLU37cJW67mV8rfvPlG2Cwc7LDvEHdKr+BSmbhKKEKQ eaVg== MIME-Version: 1.0 X-Received: by 10.50.130.83 with SMTP id oc19mr4629126igb.29.1367344844591; Tue, 30 Apr 2013 11:00:44 -0700 (PDT) Received: by 10.231.163.140 with HTTP; Tue, 30 Apr 2013 11:00:44 -0700 (PDT) Date: Tue, 30 Apr 2013 14:00:44 -0400 Message-ID: Subject: Programmatically write files into HDFS with Flume From: Chen Song To: user@flume.apache.org Content-Type: multipart/alternative; boundary=047d7b418e99c120da04db97c716 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b418e99c120da04db97c716 Content-Type: text/plain; charset=ISO-8859-1 I am looking at options in Java programs that can write files into HDFS with the following requirements. 1) Transaction Support: Each file, when being written, either fully written successfully or failed totally without any partial file blocks written. 2) Compression Support/File Formats: Can specify compression type or file format when writing contents. I know how to write data into a file on HDFS by opening a FSDataOutputStream shown here. Just wondering if there is some libraries of out of the box solutions that provides the support I mentioned above. I stumbled upon Flume, which provides HDFS sink that can support transaction, compression, file rotation, etc. But it doesn't seem to provide an API to be used as a library. The features Flume provides are highly coupled with the Flume architectural components, like source, channel, and sinks and doesn't seem to be usable independently. All I need is merely on the HDFS loading part. Does anyone have some good suggestions? -- Chen Song --047d7b418e99c120da04db97c716 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

I am looking at options in Java programs that can write files into HDFS wit= h the following requirements.

1) Transaction Support: Each file, when being written, either fully written= successfully or failed totally without any partial file blocks written.

2) Compression Support/File Formats: Can specify compression type or file f= ormat when writing contents.

I know how to write data into a file on HDFS by opening a=A0FSD= ataOutputStream=A0shown=A0= here. Just wondering if there is some libraries of out of the box solut= ions that provides the support I mentioned above.

I stu= mbled upon Flume, which provides HDFS sink that can support transaction, co= mpression, file rotation, etc. But it doesn't seem to provide an API to= be used as a library. The features Flume provides are highly coupled with = the Flume architectural components, like source, channel, and sinks and doe= sn't seem to be usable independently. All I need is merely on the HDFS = loading part.

Does = anyone have some good suggestions?


--
Chen Song

--047d7b418e99c120da04db97c716--