if (value != null && value.getWidth() > 1 && value.getHeight() > 1 && value.getBands() == 3) { FloatImage avg = new FloatImage(1, 1, 3); float[] avgData = avg.getData(); float[] valData = value.getData(); for (int i = 0; i < value.getWidth(); i++) { for (int j = 0; j < value.getHeight(); j++) { avgData[0] += valData[i * value.getHeight() * 3 + j * 3]; avgData[1] += valData[i * value.getHeight() * 3 + j * 3 + 1]; avgData[2] += valData[i * value.getHeight() * 3 + j * 3 + 2]; } } avg.scale(1.0f / (value.getWidth() * value.getHeight())); context.write(new IntWritable(0), avg);
Class hipi.imagebundle.mapreduce.output.BinaryOutputFormat not found
I am sure of including the jar because the tool example for creating the hib file worked.
Thanks
Venkatesh
2015-02-09 13:25:22,056 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Using mapred newApiCommitter. 2015-02-09 13:25:22,878 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: OutputCommitter set in config null 2015-02-09 13:25:22,926 INFO [main] org.apache.hadoop.service.AbstractService: Service org.apache.hadoop.mapreduce.v2.app.MRAppMaster failed in state INITED; cause: org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class hipi.imagebundle.mapreduce.output.BinaryOutputFormat not found org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class hipi.imagebundle.mapreduce.output.BinaryOutputFormat not found at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1.call(MRAppMaster.java:472) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1.call(MRAppMaster.java:452) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.callWithJobClassLoader(MRAppMaster.java:1541) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.createOutputCommitter(MRAppMaster.java:452) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceInit(MRAppMaster.java:371) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$4.run(MRAppMaster.java:1499) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1496) at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1429)