下面是代码
def findUniqueGroupInMetadata(sc: SparkContext): Unit = {
val merchantGroup = sc.cassandraTable("local_pb", "merchant_metadata").select("group_name")
try {
val filterByWithGroup = merchantGroup.filter {
row =>
row.getStringOption("group_name") match {
case Some(s: String) if (s != null) => true
case None => false
}
}.map(row => row.getStringOption("group_name").get.capitalize)
//filterByWithGroup.take(15).foreach(data => println("merchantGroup => " + data))
filterByWithGroup.saveToCassandra("local_pb", "merchant_group", SomeColumns("group_name"))
} catch {
case e: Exception => println(e.printStackTrace())
}
Run Code Online (Sandbox Code Playgroud)
}
例外=>
java.lang.IllegalArgumentException: Multiple constructors with the same number of parameters not allowed.
at com.datastax.spark.connector.util.Reflect$.methodSymbol(Reflect.scala:16)
at com.datastax.spark.connector.util.ReflectionUtil$.constructorParams(ReflectionUtil.scala:63)
at com.datastax.spark.connector.mapper.DefaultColumnMapper.<init>(DefaultColumnMapper.scala:45)
at …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的办公系统中克隆一个GitHub项目.
set HTTPS_PROXY=http://<UN>:<PWD>@<PROXYSERVER>:<PORT>
set HTTP_PROXY=http://<UN>:<PWD>@<PROXYSERVER>:<PORT>
Run Code Online (Sandbox Code Playgroud)
我设置了HTTPS和HTTP代理也将sslVerify设置为false
[https]
sslVerify = false
[http]
sslVerify = false
Run Code Online (Sandbox Code Playgroud)
仍然,我收到"连接到github.com:443的未知SSL协议错误".
有人可以告诉我,我需要做什么?
有没有办法获取Kubernetes集群中pod的日志文件?
我知道我可以使用“kubectl exec log -f $POD_NAME”命令获取日志,但我想直接访问日志文件。
我在列中有100K +名称.我需要比较它们中的每一个以确定它们是否相同(D'souza,D'souza)或几乎相同(D'Souza,Dsouza).
我尝试将cassandra表读入RDD,并将列的笛卡尔积与其自身形成元组.但由于列大小为100K,这会导致巨大的RDD,最终火花作业就会停止.
以下是我的代码:
val valueRdd = sc.cassandraTable("keyspace", "some_table")
val dataRDD = valueRdd
.map(row => {
(
row
.getStringOption("name")
.get,
}).cache()
val cartesianResult = dataRDD cartesian dataRDD
//Followed by some compare logic. May be soundex or some other library or some fuzzy logic.
Run Code Online (Sandbox Code Playgroud)
这里的问题是笛卡尔结果将是100K*100K的量级,这是不理想的.有没有更好的方法来做到这一点?
问题陈述是识别给定数据集中的兄弟.数据集中将包含100K +数据.