一直在尝试使用Spark&Scala。要求是-我必须根据来自业务的列的时间戳为HBase记录设置TTL。
我无法编译我的代码&具体如下。
- 为此,我使用HBase Spark Alpha 4连接器(HBase-Spark-2.0.0-alpha4.jar(
- 将列的时间戳值转换为Epoch时间戳,并尝试在此基础上设置TTL
- 当我试图在Spark Shell中执行相同的代码时,它正在无缝执行,我能够在HBase中看到预期的输出
- 但当我尝试在Eclipse中编译它时,它失败了,并出现以下错误
[ERROR] error: missing or invalid dependency detected while loading class file 'HBaseContext.class'. [INFO] Could not access type Logging in package org.apache.spark, [INFO] because it (or its dependencies) are missing.
有人能提供解决此问题的意见吗?
在我的例子中,我重新编译了连接器:https://github.com/apache/hbase-connectors.git与基于我的项目的参数。就像:
mvn -Dspark.version=2.2.2 -Dscala.version=2.11.7 -Dscala.binary.version=2.11 clean install
没有错误。
提示:groupId与maven中心回购中的groupId不同