parent
3e06a22fd0
commit
e9f354457f
|
@ -5,6 +5,7 @@ import cn.piflow.conf.util.{ImageUtil, MapUtil}
|
|||
import cn.piflow.conf.{ConfigurableStop, PortEnum, StopGroup}
|
||||
import cn.piflow.{JobContext, JobInputStream, JobOutputStream, ProcessContext}
|
||||
import org.apache.spark.sql.{DataFrame, SparkSession}
|
||||
import org.neo4j.driver.v1._
|
||||
|
||||
|
||||
class PutNeo4j extends ConfigurableStop{
|
||||
|
@ -19,7 +20,7 @@ class PutNeo4j extends ConfigurableStop{
|
|||
var labelName : String =""
|
||||
|
||||
override def perform(in: JobInputStream, out: JobOutputStream, pec: JobContext): Unit = {
|
||||
/*val spark: SparkSession = pec.get[SparkSession]()
|
||||
val spark: SparkSession = pec.get[SparkSession]()
|
||||
val inDf: DataFrame = in.read()
|
||||
|
||||
val fileNames: Array[String] = inDf.columns
|
||||
|
@ -62,7 +63,7 @@ class PutNeo4j extends ConfigurableStop{
|
|||
transaction.close()
|
||||
session.close()
|
||||
driver.close()
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
override def setProperties(map: Map[String, Any]): Unit = {
|
||||
|
|
|
@ -4,6 +4,7 @@ import cn.piflow.conf.bean.PropertyDescriptor
|
|||
import cn.piflow.conf.util.{ImageUtil, MapUtil}
|
||||
import cn.piflow.conf.{ConfigurableStop, PortEnum, StopGroup}
|
||||
import cn.piflow.{JobContext, JobInputStream, JobOutputStream, ProcessContext}
|
||||
import org.neo4j.driver.v1._
|
||||
|
||||
class RunCypher extends ConfigurableStop{
|
||||
override val authorEmail: String = "yangqidong@cnic.cn"
|
||||
|
@ -18,7 +19,7 @@ class RunCypher extends ConfigurableStop{
|
|||
|
||||
override def perform(in: JobInputStream, out: JobOutputStream, pec: JobContext): Unit = {
|
||||
|
||||
/*val cqls: Array[String] = cql.split(";")
|
||||
val cqls: Array[String] = cql.split(";")
|
||||
|
||||
var driver: Driver = GraphDatabase.driver(url,AuthTokens.basic(userName,password))
|
||||
var session: Session = null
|
||||
|
@ -41,7 +42,7 @@ class RunCypher extends ConfigurableStop{
|
|||
transaction.close()
|
||||
session.close()
|
||||
driver.close()
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
override def setProperties(map: Map[String, Any]): Unit = {
|
||||
|
|
Loading…
Reference in New Issue