You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Steinmaurer Thomas <Th...@scch.at> on 2011/09/16 14:15:38 UTC
MR-Job: Exception in DBOutputFormat
Hello,
I'm writing a MR-Job to write HBase data to Oracle. The mapper works,
but the reducer produces the following exception:
java.io.IOException
at
org.apache.hadoop.mapreduce.lib.db.DBOutputFormat.getRecordWriter(DBOutp
utFormat.java:180)
at
org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:559)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:414)
at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
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:1127)
at org.apache.hadoop.mapred.Child.main(Child.java:264)
I'm doing the JDBC plumbing like that:
DBConfiguration.configureDB(
conf
, "oracle.jdbc.driver.OracleDriver"
, "jdbc:oracle:thin:@//xxx.com:1521/SID "
, "user"
, "pwd"
);
String[] fields = {"HBASE_KEY", "VALUE_COUNT", "VALUE_SUM",
"VALUE_AVG", "VALUE_MIN", "VALUE_MAX"};
DBOutputFormat.setOutput(
job
, "HBASE_AGGREGATES"
, fields
);
So I think, basically this is right. I've also copied ojdbc6.jar into
the hadoop lib/ directory.
Any ideas on what might be wrong?
Thanks,
Thomas