aseldawy / spatialhadoop2

The second generation of SpatialHadoop that ships as an extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

index operation giving NullPointerException

kri22gopal opened this issue · comments

I have generate a random file containing random rectangles, as per tutorial
$ bin/shadoop generate test mbr:0,0,1000000,1000000 size:1.gb shape:rect

it works fine but when i try index it it given NullPointerException . full stack trace given below .
please help me out .

shadoop index test test.grid mbr:0,0,1000000,1000000 sindex:grid
15/01/02 12:16:20 INFO util.NativeCodeLoader: Loaded the native-hadoop library
15/01/02 12:16:20 WARN snappy.LoadSnappy: Snappy native library not loaded
15/01/02 12:16:20 INFO mapred.FileInputFormat: No block filter specified
15/01/02 12:16:20 INFO mapred.FileInputFormat: Total input paths to process : 16
java.lang.NullPointerException
at edu.umn.cs.spatialHadoop.operations.Repartition.repartitionMapReduce(Repartition.java:366)
at edu.umn.cs.spatialHadoop.operations.Repartition.repartition(Repartition.java:674)
at edu.umn.cs.spatialHadoop.operations.Repartition.main(Repartition.java:717)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at edu.umn.cs.spatialHadoop.operations.Main.main(Main.java:101)

I got the same problem (caused NullPointerException when doing index). Do you find a solution?

In index command you need to mention "shape:rect". As it is not mention with SpatialHadoop sample commands but SpatialHadoop expects shape as mandatory parameter with each command

shape:rect param is missing.

On Sat, Jan 3, 2015 at 8:29 AM, CreativeCreamer notifications@github.com
wrote:

In index command you need to mention "shape:rect". SpatialHadoop expecting
shape parameter with each command


Reply to this email directly or view it on GitHub
#6 (comment)
.

Thanks CreativeCreamer and kareemtarek . it works