修复class tag无法编译bug。
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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()}")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user