Created 03-17-2016 09:51 AM
How often we use java generics in map reduce jobs.Your inputs is highly appreciated!
Created 03-17-2016 10:54 AM
In 3 years of writing mapreduce code,i only needed to use generics once. That's not to say it's not useful, it's pretty powerful when you are dealing with objects that have various types. In my case it was a mapreduce program running against HBase, I would extract payload and within it, I had to figure out what was the value type.
Created 03-17-2016 10:52 AM
You mean the normal Java Generics?
https://en.wikipedia.org/wiki/Generics_in_Java
Like ArrayList<String>() Generics?
In that case I am pretty sure almost every MapReduce job out there uses it. MapReduce can run any Java code that can be executed by the JVM currently in HDP its Java8. So if you want to use Lambda functions you could as well. And Generics have been around forever so I would hope any well written library uses them.
Created 03-17-2016 10:54 AM
In 3 years of writing mapreduce code,i only needed to use generics once. That's not to say it's not useful, it's pretty powerful when you are dealing with objects that have various types. In my case it was a mapreduce program running against HBase, I would extract payload and within it, I had to figure out what was the value type.
Created 03-17-2016 11:29 AM
Hmmm I suppose it depends how you see the question. Pretty sure everybody uses generics but you are right I haven't implemented a generic class myself in a MapReduce job before. Pretty sure a lot of libraries do it but yourself during coding. Not really. I think the reason for the question might help.