diff --git a/spark/src/main/scala/com/yen/dev/StreamFromSocket5.scala b/spark/src/main/scala/com/yen/dev/StreamFromSocket5.scala index 2bdb0a8..82c0c71 100644 --- a/spark/src/main/scala/com/yen/dev/StreamFromSocket5.scala +++ b/spark/src/main/scala/com/yen/dev/StreamFromSocket5.scala @@ -30,7 +30,7 @@ object StreamFromSocket5 extends App { val eventSchema = StructType(List( StructField("id", IntegerType), - StructField("event_date", LongType), + StructField("event_date", StringType), StructField("msg", StringType) )) diff --git a/spark/src/main/scala/com/yen/streamSocketToHDFS/streamSocketEventToHDFSV5.scala b/spark/src/main/scala/com/yen/streamSocketToHDFS/streamSocketEventToHDFSV5.scala index 7f6db60..5791f44 100644 --- a/spark/src/main/scala/com/yen/streamSocketToHDFS/streamSocketEventToHDFSV5.scala +++ b/spark/src/main/scala/com/yen/streamSocketToHDFS/streamSocketEventToHDFSV5.scala @@ -30,7 +30,7 @@ object streamSocketEventToHDFSV5 extends App { val eventSchema = StructType(List( StructField("id", IntegerType), - StructField("event_date", LongType), + StructField("event_date", StringType), StructField("msg", StringType) ))