From ff034460868f106456a018de7bc4e4a227db9940 Mon Sep 17 00:00:00 2001 From: "yennan.liu" Date: Tue, 27 Apr 2021 11:10:28 +0800 Subject: [PATCH] update event_date type in case class (streamSocketEventToHDFSV5, StreamFromSocket5 --- spark/src/main/scala/com/yen/dev/StreamFromSocket5.scala | 2 +- .../com/yen/streamSocketToHDFS/streamSocketEventToHDFSV5.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) ))