The hbase object is not included in the org.apache.hadoop package when compiling scala

I use the HBase API in my scala project, but encounter a compilation error when I import hbase

import org.apache.hadoop.hbase

the compilation result says that "the hbase object is not a member of the org.apache.hadoop package"

I use sbt to create my project, this is part of build.sbt:

libraryDependencies ++= Seq(
    "org.apache.hadoop" % "hadoop-core" % "1.2.1",
    "org.apache.hbase" % "hbase" % "0.99.2"
)

and I will compile the project as follows: sbt compile

Am I missing something vital?

+4
source share
1 answer

I believe what you need hbase-client, so you should also include this dependency:

"org.apache.hbase" % "hbase-client" % "0.99.2"

And maybe more, depending on what you are trying to compile.

+6
source

All Articles