【异常】Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern c

在windows上执行的时候,option(“timestampFormat”, “yyyy/MM/dd HH:mm:ss ZZ”)必须带上,不然报错:

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()

posted @ 2019-12-24 22:51  lemon胡  阅读(2381)  评论(0编辑  收藏  举报