Guest User

Untitled

a guest
Jul 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. public class ConnectionInputFormat extends FileInputFormat<Text, Connection> {
  2.  
  3. @Override
  4. public RecordReader<Text, Connection> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {
  5. return new ConnectionRecordReader();
  6. }
  7. }
  8.  
  9. Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodException: testingground.TestInputJob$ConnectionInputFormat.<init>()
  10. at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:115)
  11. at org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:882)
  12. at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:779)
  13. at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
  14. at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)
  15. at testingground.TestInputJob.run(TestInputJob.java:141)
  16. at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
  17. at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
  18. at testingground.TestInputJob.main(TestInputJob.java:156)
  19. Caused by: java.lang.NoSuchMethodException: testingground.TestInputJob$ConnectionInputFormat.<init>()
  20. at java.lang.Class.getConstructor0(Class.java:2706)
  21. at java.lang.Class.getDeclaredConstructor(Class.java:1985)
  22. at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:109)
  23. ... 8 more
  24. Java Result: 1
  25.  
  26. public class ConnectionInputFormat extends FileInputFormat<Text, Connection> {
  27.  
  28. public ConnectionInputFormat() {
  29. System.out.println("NetflowInputFormat Constructor");
  30. }
  31.  
  32. @Override
  33. public RecordReader<Text, Connection> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {
  34. return new ConnectionRecordReader();
  35. }
  36. }
  37.  
  38. public class ConnectionInputFormat extends FileInputFormat<Text, Connection> {
  39.  
  40. public ConnectionInputFormat() {
  41. System.out.println("NetflowInputFormat Constructor");
  42. }
  43.  
  44. public ConnectionInputFormat(Object... o) {
  45. System.out.println("NetflowInputFormat Constructor");
  46. }
  47.  
  48. @Override
  49. public RecordReader<Text, Connection> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException {
  50. return new ConnectionRecordReader();
  51. }
  52. }
Add Comment
Please, Sign In to add comment