qidong yang
This commit is contained in:
yanfqidong0604 2019-03-26 15:03:46 +08:00
parent 3e06a22fd0
commit e9f354457f
2 changed files with 6 additions and 4 deletions

View File

@ -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 = {

View File

@ -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 = {