You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Matei Zaharia <ma...@gmail.com> on 2013/07/16 02:41:31 UTC

Discussion: Consolidating Spark's build system

Hi all,

I wanted to bring up a topic that there isn't a 100% perfect solution for, but that's been bothering the team at Berkeley for a while: consolidating Spark's build system. Right now we have two build systems, Maven and SBT, that need to be maintained together on each change. We added Maven a while back to try it as an alternative to SBT and to get some better publishing options, like Debian packages and classifiers, but we've found that 1) SBT has actually been fairly stable since then (unlike the rapid release cycle before) and 2) classifiers don't actually seem to work for publishing versions of Spark with different dependencies (you need to give them different artifact names). More importantly though, because maintaining two systems is confusing, it would be good to converge to just one soon, or to find a better way of maintaining the builds.

In terms of which system to go for, neither is perfect, but I think many of us are leaning toward SBT, because it's noticeably faster and it has less code to maintain. If we do this, however, I'd really like to understand the use cases for Maven, and make sure that either we can support them in SBT or we can do them externally. Can people say a bit about that? The ones I've thought of are the following:

- Debian packaging -- this is certainly nice, but there are some plugins for SBT too so may be possible to migrate.
- BigTop integration; I'm not sure how much this relies on Maven but Cos has been using it.
- Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't really work if you want to publish to Maven Central; you still need two artifact names because the artifacts have different dependencies. However, more importantly, we'd like to make Spark work with all Hadoop versions by using hadoop-client and a bit of reflection, similar to how projects like Parquet handle this.

Are there other things I'm missing here, or other ways to handle this problem that I'm missing? For example, one possibility would be to keep the Maven build scripts in a separate repo managed by the people who want to use them, or to have some dedicated maintainers for them. But because this is often an issue, I do think it would be simpler for the project to have one build system in the long term. In either case though, we will keep the project structure compatible with Maven, so people who want to use it internally should be fine; I think that we've done this well and, if anything, we've simplified the Maven build process lately by removing Twirl.

Anyway, as I said, I don't think any solution is perfect here, but I'm curious to hear your input.

Matei

Re: Discussion: Consolidating Spark's build system

Posted by Matei Zaharia <ma...@gmail.com>.
Henry, our hope is to avoid having to create two different Hadoop profiles altogether by using the hadoop-client package and reflection. This is what projects like Parquet (https://github.com/Parquet) are doing. If this works out, you get one artifact that can link to any Hadoop version that includes hadoop-client (which I believe means 1.2 onward).

Matei

On Jul 16, 2013, at 1:26 PM, Henry Saputra <he...@gmail.com> wrote:

> Hi Matei,
> 
> Thanks for bringing up this build system discussion.
> 
> Some CI tools like hudson can support multi Maven profiles via different jobs so we could deliver different release artifacts for different Maven profiles. 
> I believe it should be fine to have Spark-hadoop1 and Spark-haddop2 release modules.
> Just curious how actually SBT avoid/resolve this problem? To support for different hadoop versions we need to change in the SparkBuild.scala to make it work.
> 
> 
> And as far as maintaining just one build system I am +1 for it. I prefer to use Maven bc it has better dependency management than SBT.
> 
> Thanks,
> 
> Henry
> 
> 
> On Mon, Jul 15, 2013 at 5:41 PM, Matei Zaharia <ma...@gmail.com> wrote:
> Hi all,
> 
> I wanted to bring up a topic that there isn't a 100% perfect solution for, but that's been bothering the team at Berkeley for a while: consolidating Spark's build system. Right now we have two build systems, Maven and SBT, that need to be maintained together on each change. We added Maven a while back to try it as an alternative to SBT and to get some better publishing options, like Debian packages and classifiers, but we've found that 1) SBT has actually been fairly stable since then (unlike the rapid release cycle before) and 2) classifiers don't actually seem to work for publishing versions of Spark with different dependencies (you need to give them different artifact names). More importantly though, because maintaining two systems is confusing, it would be good to converge to just one soon, or to find a better way of maintaining the builds.
> 
> In terms of which system to go for, neither is perfect, but I think many of us are leaning toward SBT, because it's noticeably faster and it has less code to maintain. If we do this, however, I'd really like to understand the use cases for Maven, and make sure that either we can support them in SBT or we can do them externally. Can people say a bit about that? The ones I've thought of are the following:
> 
> - Debian packaging -- this is certainly nice, but there are some plugins for SBT too so may be possible to migrate.
> - BigTop integration; I'm not sure how much this relies on Maven but Cos has been using it.
> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't really work if you want to publish to Maven Central; you still need two artifact names because the artifacts have different dependencies. However, more importantly, we'd like to make Spark work with all Hadoop versions by using hadoop-client and a bit of reflection, similar to how projects like Parquet handle this.
> 
> Are there other things I'm missing here, or other ways to handle this problem that I'm missing? For example, one possibility would be to keep the Maven build scripts in a separate repo managed by the people who want to use them, or to have some dedicated maintainers for them. But because this is often an issue, I do think it would be simpler for the project to have one build system in the long term. In either case though, we will keep the project structure compatible with Maven, so people who want to use it internally should be fine; I think that we've done this well and, if anything, we've simplified the Maven build process lately by removing Twirl.
> 
> Anyway, as I said, I don't think any solution is perfect here, but I'm curious to hear your input.
> 
> Matei
> 
> --
> You received this message because you are subscribed to the Google Groups "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


Re: Discussion: Consolidating Spark's build system

Posted by Henry Saputra <he...@gmail.com>.
Hi Matei,

Thanks for bringing up this build system discussion.

Some CI tools like hudson can support multi Maven profiles via different
jobs so we could deliver different release artifacts for different Maven
profiles.
I believe it should be fine to have Spark-hadoop1 and Spark-haddop2 release
modules.
Just curious how actually SBT avoid/resolve this problem? To support for
different hadoop versions we need to change in the SparkBuild.scala to make
it work.


And as far as maintaining just one build system I am +1 for it. I prefer to
use Maven bc it has better dependency management than SBT.

Thanks,

Henry


On Mon, Jul 15, 2013 at 5:41 PM, Matei Zaharia <ma...@gmail.com>wrote:

> Hi all,
>
> I wanted to bring up a topic that there isn't a 100% perfect solution for,
> but that's been bothering the team at Berkeley for a while: consolidating
> Spark's build system. Right now we have two build systems, Maven and SBT,
> that need to be maintained together on each change. We added Maven a while
> back to try it as an alternative to SBT and to get some better publishing
> options, like Debian packages and classifiers, but we've found that 1) SBT
> has actually been fairly stable since then (unlike the rapid release cycle
> before) and 2) classifiers don't actually seem to work for publishing
> versions of Spark with different dependencies (you need to give them
> different artifact names). More importantly though, because maintaining two
> systems is confusing, it would be good to converge to just one soon, or to
> find a better way of maintaining the builds.
>
> In terms of which system to go for, neither is perfect, but I think many
> of us are leaning toward SBT, because it's noticeably faster and it has
> less code to maintain. If we do this, however, I'd really like to
> understand the use cases for Maven, and make sure that either we can
> support them in SBT or we can do them externally. Can people say a bit
> about that? The ones I've thought of are the following:
>
> - Debian packaging -- this is certainly nice, but there are some plugins
> for SBT too so may be possible to migrate.
> - BigTop integration; I'm not sure how much this relies on Maven but Cos
> has been using it.
> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't
> really work if you want to publish to Maven Central; you still need two
> artifact names because the artifacts have different dependencies. However,
> more importantly, we'd like to make Spark work with all Hadoop versions by
> using hadoop-client and a bit of reflection, similar to how projects like
> Parquet handle this.
>
> Are there other things I'm missing here, or other ways to handle this
> problem that I'm missing? For example, one possibility would be to keep the
> Maven build scripts in a separate repo managed by the people who want to
> use them, or to have some dedicated maintainers for them. But because this
> is often an issue, I do think it would be simpler for the project to have
> one build system in the long term. In either case though, we will keep the
> project structure compatible with Maven, so people who want to use it
> internally should be fine; I think that we've done this well and, if
> anything, we've simplified the Maven build process lately by removing Twirl.
>
> Anyway, as I said, I don't think any solution is perfect here, but I'm
> curious to hear your input.
>
> Matei
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Re: Discussion: Consolidating Spark's build system

Posted by Shane Huang <sh...@gmail.com>.
Hi Matai.

I myself would prefer Maven than SBT.

On one hand, from my own experience Maven is better at resolving lib
dependencies.  I used both SBT and Maven to build spark. When I use SBT I
often have to add customized resolvers in build script to make it pass,
while I don't have to do that for maven. (Maybe I missed something here...
I'm not an SBT expert anyway :( )

On the other hand, it seems the open source community is much more familiar
with maven than SBT. If we'd like more people to contribute to Spark, I
think using maven is a good idea.

Thanks,
Shane
shengsheng.huang@intel.com


On Tue, Jul 16, 2013 at 8:41 AM, Matei Zaharia <ma...@gmail.com>wrote:

> Hi all,
>
> I wanted to bring up a topic that there isn't a 100% perfect solution for,
> but that's been bothering the team at Berkeley for a while: consolidating
> Spark's build system. Right now we have two build systems, Maven and SBT,
> that need to be maintained together on each change. We added Maven a while
> back to try it as an alternative to SBT and to get some better publishing
> options, like Debian packages and classifiers, but we've found that 1) SBT
> has actually been fairly stable since then (unlike the rapid release cycle
> before) and 2) classifiers don't actually seem to work for publishing
> versions of Spark with different dependencies (you need to give them
> different artifact names). More importantly though, because maintaining two
> systems is confusing, it would be good to converge to just one soon, or to
> find a better way of maintaining the builds.
>
> In terms of which system to go for, neither is perfect, but I think many
> of us are leaning toward SBT, because it's noticeably faster and it has
> less code to maintain. If we do this, however, I'd really like to
> understand the use cases for Maven, and make sure that either we can
> support them in SBT or we can do them externally. Can people say a bit
> about that? The ones I've thought of are the following:
>
> - Debian packaging -- this is certainly nice, but there are some plugins
> for SBT too so may be possible to migrate.
> - BigTop integration; I'm not sure how much this relies on Maven but Cos
> has been using it.
> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't
> really work if you want to publish to Maven Central; you still need two
> artifact names because the artifacts have different dependencies. However,
> more importantly, we'd like to make Spark work with all Hadoop versions by
> using hadoop-client and a bit of reflection, similar to how projects like
> Parquet handle this.
>
> Are there other things I'm missing here, or other ways to handle this
> problem that I'm missing? For example, one possibility would be to keep the
> Maven build scripts in a separate repo managed by the people who want to
> use them, or to have some dedicated maintainers for them. But because this
> is often an issue, I do think it would be simpler for the project to have
> one build system in the long term. In either case though, we will keep the
> project structure compatible with Maven, so people who want to use it
> internally should be fine; I think that we've done this well and, if
> anything, we've simplified the Maven build process lately by removing Twirl.
>
> Anyway, as I said, I don't think any solution is perfect here, but I'm
> curious to hear your input.
>
> Matei




-- 
*Shane Huang *
*Intel Asia-Pacific R&D Ltd.*
*Email: shengsheng.huang@intel.com*

Re: Discussion: Consolidating Spark's build system

Posted by Prashant Sharma <sc...@gmail.com>.
Hello cos,

I have a few questions inline!


On Tue, Jul 16, 2013 at 6:53 AM, Konstantin Boudnik <co...@apache.org> wrote:

> Hi Matei.
>
> The reason I am using Maven for Bigtop packaging and not SBT is because the
> the former's dependency management is clean and let me build a proper
> assembly
> with only relevant dependencies: e.g. no Hadoop if I don't need to, etc
>

Isn't this achievable using SBT? I think it should be possible to define
tasksets for that. Then we should be able to do something we do with
maven(mvn -Pwithout-Hadoop) like sbt package-wo-hadoop etc. I am not a SBT
Ninja but I have seen it somewhere it is possible to extend tasks. I guess
https://github.com/harrah/xsbt/wiki/Getting-Started-Custom-Settings#extending-but-not-replacing-a-task
 !


> I don't hold onto the packaging the way it is done in the current maven
> build,
> because of the use of the Shader plugin: I believe flattening project
> dependencies is a suboptimal way to go.
>
> I am glad that you're calling to cease the use of classifiers. Big +1 on
> that!
> Using alternative names or versions to reflect dependency differences is
> certainly a great idea!
>
> I, perhaps, don't know much about SBT, but I think it is trying to solve
> Maven
> rigidity the way the Gradle did. However, the latter is introducing a
> well-defined DSL and integrates with Maven/Ant more transparently than SBT
> does.
>
> That said, I would love to stick with more mature build system, that is
> also
> wider accepted in Java community. But if the people involved into the
> project
> want to go with SBT as a build platform - that will work from Bigtop
> standpoint of view as far as we'd able to get a sensible set of libraries
> for
> further packaging (a-la https://github.com/mesos/spark/pull/675).
>
> Hope it helps,
>   Cos
>
> Do you have any other concern apart from the dependency management ? IMHO
two build systems are difficult to maintain with sophisticated build
configurations.



> On Mon, Jul 15, 2013 at 05:41PM, Matei Zaharia wrote:
> > Hi all,
> >
> > I wanted to bring up a topic that there isn't a 100% perfect solution
> for,
> > but that's been bothering the team at Berkeley for a while: consolidating
> > Spark's build system. Right now we have two build systems, Maven and SBT,
> > that need to be maintained together on each change. We added Maven a
> while
> > back to try it as an alternative to SBT and to get some better publishing
> > options, like Debian packages and classifiers, but we've found that 1)
> SBT
> > has actually been fairly stable since then (unlike the rapid release
> cycle
> > before) and 2) classifiers don't actually seem to work for publishing
> > versions of Spark with different dependencies (you need to give them
> > different artifact names). More importantly though, because maintaining
> two
> > systems is confusing, it would be good to converge to just one soon, or
> to
> > find a better way of maintaining the builds.
> >
> > In terms of which system to go for, neither is perfect, but I think many
> of
> > us are leaning toward SBT, because it's noticeably faster and it has less
> > code to maintain. If we do this, however, I'd really like to understand
> the
> > use cases for Maven, and make sure that either we can support them in
> SBT or
> > we can do them externally. Can people say a bit about that? The ones I've
> > thought of are the following:
> >
> > - Debian packaging -- this is certainly nice, but there are some plugins
> for
> > SBT too so may be possible to migrate.  - BigTop integration; I'm not
> sure
> > how much this relies on Maven but Cos has been using it.
> > - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these
> don't
> > really work if you want to publish to Maven Central; you still need two
> > artifact names because the artifacts have different dependencies.
> However,
> > more importantly, we'd like to make Spark work with all Hadoop versions
> by
> > using hadoop-client and a bit of reflection, similar to how projects like
> > Parquet handle this.
> >
> > Are there other things I'm missing here, or other ways to handle this
> > problem that I'm missing? For example, one possibility would be to keep
> the
> > Maven build scripts in a separate repo managed by the people who want to
> use
> > them, or to have some dedicated maintainers for them. But because this is
> > often an issue, I do think it would be simpler for the project to have
> one
> > build system in the long term. In either case though, we will keep the
> > project structure compatible with Maven, so people who want to use it
> > internally should be fine; I think that we've done this well and, if
> > anything, we've simplified the Maven build process lately by removing
> Twirl.
> >
> > Anyway, as I said, I don't think any solution is perfect here, but I'm
> > curious to hear your input.
> >
> > Matei
>



-- 
Prashant

Re: Discussion: Consolidating Spark's build system

Posted by Matei Zaharia <ma...@gmail.com>.
Cos, do you have any experience with Gradle by any chance? Is it something you'd recommend trying? I do agree that SBT's dependency management, being based on Ivy, is not ideal, but I'm not sure how common Gradle is and whether it will really work well with Scala.

Matei

On Jul 15, 2013, at 6:23 PM, Konstantin Boudnik <co...@apache.org> wrote:

> Hi Matei.
> 
> The reason I am using Maven for Bigtop packaging and not SBT is because the
> the former's dependency management is clean and let me build a proper assembly
> with only relevant dependencies: e.g. no Hadoop if I don't need to, etc.
> 
> I don't hold onto the packaging the way it is done in the current maven build,
> because of the use of the Shader plugin: I believe flattening project
> dependencies is a suboptimal way to go. 
> 
> I am glad that you're calling to cease the use of classifiers. Big +1 on that!
> Using alternative names or versions to reflect dependency differences is
> certainly a great idea!
> 
> I, perhaps, don't know much about SBT, but I think it is trying to solve Maven
> rigidity the way the Gradle did. However, the latter is introducing a
> well-defined DSL and integrates with Maven/Ant more transparently than SBT
> does.
> 
> That said, I would love to stick with more mature build system, that is also
> wider accepted in Java community. But if the people involved into the project
> want to go with SBT as a build platform - that will work from Bigtop
> standpoint of view as far as we'd able to get a sensible set of libraries for
> further packaging (a-la https://github.com/mesos/spark/pull/675).
> 
> Hope it helps,
>  Cos
> 
> On Mon, Jul 15, 2013 at 05:41PM, Matei Zaharia wrote:
>> Hi all,
>> 
>> I wanted to bring up a topic that there isn't a 100% perfect solution for,
>> but that's been bothering the team at Berkeley for a while: consolidating
>> Spark's build system. Right now we have two build systems, Maven and SBT,
>> that need to be maintained together on each change. We added Maven a while
>> back to try it as an alternative to SBT and to get some better publishing
>> options, like Debian packages and classifiers, but we've found that 1) SBT
>> has actually been fairly stable since then (unlike the rapid release cycle
>> before) and 2) classifiers don't actually seem to work for publishing
>> versions of Spark with different dependencies (you need to give them
>> different artifact names). More importantly though, because maintaining two
>> systems is confusing, it would be good to converge to just one soon, or to
>> find a better way of maintaining the builds.
>> 
>> In terms of which system to go for, neither is perfect, but I think many of
>> us are leaning toward SBT, because it's noticeably faster and it has less
>> code to maintain. If we do this, however, I'd really like to understand the
>> use cases for Maven, and make sure that either we can support them in SBT or
>> we can do them externally. Can people say a bit about that? The ones I've
>> thought of are the following:
>> 
>> - Debian packaging -- this is certainly nice, but there are some plugins for
>> SBT too so may be possible to migrate.  - BigTop integration; I'm not sure
>> how much this relies on Maven but Cos has been using it.
>> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't
>> really work if you want to publish to Maven Central; you still need two
>> artifact names because the artifacts have different dependencies. However,
>> more importantly, we'd like to make Spark work with all Hadoop versions by
>> using hadoop-client and a bit of reflection, similar to how projects like
>> Parquet handle this.
>> 
>> Are there other things I'm missing here, or other ways to handle this
>> problem that I'm missing? For example, one possibility would be to keep the
>> Maven build scripts in a separate repo managed by the people who want to use
>> them, or to have some dedicated maintainers for them. But because this is
>> often an issue, I do think it would be simpler for the project to have one
>> build system in the long term. In either case though, we will keep the
>> project structure compatible with Maven, so people who want to use it
>> internally should be fine; I think that we've done this well and, if
>> anything, we've simplified the Maven build process lately by removing Twirl.
>> 
>> Anyway, as I said, I don't think any solution is perfect here, but I'm
>> curious to hear your input.
>> 
>> Matei


Re: Discussion: Consolidating Spark's build system

Posted by Konstantin Boudnik <co...@apache.org>.
Hi Matei.

The reason I am using Maven for Bigtop packaging and not SBT is because the
the former's dependency management is clean and let me build a proper assembly
with only relevant dependencies: e.g. no Hadoop if I don't need to, etc.

I don't hold onto the packaging the way it is done in the current maven build,
because of the use of the Shader plugin: I believe flattening project
dependencies is a suboptimal way to go. 

I am glad that you're calling to cease the use of classifiers. Big +1 on that!
Using alternative names or versions to reflect dependency differences is
certainly a great idea!

I, perhaps, don't know much about SBT, but I think it is trying to solve Maven
rigidity the way the Gradle did. However, the latter is introducing a
well-defined DSL and integrates with Maven/Ant more transparently than SBT
does.

That said, I would love to stick with more mature build system, that is also
wider accepted in Java community. But if the people involved into the project
want to go with SBT as a build platform - that will work from Bigtop
standpoint of view as far as we'd able to get a sensible set of libraries for
further packaging (a-la https://github.com/mesos/spark/pull/675).

Hope it helps,
  Cos

On Mon, Jul 15, 2013 at 05:41PM, Matei Zaharia wrote:
> Hi all,
> 
> I wanted to bring up a topic that there isn't a 100% perfect solution for,
> but that's been bothering the team at Berkeley for a while: consolidating
> Spark's build system. Right now we have two build systems, Maven and SBT,
> that need to be maintained together on each change. We added Maven a while
> back to try it as an alternative to SBT and to get some better publishing
> options, like Debian packages and classifiers, but we've found that 1) SBT
> has actually been fairly stable since then (unlike the rapid release cycle
> before) and 2) classifiers don't actually seem to work for publishing
> versions of Spark with different dependencies (you need to give them
> different artifact names). More importantly though, because maintaining two
> systems is confusing, it would be good to converge to just one soon, or to
> find a better way of maintaining the builds.
> 
> In terms of which system to go for, neither is perfect, but I think many of
> us are leaning toward SBT, because it's noticeably faster and it has less
> code to maintain. If we do this, however, I'd really like to understand the
> use cases for Maven, and make sure that either we can support them in SBT or
> we can do them externally. Can people say a bit about that? The ones I've
> thought of are the following:
> 
> - Debian packaging -- this is certainly nice, but there are some plugins for
> SBT too so may be possible to migrate.  - BigTop integration; I'm not sure
> how much this relies on Maven but Cos has been using it.
> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't
> really work if you want to publish to Maven Central; you still need two
> artifact names because the artifacts have different dependencies. However,
> more importantly, we'd like to make Spark work with all Hadoop versions by
> using hadoop-client and a bit of reflection, similar to how projects like
> Parquet handle this.
> 
> Are there other things I'm missing here, or other ways to handle this
> problem that I'm missing? For example, one possibility would be to keep the
> Maven build scripts in a separate repo managed by the people who want to use
> them, or to have some dedicated maintainers for them. But because this is
> often an issue, I do think it would be simpler for the project to have one
> build system in the long term. In either case though, we will keep the
> project structure compatible with Maven, so people who want to use it
> internally should be fine; I think that we've done this well and, if
> anything, we've simplified the Maven build process lately by removing Twirl.
> 
> Anyway, as I said, I don't think any solution is perfect here, but I'm
> curious to hear your input.
> 
> Matei

Re: Discussion: Consolidating Spark's build system

Posted by Evan Chan <ev...@ooyala.com>.
There is also an alternative called 'sbt-onejar" we can look at.


On Thu, Jul 18, 2013 at 10:48 AM, Matei Zaharia <ma...@gmail.com>wrote:

> Thanks for the feedback. It looks like there are more advantages to Maven
> than I was originally thinking of -- specifically, the better dependency
> resolution and assembly construction. (SBT assembly just takes all the JARs
> in lib_managed and packages them together unfortunately, which means you
> sometimes get multiple versions of the same artifact if you aren't very
> careful with exclusion rules). I think what we'll do is to wait until we
> see whether we can have a single Spark artifact that works with any Hadoop
> version, and go back to the build system issue then.
>
> Matei
>
> On Jul 16, 2013, at 4:37 PM, Ryan LeCompte <le...@gmail.com> wrote:
>
> +1 for SBT. It's pretty much the de facto standard for mainstream Scala
> projects.
>
>
> On Tue, Jul 16, 2013 at 4:19 PM, Evan Chan <ev...@ooyala.com> wrote:
>
>> If the APIs for those libraries such as Akka stay the same, you don't
>> need different branches.   In SBT you can easily support two different sets
>> of deps depending on which Scala version you are building.... not sure if
>> you could do that with Maven.
>>
>> Here are the main differences that would require a different branch:
>> - if you are taking advantage of Akka Cluster, or features exclusive to
>> newer releases
>> - The Akka futures API changed packages between Scala 2.9.1/2 and Scala
>> 2.9.3/2.10.  However, since the project upgraded to Scala 2.9.3, it should
>> migrate all use of futures to the scala.concurrent.* namespace to avoid
>> more code changes down the line.
>>
>> As far as SBT vs Maven vs Gradle etc.....
>> - I personally think SBT's "console" REPL with all dependencies in the
>> classpath is super valuable for development, ad hoc testing, trying new
>> ideas out.  Not sure if Maven has that.
>> - SBT also has triggered recompilation/testing, which is again very
>> valuable for some of us
>> - Gradle has a easier to understand DSL, but it seems once you build a
>> complex enough system, it is no easier to maintain than SBT
>> - Maven is much better integrated into most IDEs, but SBT is far superior
>> for dev workflow if you don't use one of the major IDEs or are a command
>> line person.
>>
>> -Evan
>>
>>
>> On Tuesday, July 16, 2013 1:37:41 PM UTC-7, Matei Zaharia wrote:
>>
>>> Unfortunately, we'll probably have to have different branches of Spark
>>> for different Scala versions, because there are also other libraries we
>>> depend on (e.g. Akka) that have separate versions for Scala 2.10. You can
>>> actually find a Scala 2.10 port of Spark in the scala-2.10 branch on
>>> GitHub.
>>>
>>> Matei
>>>
>>>
>>> On Jul 16, 2013, at 1:33 PM, Cody Koeninger <co...@koeninger.org>
>>> wrote:
>>>
>>> > If you're looking at consolidating build systems, I'd ask to consider
>>> ease of cross-publishing for different Scala versions.  My instinct is that
>>> sbt will be less troublesome in that regard (although as I understand it,
>>> the changes to the repl may present a problem).
>>> >
>>> > We're needing to use 2.10 for a project, so I'd be happy to put in
>>> some work on the issue.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Spark Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to spark-developers+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Spark Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/spark-developers/OxL268v0-Qs/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
--
Evan Chan
Staff Engineer
ev@ooyala.com  |

<http://www.ooyala.com/>
<http://www.facebook.com/ooyala><http://www.linkedin.com/company/ooyala><http://www.twitter.com/ooyala>

Re: Discussion: Consolidating Spark's build system

Posted by Matei Zaharia <ma...@gmail.com>.
Thanks for the feedback. It looks like there are more advantages to Maven than I was originally thinking of -- specifically, the better dependency resolution and assembly construction. (SBT assembly just takes all the JARs in lib_managed and packages them together unfortunately, which means you sometimes get multiple versions of the same artifact if you aren't very careful with exclusion rules). I think what we'll do is to wait until we see whether we can have a single Spark artifact that works with any Hadoop version, and go back to the build system issue then.

Matei

On Jul 16, 2013, at 4:37 PM, Ryan LeCompte <le...@gmail.com> wrote:

> +1 for SBT. It's pretty much the de facto standard for mainstream Scala projects.
> 
> 
> On Tue, Jul 16, 2013 at 4:19 PM, Evan Chan <ev...@ooyala.com> wrote:
> If the APIs for those libraries such as Akka stay the same, you don't need different branches.   In SBT you can easily support two different sets of deps depending on which Scala version you are building.... not sure if you could do that with Maven.
> 
> Here are the main differences that would require a different branch:
> - if you are taking advantage of Akka Cluster, or features exclusive to newer releases
> - The Akka futures API changed packages between Scala 2.9.1/2 and Scala 2.9.3/2.10.  However, since the project upgraded to Scala 2.9.3, it should migrate all use of futures to the scala.concurrent.* namespace to avoid more code changes down the line.
> 
> As far as SBT vs Maven vs Gradle etc.....  
> - I personally think SBT's "console" REPL with all dependencies in the classpath is super valuable for development, ad hoc testing, trying new ideas out.  Not sure if Maven has that.
> - SBT also has triggered recompilation/testing, which is again very valuable for some of us
> - Gradle has a easier to understand DSL, but it seems once you build a complex enough system, it is no easier to maintain than SBT
> - Maven is much better integrated into most IDEs, but SBT is far superior for dev workflow if you don't use one of the major IDEs or are a command line person.
> 
> -Evan
> 
> 
> On Tuesday, July 16, 2013 1:37:41 PM UTC-7, Matei Zaharia wrote:
> Unfortunately, we'll probably have to have different branches of Spark for different Scala versions, because there are also other libraries we depend on (e.g. Akka) that have separate versions for Scala 2.10. You can actually find a Scala 2.10 port of Spark in the scala-2.10 branch on GitHub. 
> 
> Matei 
> 
> 
> On Jul 16, 2013, at 1:33 PM, Cody Koeninger <co...@koeninger.org> wrote: 
> 
> > If you're looking at consolidating build systems, I'd ask to consider ease of cross-publishing for different Scala versions.  My instinct is that sbt will be less troublesome in that regard (although as I understand it, the changes to the repl may present a problem). 
> > 
> > We're needing to use 2.10 for a project, so I'd be happy to put in some work on the issue. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Spark Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spark-developers+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


Re: Discussion: Consolidating Spark's build system

Posted by Matei Zaharia <ma...@gmail.com>.
Unfortunately, we'll probably have to have different branches of Spark for different Scala versions, because there are also other libraries we depend on (e.g. Akka) that have separate versions for Scala 2.10. You can actually find a Scala 2.10 port of Spark in the scala-2.10 branch on GitHub.

Matei


On Jul 16, 2013, at 1:33 PM, Cody Koeninger <co...@koeninger.org> wrote:

> If you're looking at consolidating build systems, I'd ask to consider ease of cross-publishing for different Scala versions.  My instinct is that sbt will be less troublesome in that regard (although as I understand it, the changes to the repl may present a problem).
> 
> We're needing to use 2.10 for a project, so I'd be happy to put in some work on the issue.


Re: Discussion: Consolidating Spark's build system

Posted by Cody Koeninger <co...@koeninger.org>.
If you're looking at consolidating build systems, I'd ask to consider ease 
of cross-publishing for different Scala versions.  My instinct is that sbt 
will be less troublesome in that regard (although as I understand it, the 
changes to the repl may present a problem).

We're needing to use 2.10 for a project, so I'd be happy to put in some 
work on the issue.


On Monday, July 15, 2013 7:41:31 PM UTC-5, Matei Zaharia wrote:
>
> Hi all, 
>
> I wanted to bring up a topic that there isn't a 100% perfect solution for, 
> but that's been bothering the team at Berkeley for a while: consolidating 
> Spark's build system. Right now we have two build systems, Maven and SBT, 
> that need to be maintained together on each change. We added Maven a while 
> back to try it as an alternative to SBT and to get some better publishing 
> options, like Debian packages and classifiers, but we've found that 1) SBT 
> has actually been fairly stable since then (unlike the rapid release cycle 
> before) and 2) classifiers don't actually seem to work for publishing 
> versions of Spark with different dependencies (you need to give them 
> different artifact names). More importantly though, because maintaining two 
> systems is confusing, it would be good to converge to just one soon, or to 
> find a better way of maintaining the builds. 
>
> In terms of which system to go for, neither is perfect, but I think many 
> of us are leaning toward SBT, because it's noticeably faster and it has 
> less code to maintain. If we do this, however, I'd really like to 
> understand the use cases for Maven, and make sure that either we can 
> support them in SBT or we can do them externally. Can people say a bit 
> about that? The ones I've thought of are the following: 
>
> - Debian packaging -- this is certainly nice, but there are some plugins 
> for SBT too so may be possible to migrate. 
> - BigTop integration; I'm not sure how much this relies on Maven but Cos 
> has been using it. 
> - Classifiers for hadoop1 and hadoop2 -- as far as I can tell, these don't 
> really work if you want to publish to Maven Central; you still need two 
> artifact names because the artifacts have different dependencies. However, 
> more importantly, we'd like to make Spark work with all Hadoop versions by 
> using hadoop-client and a bit of reflection, similar to how projects like 
> Parquet handle this. 
>
> Are there other things I'm missing here, or other ways to handle this 
> problem that I'm missing? For example, one possibility would be to keep the 
> Maven build scripts in a separate repo managed by the people who want to 
> use them, or to have some dedicated maintainers for them. But because this 
> is often an issue, I do think it would be simpler for the project to have 
> one build system in the long term. In either case though, we will keep the 
> project structure compatible with Maven, so people who want to use it 
> internally should be fine; I think that we've done this well and, if 
> anything, we've simplified the Maven build process lately by removing 
> Twirl. 
>
> Anyway, as I said, I don't think any solution is perfect here, but I'm 
> curious to hear your input. 
>
> Matei