[jira] [Commented] (SPARK-5821) [SQL] CTAS command failure when your don't have write permission of the parent directory

2015-02-15 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321824#comment-14321824
 ] 

Apache Spark commented on SPARK-5821:
-

User 'yanbohappy' has created a pull request for this issue:
https://github.com/apache/spark/pull/4610

> [SQL] CTAS command failure when your don't have write permission of the 
> parent directory
> 
>
> Key: SPARK-5821
> URL: https://issues.apache.org/jira/browse/SPARK-5821
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.3.0
>Reporter: Yanbo Liang
>
> When you run CTAS command such as
> "CREATE TEMPORARY TABLE jsonTable
> USING org.apache.spark.sql.json.DefaultSource
> OPTIONS (
> path /a/b/c/d
> ) AS
> SELECT a, b FROM jt",
> you will run into failure if you don't have write permission for directory 
> /a/b/c whether d is a directory or file.



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

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



[jira] [Commented] (SPARK-5821) [SQL] CTAS command failure when your don't have write permission of the parent directory

2015-02-14 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321603#comment-14321603
 ] 

Apache Spark commented on SPARK-5821:
-

User 'yanbohappy' has created a pull request for this issue:
https://github.com/apache/spark/pull/4607

> [SQL] CTAS command failure when your don't have write permission of the 
> parent directory
> 
>
> Key: SPARK-5821
> URL: https://issues.apache.org/jira/browse/SPARK-5821
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.3.0
>Reporter: Yanbo Liang
>
> When you run CTAS command such as
> "CREATE TEMPORARY TABLE jsonTable
> USING org.apache.spark.sql.json.DefaultSource
> OPTIONS (
> path /a/b/c/d
> ) AS
> SELECT a, b FROM jt",
> you will run into failure if you don't have write permission for directory 
> /a/b/c whether d is a directory or file.



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

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



[jira] [Commented] (SPARK-5821) [SQL] CTAS command failure when your don't have write permission of the parent directory

2015-02-14 Thread Yanbo Liang (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321578#comment-14321578
 ] 

Yanbo Liang commented on SPARK-5821:


The following is one kind of exception log:
Exception in thread "main" org.apache.hadoop.mapred.FileAlreadyExistsException: 
Output directory file:/a/b/c/d already exists
at 
org.apache.hadoop.mapred.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132)
at 
org.apache.spark.rdd.PairRDDFunctions.saveAsHadoopDataset(PairRDDFunctions.scala:1053)
at 
org.apache.spark.rdd.PairRDDFunctions.saveAsHadoopFile(PairRDDFunctions.scala:954)
at 
org.apache.spark.rdd.PairRDDFunctions.saveAsHadoopFile(PairRDDFunctions.scala:863)
at org.apache.spark.rdd.RDD.saveAsTextFile(RDD.scala:1284)
at 
org.apache.spark.sql.json.DefaultSource.createRelation(JSONRelation.scala:81)
at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:300)
at 
org.apache.spark.sql.sources.CreateTempTableUsingAsSelect.run(ddl.scala:388)
at 
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:55)
at 
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:55)
at 
org.apache.spark.sql.execution.ExecutedCommand.execute(commands.scala:65)
at 
org.apache.spark.sql.SQLContext$QueryExecution.toRdd$lzycompute(SQLContext.scala:927)
at 
org.apache.spark.sql.SQLContext$QueryExecution.toRdd(SQLContext.scala:927)
at org.apache.spark.sql.DataFrameImpl.(DataFrameImpl.scala:71)
at org.apache.spark.sql.DataFrameImpl.(DataFrameImpl.scala:58)
at org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:35)
at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:778)
at org.apache.spark.sql.Test$.main(Test.scala:149)
at org.apache.spark.sql.Test.main(Test.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

> [SQL] CTAS command failure when your don't have write permission of the 
> parent directory
> 
>
> Key: SPARK-5821
> URL: https://issues.apache.org/jira/browse/SPARK-5821
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.3.0
>Reporter: Yanbo Liang
>
> When you run CTAS command such as
> "CREATE TEMPORARY TABLE jsonTable
> USING org.apache.spark.sql.json.DefaultSource
> OPTIONS (
> path /a/b/c/d
> ) AS
> SELECT a, b FROM jt",
> you will run into failure if you don't have write permission for directory 
> /a/b/c whether d is a directory or file.



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

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



[jira] [Commented] (SPARK-5821) [SQL] CTAS command failure when your don't have write permission of the parent directory

2015-02-14 Thread Yanbo Liang (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321584#comment-14321584
 ] 

Yanbo Liang commented on SPARK-5821:


This is because that INSERT OVERWRITE in external data sources will first 
delete the file /a/b/c/d and then save the generated RDD to /a/b/c/d/. However 
if we don't have write permission for directory /a/b/c, the delete will failure 
and /a/b/c/d still exists. After that, when call RDD.saveAsTextFile will throw 
exception.


> [SQL] CTAS command failure when your don't have write permission of the 
> parent directory
> 
>
> Key: SPARK-5821
> URL: https://issues.apache.org/jira/browse/SPARK-5821
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.3.0
>Reporter: Yanbo Liang
>
> When you run CTAS command such as
> "CREATE TEMPORARY TABLE jsonTable
> USING org.apache.spark.sql.json.DefaultSource
> OPTIONS (
> path /a/b/c/d
> ) AS
> SELECT a, b FROM jt",
> you will run into failure if you don't have write permission for directory 
> /a/b/c whether d is a directory or file.



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

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