title: Task failed while writing rows
body: <p>My spark version is 1.6.2. My code is </p>
  
  <pre><code>val phoneDF = sqlContext.read.format("jdbc").options(
      Map("url" -&gt; "jdbc:db2://127.0.0.1:50000/FERTDD",
        "driver" -&gt; "com.ibm.db2.jcc.DB2Driver",
        "user" -&gt; "fwetergfdv",
        "password" -&gt; "fdgergtt",
        "dbtable" -&gt; "dsfewrrte")).load()
    phoneDF.write.parquet("hdfs://hadoop:9000/db2/dfgtt/dsfewrrte.parquet")
  </code></pre>
  
  <p>But I have got the wrong is </p>
  
  <pre><code>org.apache.spark.SparkException: Task failed while writing rows 
  Caused by: java.nio.charset.MalformedInputException: Input length = 1
  WARN scheduler.TaskSetManager: Lost task 0.0 in stage 0.0 (TID 0, localhost): org.apache.spark.SparkException: Task failed while writing rows
  </code></pre>
  
  <p>But some table is OK,I do not know why.Any help is appreciate.</p>