Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
d282c1eb
Commit
d282c1eb
authored
11 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Plain Diff
Merge pull request #860 from jey/sbt-ide-fixes
Fix IDE project generation under SBT
parents
5a6ac128
a9db1b7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
project/SparkBuild.scala
+12
-5
12 additions, 5 deletions
project/SparkBuild.scala
project/plugins.sbt
+2
-2
2 additions, 2 deletions
project/plugins.sbt
with
14 additions
and
7 deletions
project/SparkBuild.scala
+
12
−
5
View file @
d282c1eb
...
...
@@ -57,14 +57,14 @@ object SparkBuild extends Build {
// Allows build configuration to be set through environment variables
lazy
val
hadoopVersion
=
scala
.
util
.
Properties
.
envOrElse
(
"SPARK_HADOOP_VERSION"
,
DEFAULT_HADOOP_VERSION
)
lazy
val
isYarn
Mode
=
scala
.
util
.
Properties
.
envOrNone
(
"SPARK_WITH_YARN"
)
match
{
lazy
val
isYarn
Enabled
=
scala
.
util
.
Properties
.
envOrNone
(
"SPARK_WITH_YARN"
)
match
{
case
None
=>
DEFAULT_WITH_YARN
case
Some
(
v
)
=>
v
.
toBoolean
}
// Conditionally include the yarn sub-project
lazy
val
maybeYarn
=
if
(
isYarn
Mode
)
Seq
[
ClasspathDependency
](
yarn
)
else
Seq
[
ClasspathDependency
]()
lazy
val
maybeYarnRef
=
if
(
isYarn
Mode
)
Seq
[
ProjectReference
](
yarn
)
else
Seq
[
ProjectReference
]()
lazy
val
maybeYarn
=
if
(
isYarn
Enabled
)
Seq
[
ClasspathDependency
](
yarn
)
else
Seq
[
ClasspathDependency
]()
lazy
val
maybeYarnRef
=
if
(
isYarn
Enabled
)
Seq
[
ProjectReference
](
yarn
)
else
Seq
[
ProjectReference
]()
lazy
val
allProjects
=
Seq
[
ProjectReference
](
core
,
repl
,
examples
,
bagel
,
streaming
,
mllib
,
tools
)
++
maybeYarnRef
def
sharedSettings
=
Defaults
.
defaultSettings
++
Seq
(
...
...
@@ -253,7 +253,14 @@ object SparkBuild extends Build {
)
++
assemblySettings
++
extraAssemblySettings
def
yarnSettings
=
sharedSettings
++
Seq
(
name
:=
"spark-yarn"
,
name
:=
"spark-yarn"
)
++
extraYarnSettings
++
assemblySettings
++
extraAssemblySettings
// Conditionally include the YARN dependencies because some tools look at all sub-projects and will complain
// if we refer to nonexistent dependencies (e.g. hadoop-yarn-api from a Hadoop version without YARN).
def
extraYarnSettings
=
if
(
isYarnEnabled
)
yarnEnabledSettings
else
Seq
()
def
yarnEnabledSettings
=
Seq
(
libraryDependencies
++=
Seq
(
// Exclude rule required for all ?
"org.apache.hadoop"
%
"hadoop-client"
%
hadoopVersion
excludeAll
(
excludeJackson
,
excludeNetty
,
excludeAsm
),
...
...
@@ -261,7 +268,7 @@ object SparkBuild extends Build {
"org.apache.hadoop"
%
"hadoop-yarn-common"
%
hadoopVersion
excludeAll
(
excludeJackson
,
excludeNetty
,
excludeAsm
),
"org.apache.hadoop"
%
"hadoop-yarn-client"
%
hadoopVersion
excludeAll
(
excludeJackson
,
excludeNetty
,
excludeAsm
)
)
)
++
assemblySettings
++
extraAssemblySettings
)
def
extraAssemblySettings
()
=
Seq
(
test
in
assembly
:=
{})
++
Seq
(
mergeStrategy
in
assembly
:=
{
...
...
This diff is collapsed.
Click to expand it.
project/plugins.sbt
+
2
−
2
View file @
d282c1eb
...
...
@@ -6,9 +6,9 @@ resolvers += "Spray Repository" at "http://repo.spray.cc/"
addSbtPlugin
(
"com.eed3si9n"
%
"sbt-assembly"
%
"0.8.5"
)
addSbtPlugin
(
"com.typesafe.sbteclipse"
%
"sbteclipse-plugin"
%
"2.
1.1
"
)
addSbtPlugin
(
"com.typesafe.sbteclipse"
%
"sbteclipse-plugin"
%
"2.
2.0
"
)
addSbtPlugin
(
"com.github.mpeltonen"
%
"sbt-idea"
%
"1.
2.0
"
)
addSbtPlugin
(
"com.github.mpeltonen"
%
"sbt-idea"
%
"1.
5.1
"
)
// For Sonatype publishing
//resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment