When executed on windows, option ( "timestampFormat", "yyyy / MM / dd HH: mm: ss ZZ") must bring, otherwise error:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern component: XX。
使用比如:
val df1 = spark.read.format("json").option("timestampFormat", "yyyy/MM/dd HH:mm:ss ZZ").load("hdfs://192.168.137.141:9000/data/people.json")
df1.show()