yang qi dong
This commit is contained in:
yanfqidong0604 2018-10-13 11:53:10 +08:00
parent 7ba388f396
commit 43ebe287ff
6 changed files with 1 additions and 8 deletions

View File

@ -10,7 +10,6 @@
"bundle":"cn.piflow.bundle.csv.FolderCsvParser",
"properties":{
"csvPath":"hdfs://10.0.86.89:9000/aYQD/",
"header":"true",
"delimiter":",",
"schema":"id,name,gender,age"
}

View File

@ -13,7 +13,6 @@
"delimiter":",",
"schema":""
}
},
{
"uuid":"1111",

View File

@ -67,6 +67,7 @@ class CsvStringParser extends ConfigurableStop{
val schema = new PropertyDescriptor().name("schema").displayName("schema").description("The schema of the String,The delimiter is ,").defaultValue("").required(false)
descriptor = schema :: descriptor
descriptor
}
override def getIcon(): Array[Byte] = {

View File

@ -18,7 +18,6 @@ class FolderCsvParser extends ConfigurableStop{
var FolderPath:String=_
var header:Boolean=_
var delimiter: String = _
var schema: String = _
@ -66,7 +65,6 @@ class FolderCsvParser extends ConfigurableStop{
override def setProperties(map: Map[String, Any]): Unit = {
FolderPath = MapUtil.get(map,"csvPath").asInstanceOf[String]
header = MapUtil.get(map,"header").asInstanceOf[String].toBoolean
delimiter = MapUtil.get(map,"delimiter").asInstanceOf[String]
schema = MapUtil.get(map,"schema").asInstanceOf[String]
}
@ -75,8 +73,6 @@ class FolderCsvParser extends ConfigurableStop{
var descriptor : List[PropertyDescriptor] = List()
val FolderPath = new PropertyDescriptor().name("FolderPath").displayName("FolderPath").description("The path of csv Folder").defaultValue("").required(true)
descriptor = FolderPath :: descriptor
val header = new PropertyDescriptor().name("header").displayName("header").description("Whether the csv file have header or not").defaultValue("").required(true)
descriptor = header :: descriptor
val delimiter = new PropertyDescriptor().name("delimiter").displayName("delimiter").description("The delimiter of csv file").defaultValue("").required(true)
descriptor = delimiter :: descriptor
val schema = new PropertyDescriptor().name("schema").displayName("schema").description("The schema of csv file,The delimiter is ,").defaultValue("").required(true)

View File

@ -18,7 +18,6 @@ class CscFolderTest {
val flowJsonStr = FileUtil.fileReader(file)
val map = OptionUtil.getAny(JSON.parseFull(flowJsonStr)).asInstanceOf[Map[String, Any]]
println(map)
//create flow
val flowBean = FlowBean(map)
val flow = flowBean.constructFlow()

View File

@ -44,7 +44,6 @@ class CsvStringTest {
println(pid + "!!!!!!!!!!!!!!!!!!!!!")
spark.close();
}
@Test
def testFlow2json() = {