You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/07/21 23:01:04 UTC
[jira] [Commented] (SPARK-9232) Duplicate code in JSONRelation
[ https://issues.apache.org/jira/browse/SPARK-9232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635807#comment-14635807 ]
Apache Spark commented on SPARK-9232:
-------------------------------------
User 'andrewor14' has created a pull request for this issue:
https://github.com/apache/spark/pull/7576
> Duplicate code in JSONRelation
> ------------------------------
>
> Key: SPARK-9232
> URL: https://issues.apache.org/jira/browse/SPARK-9232
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.4.0
> Reporter: Andrew Or
> Assignee: Andrew Or
> Priority: Minor
>
> The following block appears identically in two places:
> {code}
> var success: Boolean = false
> try {
> success = fs.delete(filesystemPath, true)
> } catch {
> case e: IOException =>
> throw new IOException(
> s"Unable to clear output directory ${filesystemPath.toString} prior"
> + s" to writing to JSON table:\n${e.toString}")
> }
> if (!success) {
> throw new IOException(
> s"Unable to clear output directory ${filesystemPath.toString} prior"
> + s" to writing to JSON table.")
> }
> }
> {code}
> https://github.com/apache/spark/blob/e5d2c37c68ac00a57c2542e62d1c5b4ca267c89e/sql/core/src/main/scala/org/apache/spark/sql/json/JSONRelation.scala#L72
> https://github.com/apache/spark/blob/e5d2c37c68ac00a57c2542e62d1c5b4ca267c89e/sql/core/src/main/scala/org/apache/spark/sql/json/JSONRelation.scala#L131
--
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