You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/07/28 07:39:04 UTC

[jira] [Resolved] (SPARK-7273) The SQLContext.jsonFile() api has a problem when load a format json file?

     [ https://issues.apache.org/jira/browse/SPARK-7273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Armbrust resolved SPARK-7273.
-------------------------------------
    Resolution: Cannot Reproduce

> The SQLContext.jsonFile() api has a problem when load a format json file?
> -------------------------------------------------------------------------
>
>                 Key: SPARK-7273
>                 URL: https://issues.apache.org/jira/browse/SPARK-7273
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.3.1
>            Reporter: steven
>            Priority: Minor
>
> my code as follow:
>  val df = sqlContext.jsonFile("test.json");
> test.json content is:
>  { "name": "steven",
>     "age" : "20"
> }
> the jsonFile invoke will get a Exception as follow:
>       java.lang.RuntimeException: Failed to parse record     "age" : "20"}. Please make sure that each line of the file (or each string in the RDD) is a valid JSON object or an array of JSON objects.
> 	at scala.sys.package$.error(package.scala:27)
> 	at org.apache.spark.sql.json.JsonRDD$$anonfun$parseJson$1$$anonfun$apply$2.apply(JsonRDD.scala:313)
> 	at org.apache.spark.sql.json.JsonRDD$$anonfun$parseJson$1$$anonfun$apply$2.apply(JsonRDD.scala:307)
> is it a bug?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org