|
Amit Handa
2012-07-05, 07:28
alo alt
2012-07-05, 07:52
Mike Percy
2012-07-05, 18:51
Amit Handa
2012-07-06, 09:44
ashutosh
2012-07-06, 10:08
Amit Handa
2012-07-06, 10:53
Will McQueen
2012-07-06, 11:18
Will McQueen
2012-07-06, 11:21
Amit Handa
2012-07-06, 12:46
|
-
flume ng error while going for hdfs sinkAmit Handa 2012-07-05, 07:28
HI All,
While trying to run Flume ng using HDFS SInk, and using avro Client.. i am getting IOException. Kindly help in resolving this issue Exception log is as follows: 2012-07-05 12:01:32,789 (conf-file-poller-0) [INFO - org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:70)] Creating instance of sink HDFS typehdfs 2012-07-05 12:01:32,816 (conf-file-poller-0) [DEBUG - org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] java.io.IOException: config() at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) at org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) at org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) at org.apache.flume.conf.Configurables.configure(Configurables.java:41) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:223) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38) at org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Flume.conf file, contents are : # Define a memory channel called ch1 on agent1 agent1.channels.ch1.type = memory # Define an Avro source called avro-source1 on agent1 and tell it # to bind to 0.0.0.0:41414. Connect it to channel ch1. agent1.sources.avro-source1.channels = ch1 agent1.sources.avro-source1.type = avro agent1.sources.avro-source1.bind = 0.0.0.0 agent1.sources.avro-source1.port = 41414 # Define a hdfs sink that simply logs all events it receives # and connect it to the other end of the same channel. agent1.sinks.HDFS.channel = ch1 agent1.sinks.HDFS.type = hdfs agent1.sinks.HDFS.hdfs.path = hdfs://localhost:54310/ (in my setup hdfs is using port 54310 agent1.sinks.HDFS.hdfs.file.Type = DataStream # Finally, now that we've defined all of our components, tell # agent1 which ones we want to activate. agent1.channels = ch1 agent1.sources = avro-source1 #agent1.sinks = fileroll_sink1 agent1.sinks = HDFS Flume NG Command bin/flume-ng agent --conf ./conf/ -f conf/flume.conf -n agent1
-
Re: flume ng error while going for hdfs sinkalo alt 2012-07-05, 07:52
Hi,
looks like the sink can't connect to hdfs, try agent1.sinks.HDFS.hdfs.path = hdfs://localhost:54310/users/flume or similar. - Alex On Jul 5, 2012, at 9:28 AM, Amit Handa wrote: > HI All, > > While trying to run Flume ng using HDFS SInk, and using avro Client.. i am > getting IOException. Kindly help in resolving this issue > > Exception log is as follows: > 2012-07-05 12:01:32,789 (conf-file-poller-0) [INFO - > org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:70)] > Creating instance of sink HDFS typehdfs > 2012-07-05 12:01:32,816 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] > java.io.IOException: config() > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) > at > org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) > at > org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) > at > org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) > at > org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) > at org.apache.flume.conf.Configurables.configure(Configurables.java:41) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:223) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > > > Flume.conf file, contents are : > # Define a memory channel called ch1 on agent1 > agent1.channels.ch1.type = memory > > # Define an Avro source called avro-source1 on agent1 and tell it > # to bind to 0.0.0.0:41414. Connect it to channel ch1. > agent1.sources.avro-source1.channels = ch1 > agent1.sources.avro-source1.type = avro > agent1.sources.avro-source1.bind = 0.0.0.0 > agent1.sources.avro-source1.port = 41414 > > # Define a hdfs sink that simply logs all events it receives > # and connect it to the other end of the same channel. > agent1.sinks.HDFS.channel = ch1 > agent1.sinks.HDFS.type = hdfs > agent1.sinks.HDFS.hdfs.path = hdfs://localhost:54310/ (in my setup hdfs is > using port 54310 > agent1.sinks.HDFS.hdfs.file.Type = DataStream > > > # Finally, now that we've defined all of our components, tell > # agent1 which ones we want to activate. > agent1.channels = ch1 > agent1.sources = avro-source1 > #agent1.sinks = fileroll_sink1 > agent1.sinks = HDFS > > Flume NG Command > bin/flume-ng agent --conf ./conf/ -f conf/flume.conf -n agent1 -- Alexander Alten-Lorenz http://mapredit.blogspot.com German Hadoop LinkedIn Group: http://goo.gl/N8pCF
-
Re: flume ng error while going for hdfs sinkMike Percy 2012-07-05, 18:51
On Thu, Jul 5, 2012 at 12:28 AM, Amit Handa <[EMAIL PROTECTED]> wrote:
> HI All, > > While trying to run Flume ng using HDFS SInk, and using avro Client.. i am > getting IOException. Kindly help in resolving this issue > > Exception log is as follows: > 2012-07-05 12:01:32,789 (conf-file-poller-0) [INFO - > org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:70)] > Creating instance of sink HDFS typehdfs > 2012-07-05 12:01:32,816 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] > java.io.IOException: config() > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) > at > org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) > at > org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) > ... > Nothing is wrong with this, you are running at DEBUG level and Hadoop is giving you debug-level output. If you don't want to get DEBUG level messages from Hadoop while running Flume at DEBUG level then you will need to add something like: log4j.logger.org.apache.hadoop = INFO To your log4j.properties file. Are you experiencing any problems with your setup? Regards, Mike
-
Re: flume ng error while going for hdfs sinkAmit Handa 2012-07-06, 09:44
Hi,
@Mike thanks for ur reply. 1) After executing Flume-ng agent, and avro client, File is created in HDFS. I used today same flume-ng setup with hadoop 1.0.1. Now i m facing problem that through avro client i am sending normal text file. But inside HDFS File content is coming like as shown below. I want in HDFS this file content should be in normal text format HDFS File Content: *"SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We are modifying the file now^@^@^@* Given txt file content through AvroClient is * We are modifying the file now* Kindly provide ur inputs to resolve this issue. my flume.conf file content is as folows: *# Define a memory channel called ch1 on agent1 agent1.channels.ch1.type = memory # Define an Avro source called avro-source1 on agent1 and tell it # to bind to 0.0.0.0:41414. Connect it to channel ch1. agent1.sources.avro-source1.channels = ch1 agent1.sources.avro-source1.type = avro agent1.sources.avro-source1.selector.type=replicating agent1.sources.avro-source1.bind = 0.0.0.0 agent1.sources.avro-source1.port = 41414 # Define a hdfs sink that simply logs all events it receives # and connect it to the other end of the same channel. agent1.sinks.HDFS.channel = ch1 agent1.sinks.HDFS.type = hdfs agent1.sinks.HDFS.hdfs.path hdfs://localhost:54310/user/hadoop-node1/flumeTest agent1.sinks.HDFS.hdfs.file.Type = DataStream agent1.sinks.HDFS.hdfs.file.Format = Text # Finally, now that we've defined all of our components, tell # agent1 which ones we want to activate. agent1.channels = ch1 agent1.sources = avro-source1 agent1.sinks = HDFS* 2) AT Flume NG Side still i am getting security related IO Exception. when i start flume-ng using above configuration file. Exception log coming at flume-ng side is : 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] java.io.IOException: config() at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) at org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83) at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) at org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) at org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) at org.apache.flume.conf.Configurables.configure(Configurables.java:41) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:223) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38) at org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202) With Regards, Amit Handa On Fri, Jul 6, 2012 at 12:21 AM, Mike Percy <[EMAIL PROTECTED]> wrote: > On Thu, Jul 5, 2012 at 12:28 AM, Amit Handa <[EMAIL PROTECTED]> wrote:
-
RE: flume ng error while going for hdfs sinkashutosh 2012-07-06, 10:08
Hi Amit,
For your problem (1): There is syntax error in your HDFS sink configuration, that’s why the file is getting stored in sequence file format. agent1.sinks.HDFS.hdfs.file.Type = DataStream agent1.sinks.HDFS.hdfs.file.Format = Text You need to correct it as below: agent1.sinks.HDFS.hdfs.fileType = DataStream agent1.sinks.HDFS.hdfs.writeFormat = Text I hope this will solve your first problem. ---------------------------------------- ---------------------------------------- Thanks & Regards, Ashutosh Sharma ---------------------------------------- From: Amit Handa [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2012 6:44 PM To: [EMAIL PROTECTED] Subject: Re: flume ng error while going for hdfs sink Hi, @Mike thanks for ur reply. 1) After executing Flume-ng agent, and avro client, File is created in HDFS. I used today same flume-ng setup with hadoop 1.0.1. Now i m facing problem that through avro client i am sending normal text file. But inside HDFS File content is coming like as shown below. I want in HDFS this file content should be in normal text format HDFS File Content: "SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We are modifying the file now^@^@^@ Given txt file content through AvroClient is We are modifying the file now Kindly provide ur inputs to resolve this issue. my flume.conf file content is as folows: # Define a memory channel called ch1 on agent1 agent1.channels.ch1.type = memory # Define an Avro source called avro-source1 on agent1 and tell it # to bind to 0.0.0.0:41414<http://0.0..0.0:41414>. Connect it to channel ch1. agent1.sources..avro-source1.channels = ch1 agent1.sources.avro-source1.type = avro agent1.sources.avro-source1.selector.type=replicating agent1.sources.avro-source1.bind = 0.0.0.0 agent1.sources.avro-source1.port = 41414 # Define a hdfs sink that simply logs all events it receives # and connect it to the other end of the same channel. agent1.sinks.HDFS..channel = ch1 agent1.sinks.HDFS.type = hdfs agent1.sinks.HDFS.hdfs.path = hdfs://localhost:54310/user/hadoop-node1/flumeTest agent1.sinks.HDFS.hdfs.file.Type = DataStream agent1.sinks.HDFS.hdfs.file.Format = Text # Finally, now that we've defined all of our components, tell # agent1 which ones we want to activate. agent1.channels = ch1 agent1.sources = avro-source1 agent1.sinks = HDFS 2) AT Flume NG Side still i am getting security related IO Exception. when i start flume-ng using above configuration file. Exception log coming at flume-ng side is : 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] java.io.IOException: config() at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) at org.apache.hadoop.security.UserGroupInformation..ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) at org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83) at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) at org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) at org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) at org.apache.flume.conf.Configurables.configure(Configurables.java:41) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373) at org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:223) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123) at org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38) at org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202) With Regards, Amit Handa On Fri, Jul 6, 2012 at 12:21 AM, Mike Percy <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: On Thu, Jul 5, 2012 at 12:28 AM, Amit Handa <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: HI All, While trying to run Flume ng using HDFS SInk, and using avro Client.. i am getting IOException. Kindly help in resolving this issue Exception log is as follows: 2012-07-05 12:01:32,789 (conf-file-poller-0) [INFO - org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:70)] Creating instance of sink HDFS typehdfs 2012-07-05 12:01:32,816 (conf-file-poller-0) [DEBUG - org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] java.io.IOException: config() at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) at org.apache.hadoop.security.UserGroupInformation..ensureInitialized(UserGroupInformation.java:187) at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) .... Nothing is wrong with this, you are running at DEBUG level and Hadoop is giving you debug-level output. If you don't want to get DEBUG level messages from Hadoop while running Flume at DEBUG level then you will need to add something like: log4j.logger.org.apache.hadoop = INFO To your log4j.p
-
Re: flume ng error while going for hdfs sinkAmit Handa 2012-07-06, 10:53
hi,
@ashutosh thanks for your reply. I tried with your suggestion, but still it's not coming fully in text format. Using this conf. only "*org.apache.hadoop.io.BytesWritable" *changed to* "* *org.apache.hadoop.io.Text" *in the output file. But still sink hdfs file is not in full text format HDFS File Content: *SEQ^F!org.apache.hadoop.io.LongWritable^Yorg.apache.hadoop.io.Text^@^@^@^@^@^@Ù<82>ÐíàÞ^R]?Û^Fæ}Ô^?Y^@^@^@&^@^@^@^H^@^@^A8[å<84>ù^]We are modifying the file now^@^@^@^* With Regards, Amit Handa On Fri, Jul 6, 2012 at 3:38 PM, ashutosh(오픈플랫폼개발팀) <[EMAIL PROTECTED]>wrote: > Hi Amit, > > > > For your problem (1): There is syntax error in your HDFS sink > configuration, that’s why the file is getting stored in sequence file > format. > > *agent1.sinks.HDFS.hdfs.file.Type = DataStream > agent1.sinks.HDFS.hdfs.file.Format = Text > > * > > You need to correct it as below: > > *agent1.sinks.HDFS.hdfs.fileType = DataStream > agent1.sinks.HDFS.hdfs.writeFormat = Text > > * > > I hope this will solve your first problem. > > ---------------------------------------- > > ---------------------------------------- > > Thanks & Regards, > > Ashutosh Sharma > > ---------------------------------------- > > > > *From:* Amit Handa [mailto:[EMAIL PROTECTED]] > *Sent:* Friday, July 06, 2012 6:44 PM > *To:* [EMAIL PROTECTED] > *Subject:* Re: flume ng error while going for hdfs sink > > > > Hi, > > @Mike thanks for ur reply. > > 1) After executing Flume-ng agent, and avro client, File is created in > HDFS. > I used today same flume-ng setup with hadoop 1.0.1. > Now i m facing problem that through avro client i am sending normal text > file. But inside HDFS File content is coming like as shown below. I want in > HDFS this file content should be in normal text format > HDFS File Content: > *"SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We > are modifying the file now^@^@^@* > > Given txt file content through AvroClient is > * We are modifying the file now* > > Kindly provide ur inputs to resolve this issue. > my flume.conf file content is as folows: > * > # Define a memory channel called ch1 on agent1 > agent1.channels.ch1.type = memory > > > # Define an Avro source called avro-source1 on agent1 and tell it > # to bind to 0.0.0.0:41414 <http://0.0..0.0:41414>. Connect it to channel > ch1. > agent1.sources..avro-source1.channels = ch1 > > agent1.sources.avro-source1.type = avro > agent1.sources.avro-source1.selector.type=replicating > agent1.sources.avro-source1.bind = 0.0.0.0 > agent1.sources.avro-source1.port = 41414 > > > # Define a hdfs sink that simply logs all events it receives > # and connect it to the other end of the same channel. > agent1.sinks.HDFS..channel = ch1 > > agent1.sinks.HDFS.type = hdfs > agent1.sinks.HDFS.hdfs.path > hdfs://localhost:54310/user/hadoop-node1/flumeTest > agent1.sinks.HDFS.hdfs.file.Type = DataStream > agent1.sinks.HDFS.hdfs.file.Format = Text > > # Finally, now that we've defined all of our components, tell > # agent1 which ones we want to activate. > agent1.channels = ch1 > agent1.sources = avro-source1 > agent1.sinks = HDFS > * > > > > 2) AT Flume NG Side still i am getting security related IO Exception. when > i start flume-ng using above configuration file. > Exception log coming at flume-ng side is : > 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping > impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; > cacheTimeout=300000 > 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] > java.io.IOException: config() > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) > at > org.apache.hadoop.security.UserGroupInformation..ensureInitialized(UserGroupInformation.java:187)
-
Re: flume ng error while going for hdfs sinkWill McQueen 2012-07-06, 11:18
Hi Amit,
Try: *agent1.sinks.HDFS.hdfs.file.Type = DataStream ===change to==> **agent1.sinks.HDFS.hdfs.fileType = DataStream* Otherwise the fileType is SequenceFile by default. Cheers, Will On Fri, Jul 6, 2012 at 2:44 AM, Amit Handa <[EMAIL PROTECTED]> wrote: > Hi, > > @Mike thanks for ur reply. > > 1) After executing Flume-ng agent, and avro client, File is created in > HDFS. > I used today same flume-ng setup with hadoop 1.0.1. > Now i m facing problem that through avro client i am sending normal text > file. But inside HDFS File content is coming like as shown below. I want in > HDFS this file content should be in normal text format > HDFS File Content: > *"SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We > are modifying the file now^@^@^@* > > Given txt file content through AvroClient is > * We are modifying the file now* > > Kindly provide ur inputs to resolve this issue. > my flume.conf file content is as folows: > * > # Define a memory channel called ch1 on agent1 > agent1.channels.ch1.type = memory > > > # Define an Avro source called avro-source1 on agent1 and tell it > # to bind to 0.0.0.0:41414. Connect it to channel ch1. > agent1.sources.avro-source1.channels = ch1 > agent1.sources.avro-source1.type = avro > agent1.sources.avro-source1.selector.type=replicating > > agent1.sources.avro-source1.bind = 0.0.0.0 > agent1.sources.avro-source1.port = 41414 > > > # Define a hdfs sink that simply logs all events it receives > # and connect it to the other end of the same channel. > agent1.sinks.HDFS.channel = ch1 > agent1.sinks.HDFS.type = hdfs > agent1.sinks.HDFS.hdfs.path > hdfs://localhost:54310/user/hadoop-node1/flumeTest > agent1.sinks.HDFS.hdfs.file.Type = DataStream > agent1.sinks.HDFS.hdfs.file.Format = Text > > > # Finally, now that we've defined all of our components, tell > # agent1 which ones we want to activate. > agent1.channels = ch1 > agent1.sources = avro-source1 > agent1.sinks = HDFS* > > > 2) AT Flume NG Side still i am getting security related IO Exception. when > i start flume-ng using above configuration file. > Exception log coming at flume-ng side is : > 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping > impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; > cacheTimeout=300000 > 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - > org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] > java.io.IOException: config() > > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) > at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) > at > org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) > at > org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) > at > org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83) > at > org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212) > > at > org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) > at > org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) > at > org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) > at > org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) > at org.apache.flume.conf.Configurables.configure(Configurables.java:41) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:223) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123)
-
Re: flume ng error while going for hdfs sinkWill McQueen 2012-07-06, 11:21
Oops, I just noticed that this was already suggested by Ashutosh Sharma.
On Fri, Jul 6, 2012 at 4:18 AM, Will McQueen <[EMAIL PROTECTED]> wrote: > Hi Amit, > > Try: > > *agent1.sinks.HDFS.hdfs.file.Type = DataStream > ===change to==> > **agent1.sinks.HDFS.hdfs.fileType = DataStream* > > Otherwise the fileType is SequenceFile by default. > > Cheers, > Will > > > On Fri, Jul 6, 2012 at 2:44 AM, Amit Handa <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> @Mike thanks for ur reply. >> >> 1) After executing Flume-ng agent, and avro client, File is created in >> HDFS. >> I used today same flume-ng setup with hadoop 1.0.1. >> Now i m facing problem that through avro client i am sending normal text >> file. But inside HDFS File content is coming like as shown below. I want in >> HDFS this file content should be in normal text format >> HDFS File Content: >> *"SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We >> are modifying the file now^@^@^@* >> >> Given txt file content through AvroClient is >> * We are modifying the file now* >> >> Kindly provide ur inputs to resolve this issue. >> my flume.conf file content is as folows: >> * >> # Define a memory channel called ch1 on agent1 >> agent1.channels.ch1.type = memory >> >> >> # Define an Avro source called avro-source1 on agent1 and tell it >> # to bind to 0.0.0.0:41414. Connect it to channel ch1. >> agent1.sources.avro-source1.channels = ch1 >> agent1.sources.avro-source1.type = avro >> agent1.sources.avro-source1.selector.type=replicating >> >> agent1.sources.avro-source1.bind = 0.0.0.0 >> agent1.sources.avro-source1.port = 41414 >> >> >> # Define a hdfs sink that simply logs all events it receives >> # and connect it to the other end of the same channel. >> agent1.sinks.HDFS.channel = ch1 >> agent1.sinks.HDFS.type = hdfs >> agent1.sinks.HDFS.hdfs.path >> hdfs://localhost:54310/user/hadoop-node1/flumeTest >> agent1.sinks.HDFS.hdfs.file.Type = DataStream >> agent1.sinks.HDFS.hdfs.file.Format = Text >> >> >> # Finally, now that we've defined all of our components, tell >> # agent1 which ones we want to activate. >> agent1.channels = ch1 >> agent1.sources = avro-source1 >> agent1.sinks = HDFS* >> >> >> 2) AT Flume NG Side still i am getting security related IO Exception. >> when i start flume-ng using above configuration file. >> Exception log coming at flume-ng side is : >> 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - >> org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping >> impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; >> cacheTimeout=300000 >> 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - >> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] >> java.io.IOException: config() >> >> at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) >> at org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) >> at >> org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) >> at >> org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) >> at >> org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83) >> at >> org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212) >> >> at >> org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) >> at >> org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) >> at >> org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) >> at >> org.apache.flume.sink.hdfs.HDFSEventSink.configure(HDFSEventSink.java:239) >> at >> org.apache.flume.conf.Configurables.configure(Configurables.java:41) >> at >> org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSinks(PropertiesFileConfigurationProvider.java:373)
-
Re: flume ng error while going for hdfs sinkAmit Handa 2012-07-06, 12:46
HI All,
Thanks a lot. Yes it's working with *agent1.sinks.HDFS.hdfs.fileType = DataStream ashotosh also told that but i think it skipped * With Regards Amit Handa On Fri, Jul 6, 2012 at 4:51 PM, Will McQueen <[EMAIL PROTECTED]> wrote: > Oops, I just noticed that this was already suggested by Ashutosh Sharma. > > > On Fri, Jul 6, 2012 at 4:18 AM, Will McQueen <[EMAIL PROTECTED]> wrote: > >> Hi Amit, >> >> Try: >> >> *agent1.sinks.HDFS.hdfs.file.Type = DataStream >> ===change to==> >> **agent1.sinks.HDFS.hdfs.fileType = DataStream* >> >> Otherwise the fileType is SequenceFile by default. >> >> Cheers, >> Will >> >> >> On Fri, Jul 6, 2012 at 2:44 AM, Amit Handa <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> @Mike thanks for ur reply. >>> >>> 1) After executing Flume-ng agent, and avro client, File is created in >>> HDFS. >>> I used today same flume-ng setup with hadoop 1.0.1. >>> Now i m facing problem that through avro client i am sending normal text >>> file. But inside HDFS File content is coming like as shown below. I want in >>> HDFS this file content should be in normal text format >>> HDFS File Content: >>> *"SEQ^F!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable^@^@^@^@^@^@^UªG^Oòá~v¾z/<87>^[~ð^@^@^@)^@^@^@^H^@^@^A8[<8e>)Ú^@^@^@^]We >>> are modifying the file now^@^@^@* >>> >>> Given txt file content through AvroClient is >>> * We are modifying the file now* >>> >>> Kindly provide ur inputs to resolve this issue. >>> my flume.conf file content is as folows: >>> * >>> # Define a memory channel called ch1 on agent1 >>> agent1.channels.ch1.type = memory >>> >>> >>> # Define an Avro source called avro-source1 on agent1 and tell it >>> # to bind to 0.0.0.0:41414. Connect it to channel ch1. >>> agent1.sources.avro-source1.channels = ch1 >>> agent1.sources.avro-source1.type = avro >>> agent1.sources.avro-source1.selector.type=replicating >>> >>> agent1.sources.avro-source1.bind = 0.0.0.0 >>> agent1.sources.avro-source1.port = 41414 >>> >>> >>> # Define a hdfs sink that simply logs all events it receives >>> # and connect it to the other end of the same channel. >>> agent1.sinks.HDFS.channel = ch1 >>> agent1.sinks.HDFS.type = hdfs >>> agent1.sinks.HDFS.hdfs.path >>> hdfs://localhost:54310/user/hadoop-node1/flumeTest >>> agent1.sinks.HDFS.hdfs.file.Type = DataStream >>> agent1.sinks.HDFS.hdfs.file.Format = Text >>> >>> >>> # Finally, now that we've defined all of our components, tell >>> # agent1 which ones we want to activate. >>> agent1.channels = ch1 >>> agent1.sources = avro-source1 >>> agent1.sinks = HDFS* >>> >>> >>> 2) AT Flume NG Side still i am getting security related IO Exception. >>> when i start flume-ng using above configuration file. >>> Exception log coming at flume-ng side is : >>> 2012-07-06 11:14:42,957 (conf-file-poller-0) [DEBUG - >>> org.apache.hadoop.security.Groups.<init>(Groups.java:59)] Group mapping >>> impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; >>> cacheTimeout=300000 >>> 2012-07-06 11:14:42,961 (conf-file-poller-0) [DEBUG - >>> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227)] >>> java.io.IOException: config() >>> >>> at >>> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:227) >>> at >>> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:214) >>> at >>> org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) >>> at >>> org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) >>> at >>> org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83) >>> at >>> org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:212) >>> >>> at >>> org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:187) >>> at >>> org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:239) >>> at >>> org.apache.flume.sink.hdfs.HDFSEventSink.authenticate(HDFSEventSink.java:516) |