This is the code where I am getting error:
while (it.hasNext()) {
elementCount = elementCount+1;
if(first)
{
lattitude = Double.toString((inst.decode(it.toString()))[0]);
longitude = Double.toString((inst.decode(it.toString()))[1]);
first = false;
}
This is the error:
java.lang.NullPointerException
at util.hashing.Geohash.decode(Geohash.java:41)
at org.myorg.LatLong$Reduce.reduce(LatLong.java:67)
at org.myorg.LatLong$Reduce.reduce(LatLong.java:1)
at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:663)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:426)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1132)
at org.apache.hadoop.mapred.Child.main(Child.java:249)