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 40D5910AA8 for ; Wed, 15 Oct 2014 15:57:28 +0000 (UTC) Received: (qmail 32208 invoked by uid 500); 15 Oct 2014 15:57:27 -0000 Delivered-To: apmail-flume-user-archive@flume.apache.org Received: (qmail 32147 invoked by uid 500); 15 Oct 2014 15:57:27 -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 32136 invoked by uid 99); 15 Oct 2014 15:57:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 15:57:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gshapira@cloudera.com designates 209.85.213.41 as permitted sender) Received: from [209.85.213.41] (HELO mail-yh0-f41.google.com) (209.85.213.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 15:57:23 +0000 Received: by mail-yh0-f41.google.com with SMTP id i57so726392yha.28 for ; Wed, 15 Oct 2014 08:57:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=PrFFYtJvfNv+dahza+6n0tKFckACKo2PVPtbmLS8xuQ=; b=mTVu5tU9r0ywUNIh2Uyp1FhqlyLI0P1UEMUreoSV+BxE0MiBxU5fIQR2lUDPlBBrsA IRtk/GV9gea85ITmnFM2ZAoXgSqn8mqC6sXkVo8I/ldNE9Nel9jVwqsfdB81MhDYuJXx RMdildcTS1COnRugjNdXKMfIbNEiOFjK2ycIWlYZXVKYGljbjIGJ/7fo4h1Kteod4qao Mr3psCgfi6684qOtlmf0WXas1vZDbNInuTRsTcnrTrYwB+N+t0rGb0ZN2KiFj1SwGZ6h m8ZSvzw9Wr6FLkgioL95ARHnhz7j7H2JGwfQzm5Qq8H7ZT6HwBRe6xWifx98ELrUMib9 4+WQ== X-Gm-Message-State: ALoCoQnN19APFfmtcYYYKLsUyuF7RIi7XjaXAEnOZRGDqIiel7D+8VLTxt6vqX3TNZC7ZA+Cts9K MIME-Version: 1.0 X-Received: by 10.236.103.136 with SMTP id f8mr15330740yhg.135.1413388621612; Wed, 15 Oct 2014 08:57:01 -0700 (PDT) Received: by 10.170.212.212 with HTTP; Wed, 15 Oct 2014 08:57:01 -0700 (PDT) In-Reply-To: <543E7E8F.20308@target2sell.com> References: <543E7E8F.20308@target2sell.com> Date: Wed, 15 Oct 2014 08:57:01 -0700 Message-ID: Subject: Re: HDFS sink: "clever" routing From: Gwen Shapira To: user@flume.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Yes, this is absolutely possible - but you need to make sure the flume event has the matching keys in the event header (tenant, type, and timestamp). Do this either using interceptors or through a custom source. On Wed, Oct 15, 2014 at 7:02 AM, Jean-Philippe Caruana wrote: > Hi, > > I am new to Flume (and to HDFS), so I hope my question is not stupid. > > I have a multi-tenant application (about 100 different customers as for > now). > I have 16 different data types. > > (In production, we have approx. 15 million messages/day through our > RabbitMQ) > > I want to write to HDFS all my events, separated by tenant, data type, > and date, like this : > /data/{tenant}/{data_type}/2014/10/15/file-08.csv > > Is it possible with one sink definition ? I don't want to duplicate > configuration, and new client arrive every week or so > > In documentation, I see > agent1.sinks.hdfs-sink1.hdfs.path = hdfs://server/events/%Y/%m/%d/%H/ > > Is this possible ? > agent1.sinks.hdfs-sink1.hdfs.path = > hdfs://server/events/%tenant/%type/%Y/%m/%d/%H/ > > I want to write to different folder according to my incoming data. > > Thanks > > -- > Jean-Philippe Caruana > http://www.barreverte.fr >