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 4DBAA10A0C for ; Wed, 23 Oct 2013 17:42:54 +0000 (UTC) Received: (qmail 37288 invoked by uid 500); 23 Oct 2013 17:41:03 -0000 Delivered-To: apmail-flume-user-archive@flume.apache.org Received: (qmail 37224 invoked by uid 500); 23 Oct 2013 17:40:55 -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 37118 invoked by uid 99); 23 Oct 2013 17:40:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Oct 2013 17:40:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.212.177] (HELO mail-wi0-f177.google.com) (209.85.212.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Oct 2013 17:40:27 +0000 Received: by mail-wi0-f177.google.com with SMTP id h11so1294550wiv.4 for ; Wed, 23 Oct 2013 10:40:06 -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=MfrKwP+Rlg28RRIaskGB0v/dpO3yhqAGnDo7kUbEmdI=; b=kG/HoikJKhg+z5MknX9zp0K91V5DsIAORyFkvv5MmnUhYYVZQcmhP74em8fESZmNfy /oLL4TTzJzpuLWnJAKE2iNXeKeaF2PImU1ltEq91uYF+wqiqqQ7U+Dh8nL1a4BQ7X1qZ l9qP3IvdvLZ/YOd17glee9M0QOG/BiCTpHwczH3okhn68xp0NelEwe3u6tHfYdndqTdC 9lSbXoXrC4ga8yc9daqBPTAgtr4NyD3omUnkLOQXO7iG8upcTRiYsiVoSUffuk2Q6PEb 1D068T8ds1fFbY79hngwoIfcfvM8M0MXBSD6cV0uEPVzF92vKf7MGzUY2aaUnYyb5q++ M+mw== X-Gm-Message-State: ALoCoQkB1n6uMqhkUBZ2KXXrtaq16OiDtSs6bC/bFCwV8uP1aM/HJoc0noxfn3G+CnCyFmEpjgB7 MIME-Version: 1.0 X-Received: by 10.194.123.8 with SMTP id lw8mr2769714wjb.40.1382550005986; Wed, 23 Oct 2013 10:40:05 -0700 (PDT) Received: by 10.217.5.74 with HTTP; Wed, 23 Oct 2013 10:40:05 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Oct 2013 13:40:05 -0400 Message-ID: Subject: Re: Not able to set date %d%m%Y in Sink Directory name From: David Sinclair To: user@flume.apache.org Content-Type: multipart/alternative; boundary=089e012282c8fded3a04e96c0123 X-Virus-Checked: Checked by ClamAV on apache.org --089e012282c8fded3a04e96c0123 Content-Type: text/plain; charset=ISO-8859-1 The sink is dependent on a header with the key "timestamp" being present in the event for this to work. What source are you using? On Wed, Oct 23, 2013 at 11:25 AM, Deepak Subhramanian < deepak.subhramanian@gmail.com> wrote: > Hi , > > I am trying to store my logs in folders named with date for my file_roll > and hdfssink. For some reason when I pass %d%m%Y in the sink directory it > is not working . Any thoughts . > > My Flume source is a simple HTTP Handler extended from HTTPSourceHandler > > tier1.sinks.filesink1.type = file_roll > tier1.sinks.filesink1.channel = c2 > tier1.sinks.filesink1.batchSize = 100000 > tier1.sinks.filesink1.rollInterval = 0 > #tier1.sinks.filesink1.rollInterval = 86400 > tier1.sinks.filesink1.sink.directory = /projects/test/logs/%d%m%Y > > > 13/10/23 16:20:36 ERROR flume.SinkRunner: Unable to deliver event. > Exception follows. > org.apache.flume.EventDeliveryException: Failed to open file > /projects/test/logs/%d%m%Y/1382541251307-1 while delivering event > at > org.apache.flume.sink.RollingFileSink.process(RollingFileSink.java:177) > at > org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68) > at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147) > at java.lang.Thread.run(Unknown Source) > Caused by: java.io.FileNotFoundException: > /projects/ETHAN_FLUME/logs/%d%m%Y/1382541251307-1 (No such file or > directory) > at java.io.FileOutputStream.open(Native Method) > at java.io.FileOutputStream.(Unknown Source) > at java.io.FileOutputStream.(Unknown Source) > at > org.apache.flume.sink.RollingFileSink.process(RollingFileSink.java:169) > > > Thanks, > Deepak Subhramanian > --089e012282c8fded3a04e96c0123 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The sink is dependent on a header with the key "times= tamp" being present in the event for this to work. What source are you= using?


= On Wed, Oct 23, 2013 at 11:25 AM, Deepak Subhramanian <= ;deepak.= subhramanian@gmail.com> wrote:
Hi ,=A0

= I am trying to store my logs in folders named with date for my file_roll an= d hdfssink. For some reason when I pass %d%m%Y in the sink directory it is = not working . Any thoughts .=A0

My Flume source is a simple HTTP Handler extended from = HTTPSourceHandler

tier1.sinks.filesink1.type =3D file_roll
tier1.sinks.filesink1.channel =3D c2
tier1.sinks.filesink1.batch= Size =3D 100000
tier1.sinks.filesink1.rollInterval =3D 0
#tier1.sinks.filesink1.rollInterval =3D 86400
tier1.sinks.filesink1.sink.directory =3D /projects/test/logs/%d%m%Y


13/10/23 16:20:36 ERROR flume.Si= nkRunner: Unable to deliver event. Exception follows.
org.apache.= flume.EventDeliveryException: Failed to open file /projects/test/logs/%d%m%= Y/1382541251307-1 while delivering event
at org.apache.flume.sink.= RollingFileSink.process(RollingFileSink.java:177)
at org.apache.flume.sink.DefaultSinkProcessor= .process(DefaultSinkProcessor.java:68)
at org.apache.flume.SinkR= unner$PollingRunner.run(SinkRunner.java:147)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: /projects/ETHAN_FLUME/logs/%= d%m%Y/1382541251307-1 (No such file or directory)
at java.io.FileOutputStream.open(Native Metho= d)
at java.io.FileOutputStre= am.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.flume.sink.= RollingFileSink.process(RollingFileSink.java:169)


Thanks,=A0Deepak Subhramanian

--089e012282c8fded3a04e96c0123--