hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamal sasha <jamalsha...@gmail.com>
Subject Passing arguments in hadoop
Date Tue, 06 Aug 2013 23:46:46 GMT
  I am trying to pass a parameter to multiple mappers

So, I do this in my driver

conf.set("delimiter", args[3]);

In mapper1, I am retreiving this as:

Configuration conf = context.getConfiguration();
String[] values = value.toString().split(conf.get("delimiter"));

and same is my mapper2

But I get this error:
13/08/06 16:38:09 INFO mapred.JobClient: Task Id :
attempt_201306191416_1384_m_000001_0, Status : FAILED
at java.util.regex.Pattern.<init>(Pattern.java:1149)
at java.util.regex.Pattern.compile(Pattern.java:840)
at java.lang.String.split(String.java:2304)
at java.lang.String.split(String.java:2346)
at  DataSourceOneMapper.map(DataSourceOneMapper.java:22)
at .DataSourceOneMapper.map(DataSourceOneMapper.java:1)

And the line 22 corresponds to this conf.get("...") line

What am i doing wrong?
Also, just to add, in this particular case delimiter is "@"

So, if i do

String[] values = value.toString().split("@");

everything works fine??
How do i resolve this?

View raw message