修复class tag无法编译bug。

This commit is contained in:
wanglihui
2021-04-14 14:20:41 +08:00
parent f0cebd8e1c
commit 51d2549902
4 changed files with 13 additions and 11 deletions

View File

@@ -36,7 +36,6 @@ object ApplicationConfig {
val READ_CLICKHOUSE_MAX_TIME: Long = config.getLong("read.clickhouse.max.time")
val READ_CLICKHOUSE_MIN_TIME: Long = config.getLong("read.clickhouse.min.time")
val ARANGODB_READ_LIMIT: Int = config.getInt("arangoDB.read.limit")
val UPDATE_ARANGO_BATCH: Int = config.getInt("update.arango.batch")
val RECENT_COUNT_HOUR: Int = config.getInt("recent.count.hour")
val DISTINCT_CLIENT_IP_NUM: Int = config.getInt("distinct.client.ip.num")

View File

@@ -6,11 +6,13 @@ import cn.ac.iie.spark.rdd.{ArangoRdd, ReadOptions}
import cn.ac.iie.utils.SparkSessionUtil.sparkContext
import org.slf4j.LoggerFactory
import scala.reflect.ClassTag
object BaseArangoData {
private val LOG = LoggerFactory.getLogger(BaseArangoData.getClass)
private val options = ReadOptions(ApplicationConfig.ARANGODB_DB_NAME)
def loadArangoRdd[T](name:String): ArangoRdd[T] ={
def loadArangoRdd[T: ClassTag](name:String): ArangoRdd[T] ={
val value = ArangoSpark.load[T](sparkContext, name, options)
LOG.warn(s"读取$name arangoDb:${value.count()}")

View File

@@ -19,13 +19,13 @@ object UpdateDocument {
def update(): Unit = {
try {
// updateDocument("FQDN", getVertexFqdnRow, mergeVertexFqdn)
updateDocument("FQDN", getVertexFqdnRow, mergeVertexFqdn)
// updateDocument("SUBSCRIBER", getVertexSubidRow, mergeVertexSubid)
updateDocument("SUBSCRIBER", getVertexSubidRow, mergeVertexSubid)
// insertFrameIp()
insertFrameIp()
// updateDocument("R_LOCATE_SUBSCRIBER2IP", getRelationSubidLocateIpRow, mergeRelationSubidLocateIp)
updateDocument("R_LOCATE_SUBSCRIBER2IP", getRelationSubidLocateIpRow, mergeRelationSubidLocateIp)
updateDocument("R_LOCATE_FQDN2IP", getRelationFqdnLocateIpRow, mergeRelationFqdnLocateIp)