You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "Gorman, Stephen A." <ST...@saic.com> on 2011/10/11 22:28:53 UTC

Input from Column Fam. output to File?

All,

  How do I get have a mapreduce that gets its input from a column family
but outputs to a text file?

 

 

// I can set my input easily

Configuration conf = job.getConfiguration();

ConfigHelper.setInputColumnFamily(job.getConfiguration(), KEYSPACE,
INPUT_COLUMN_FAMILY);

 

But I can't seem to then do this

FileOutputFormat.setOutputPath(job, new Path(OUTPUT_FOLDER));

 

If I try to run the map/reduce I get this...

       at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:
115)

       at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:869)

       at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:833)

       at java.security.AccessController.doPrivileged(Native Method)

       at javax.security.auth.Subject.doAs(Subject.java:396)

       at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
n.java:1115)

       at
org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:833)

       at org.apache.hadoop.mapreduce.Job.submit(Job.java:476)

       at HadoopJob.main(HadoopJob.java:92)

Caused by: java.lang.InstantiationException

       at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(In
stantiationExceptionConstructorAccessorImpl.java:30)

       at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)

       at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:
113)

       ... 8 more

 

Thanks in advance.

 

sg