0

I'm using the HBase Client API to connect to a remote cluster and do some operations. This project will certainly require hbase and hadoop-core jars. And my question is whether I should use 'java' command and handle all the dependencies (using maven shaded plugin, or set the classpath environment), or there's a magic utility command to handle all these for me?

Take map-redcue job for an instance. Typically the main class will extend Configured and implement Tool. The job will be executed by 'hadoop jar' command and all environment and hadoop-core dependency are at hand. This approach also handles the common command line parsing for me, and I can easily get an instance of Configuration by 'this.getConf()';

I'm wondering whether HBase provides the same utiliy command?

1 Answer 1

1

You can use HBase in two modes - one as a source/target in a map/reduce job - in which case you invoke it as you would any other map/reduce job. The second way is sort of like a regular database in which case you use the HBase client API and invoke it like any other regular java program

2
  • Exactly. Why would HBase provide duplicate functionality? Use your build tool to make shaded jar that contains all of your dependencies, and use the hadoop command for your M/R jobs.
    – David
    Feb 12, 2014 at 16:59
  • 1
    This is not duplicate functionality these are different access patterns - one is random read/write and the other is batch processing. HBase accommodates both Feb 13, 2014 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.