You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Alexander Nakos (JIRA)" <ji...@apache.org> on 2015/05/29 14:24:19 UTC

[jira] [Comment Edited] (SPARK-7944) Spark-Shell 2.11 1.4.0-RC-03 does not add jars to class path

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

Alexander Nakos edited comment on SPARK-7944 at 5/29/15 12:23 PM:
------------------------------------------------------------------

Surely - sorry about that.  I started up the shell as follows:

{code}
bin/spark-shell --master yarn-client --jars /Users/alex/.m2/repository/com/twitter/algebird-core_2.11/0.9.0/algebird-core_2.11-0.9.0.jar
{code}

There was no obvious error present in the shell output. When I got the scala prompt from the console, I tried to import some classes and got the following error:

{code}
scala> import com.twitter.algebird._
<console>:20: error: object algebird is not a member of package com.twitter
       import com.twitter.algebird._
{code}

Trying to manually add the jar to the class path also proved to be fruitless:

{code}
scala> :cp /Users/alex/.m2/repository/com/twitter/algebird-core_2.11/0.9.0/algebird-core_2.11-0.9.0.jar
Added '/Users/alex/.m2/repository/com/twitter/algebird-core_2.11/0.9.0/algebird-core_2.11-0.9.0.jar'.  Your new classpath is:
".:/opt/spark/spark-1.4.0-RC3-hadoop2.3:/Users/alex/.m2/repository/com/twitter/algebird-core_2.11/0.9.0/algebird-core_2.11-0.9.0.jar"
Nothing to replay.

scala> import com.twitter.algebird._
<console>:8: error: object algebird is not a member of package com.twitter
       import com.twitter.algebird._
                          ^
{code}



was (Author: anakos@gmail.com):
Surely - sorry about that.  I started up the shell as follows:

{code}
bin/spark-shell --master yarn-client --jars /Users/alex/.m2/repository/com/twitter/algebird-core_2.11/0.9.0/algebird-core_2.11-0.9.0.jar
{code}

There was no obvious error present in the shell output. When I got the scala prompt from the console, I tried to import some classes and got the following error:

{code}
scala> import com.twitter.algebird._
<console>:20: error: object algebird is not a member of package com.twitter
       import com.twitter.algebird._
{code}



> Spark-Shell 2.11 1.4.0-RC-03 does not add jars to class path
> ------------------------------------------------------------
>
>                 Key: SPARK-7944
>                 URL: https://issues.apache.org/jira/browse/SPARK-7944
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Shell
>    Affects Versions: 1.3.1, 1.4.0
>         Environment: scala 2.11
>            Reporter: Alexander Nakos
>
> When I run the spark-shell with the --jars argument and supply a path to a single jar file, none of the classes in the jar are available in the REPL.
> I have encountered this same behaviour in both 1.3.1 and 1.4.0_RC-03 builds for scala 2.11. I have yet to do a 1.4.0 RC-03 build for scala 2.10, but the contents of the jar are available in the 1.3.1_2.10 REPL.



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