SparkContext读取GBK格式的文件

sparkContext.hadoopFile(args(0),classOf[TextInputFormat], classOf[LongWritable], classOf[Text], 1)
      .map(p => new String(p._2.getBytes, 0, p._2.getLength, "GBK"))
      .map(_.split("#"))
狭路相逢勇者胜!
原文地址:https://www.cnblogs.com/amcoder/p/13919484.html