Added finalize to free dtree from JNI (there are many mappers and if they don't free their stuff, memory leaks occur and then the mappers take up all the memory and the mappers get killed, probably hadoop has some mechanism to kill them because of that). Not sure if this is the solution for this, but we'll try and see.