r/DatabaseHelp • u/ConvexMacQuestus • Jan 23 '21
Problems with writing in hbase with MapReduce
Hi! I need to write into a Hbase table (that already exists) using Mapreduce and java. I am only converting data from a nljson to HBase, so I don't use a reducer. This is for a school project so I can not change the cluster configuration (and the teacher is not really quick to fix things), but it is supposed to be ok. I use maven to create a *.jar file, and I dispatch the work through yarn. However, I got an error message. It feels like I am not configuring well my environment or something, but I really could not find the problem. Maven compiles correctly.
This is the code : https://gist.github.com/Tangrenin/17b54e164e049562fc5f42322f97f607
I tried adding this line to the main function but it does nothing different : conf.addResource(new Path("/espace/Auber_PLE-203/hbase/conf/hbase-site.xml"));
Is there a problem to fix in my code, or could it actually by the because of the cluster configuration? Otherwise is there maybe another more appropriate way to write in HBase here ?
I would greatly appreciate any help!
Here is the error message :https://gist.github.com/Tangrenin/2ac850e377ff92a289a31f80485c762f
View all comments
Show parent comment
1
u/ConvexMacQuestus Jan 23 '21 edited Jan 23 '21
Thanks for your reply! Sorry for the noob questions but : I'm not sure what exactly you suggest that I put on hdfs.
Also, I'm not sure to understand what you ask (sorry! I'm not yet familiar with this site.xml file in this context) : do you mean that I check that this site.xml file is on the path I specified in each node of the cluster?
Edit: Additional info, other MapReduce programs that I launch on the cluster work. Hbase shell works too. Is that consistent with what you suggest?
Edit 2 : I have checked on every machine, there is indeed a hbase-site.xml file at the Path I mentioned