找不到spark-hbase mvn依赖性 [英] Can't find spark-hbase mvn dependency

查看:256
本文介绍了找不到spark-hbase mvn依赖性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Spark在HBase中读取表.我添加了以下依赖项:

I want to read table in HBase using Spark. I added the following dependency:

libraryDependencies += "org.apache.hbase" %% "hbase-spark" % "2.0.0-SNAPSHOT"

如hbase 网站所述,但该依赖关系可以不能解决!

as mentioned in hbase website, but the dependency can't be resolved !!

我还尝试了不同的版本(1.2.0、1.1.2),但没有用.

I also tried different versions (1.2.0, 1.1.2) and it didn't work.

推荐答案

看起来hbase-spark不在maven Central中,这是将从中检索依赖关系的默认存储库.

It doesn't look like hbase-spark is in maven central, which is the default repository that dependencies will be retrieved from.

您需要配置构建管理工具(不清楚您是使用Maven还是SBT)以使用正确的存储库.

You'll need to configure your build management tool (unclear if you're using Maven or SBT) to use the correct repository.

项目页面中,您可以使用

  • https://repository.apache.org/content/repositories/snapshots for snapshots
  • https://repository.apache.org/content/repositories/releases for releases

但是,目前看来,只有快照可用.

Currently, however, it looks like only snapshots are available.

此外,如以下作者的评论中所述,该行

Additionally, as mentioned in the comment from the author below, the line

libraryDependencies += "org.apache.hbase" %% "hbase-spark" % "2.0.0-SNAPSHOT"

实际上应该是

libraryDependencies += "org.apache.hbase" % "hbase-spark" % "2.0.0-SNAPSHOT"

在这种情况下,不需要双精度%,因为您不想将scala版本附加到工件名称上.

The double % is not needed in this case as you do no want to append the scala version to the artifact name.

这篇关于找不到spark-hbase mvn依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆