摘要: 有个朋友给了这样一段代码: 编译的时候会报错: 但如果把 case class 定义放到main方法外面,编译就没问题。 我猜测和DataSetHolder.toDF时候在scala里面对泛型的使用有关系,但没仔细调查验证。在此暂存一下 阅读全文
posted @ 2018-02-09 14:06 JimTheMan 阅读(796) 评论(0) 推荐(0)
摘要: try catch是代码里面非常实用捕获异常的方式 in java: try{} catch (*Exception e) {e.printStackTrace(); dosomething(); } finally{} in scala: try{} catch { case e : * Exce 阅读全文
posted @ 2018-02-09 00:06 JimTheMan 阅读(119) 评论(0) 推荐(0)