[jira] [Commented] (SPARK-12666) spark-shell --packages cannot load artifacts which are publishLocal'd by SBT

2016-09-29 Thread Alexander Temerev (JIRA)

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

Alexander Temerev commented on SPARK-12666:
---

If you came here for a workaround for 2.0.0 (like I did), here it is: publish 
your artifacts using sbt publishM2 instead of publish-local. This way they will 
end up in local Maven (and not Ivy2) repository, which works fine.

> spark-shell --packages cannot load artifacts which are publishLocal'd by SBT
> 
>
> Key: SPARK-12666
> URL: https://issues.apache.org/jira/browse/SPARK-12666
> Project: Spark
>  Issue Type: Bug
>  Components: Spark Submit
>Affects Versions: 1.5.1, 1.6.0
>Reporter: Josh Rosen
>Assignee: Bryan Cutler
> Fix For: 2.0.1, 2.1.0
>
>
> Symptom:
> I cloned the latest master of {{spark-redshift}}, then used {{sbt 
> publishLocal}} to publish it to my Ivy cache. When I tried running 
> {{./bin/spark-shell --packages 
> com.databricks:spark-redshift_2.10:0.5.3-SNAPSHOT}} to load this dependency 
> into {{spark-shell}}, I received the following cryptic error:
> {code}
> Exception in thread "main" java.lang.RuntimeException: [unresolved 
> dependency: com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: configuration 
> not found in com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: 'default'. It 
> was required from org.apache.spark#spark-submit-parent;1.0 default]
>   at 
> org.apache.spark.deploy.SparkSubmitUtils$.resolveMavenCoordinates(SparkSubmit.scala:1009)
>   at 
> org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:286)
>   at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:153)
>   at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
>   at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}
> I think the problem here is that Spark is declaring a dependency on the 
> spark-redshift artifact using the {{default}} Ivy configuration. Based on my 
> admittedly limited understanding of Ivy, the default configuration will be 
> the only configuration defined in an Ivy artifact if that artifact defines no 
> other configurations. Thus, for Maven artifacts I think the default 
> configuration will end up mapping to Maven's regular JAR dependency (i.e. 
> Maven artifacts don't declare Ivy configurations so they implicitly have the 
> {{default}} configuration) but for Ivy artifacts I think we can run into 
> trouble when loading artifacts which explicitly define their own 
> configurations, since those artifacts might not have a configuration named 
> {{default}}.
> I spent a bit of time playing around with the SparkSubmit code to see if I 
> could fix this but wasn't able to completely resolve the issue.
> /cc [~brkyvz] (ping me offline and I can walk you through the repo in person, 
> if you'd like)



--
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-12666) spark-shell --packages cannot load artifacts which are publishLocal'd by SBT

2016-05-31 Thread Apache Spark (JIRA)

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

Apache Spark commented on SPARK-12666:
--

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

> spark-shell --packages cannot load artifacts which are publishLocal'd by SBT
> 
>
> Key: SPARK-12666
> URL: https://issues.apache.org/jira/browse/SPARK-12666
> Project: Spark
>  Issue Type: Bug
>  Components: Spark Submit
>Affects Versions: 1.5.1, 1.6.0
>Reporter: Josh Rosen
>
> Symptom:
> I cloned the latest master of {{spark-redshift}}, then used {{sbt 
> publishLocal}} to publish it to my Ivy cache. When I tried running 
> {{./bin/spark-shell --packages 
> com.databricks:spark-redshift_2.10:0.5.3-SNAPSHOT}} to load this dependency 
> into {{spark-shell}}, I received the following cryptic error:
> {code}
> Exception in thread "main" java.lang.RuntimeException: [unresolved 
> dependency: com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: configuration 
> not found in com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: 'default'. It 
> was required from org.apache.spark#spark-submit-parent;1.0 default]
>   at 
> org.apache.spark.deploy.SparkSubmitUtils$.resolveMavenCoordinates(SparkSubmit.scala:1009)
>   at 
> org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:286)
>   at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:153)
>   at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
>   at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}
> I think the problem here is that Spark is declaring a dependency on the 
> spark-redshift artifact using the {{default}} Ivy configuration. Based on my 
> admittedly limited understanding of Ivy, the default configuration will be 
> the only configuration defined in an Ivy artifact if that artifact defines no 
> other configurations. Thus, for Maven artifacts I think the default 
> configuration will end up mapping to Maven's regular JAR dependency (i.e. 
> Maven artifacts don't declare Ivy configurations so they implicitly have the 
> {{default}} configuration) but for Ivy artifacts I think we can run into 
> trouble when loading artifacts which explicitly define their own 
> configurations, since those artifacts might not have a configuration named 
> {{default}}.
> I spent a bit of time playing around with the SparkSubmit code to see if I 
> could fix this but wasn't able to completely resolve the issue.
> /cc [~brkyvz] (ping me offline and I can walk you through the repo in person, 
> if you'd like)



--
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-12666) spark-shell --packages cannot load artifacts which are publishLocal'd by SBT

2016-05-31 Thread Bryan Cutler (JIRA)

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

Bryan Cutler commented on SPARK-12666:
--

This seems like it is more of an issue with SBT publishLocal, as it publishes 
an ivy.xml file without a "default" conf.  Like this, for example

{noformat}

http://ant.apache.org/ivy/extra;>
...











...
{noformat}

If this file had a conf name="default", or if there were no confs defined an 
implicit "default" would be used.  But since it is missing, there is an error 
when resolving.  I think it's reasonable for Spark to expect a "default" conf 
to exist, but we can make it a bit more robust to handle cases like this where 
it doesn't exist.  I'll post a PR for this.

> spark-shell --packages cannot load artifacts which are publishLocal'd by SBT
> 
>
> Key: SPARK-12666
> URL: https://issues.apache.org/jira/browse/SPARK-12666
> Project: Spark
>  Issue Type: Bug
>  Components: Spark Submit
>Affects Versions: 1.5.1, 1.6.0
>Reporter: Josh Rosen
>
> Symptom:
> I cloned the latest master of {{spark-redshift}}, then used {{sbt 
> publishLocal}} to publish it to my Ivy cache. When I tried running 
> {{./bin/spark-shell --packages 
> com.databricks:spark-redshift_2.10:0.5.3-SNAPSHOT}} to load this dependency 
> into {{spark-shell}}, I received the following cryptic error:
> {code}
> Exception in thread "main" java.lang.RuntimeException: [unresolved 
> dependency: com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: configuration 
> not found in com.databricks#spark-redshift_2.10;0.5.3-SNAPSHOT: 'default'. It 
> was required from org.apache.spark#spark-submit-parent;1.0 default]
>   at 
> org.apache.spark.deploy.SparkSubmitUtils$.resolveMavenCoordinates(SparkSubmit.scala:1009)
>   at 
> org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:286)
>   at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:153)
>   at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
>   at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}
> I think the problem here is that Spark is declaring a dependency on the 
> spark-redshift artifact using the {{default}} Ivy configuration. Based on my 
> admittedly limited understanding of Ivy, the default configuration will be 
> the only configuration defined in an Ivy artifact if that artifact defines no 
> other configurations. Thus, for Maven artifacts I think the default 
> configuration will end up mapping to Maven's regular JAR dependency (i.e. 
> Maven artifacts don't declare Ivy configurations so they implicitly have the 
> {{default}} configuration) but for Ivy artifacts I think we can run into 
> trouble when loading artifacts which explicitly define their own 
> configurations, since those artifacts might not have a configuration named 
> {{default}}.
> I spent a bit of time playing around with the SparkSubmit code to see if I 
> could fix this but wasn't able to completely resolve the issue.
> /cc [~brkyvz] (ping me offline and I can walk you through the repo in person, 
> if you'd like)



--
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