在版本 1 上构建 mesos hadoop

Building mesos hadoop on version 1

我把Hadoop Mesos的Mesos版本改成了1.

<properties>
    <encoding>UTF-8</encoding>

    <!-- language versions -->
    <java.abi>1.7</java.abi>

    <!-- runtime deps versions -->
    <commons-logging.version>1.1.3</commons-logging.version>
    <commons-httpclient.version>3.1</commons-httpclient.version>
    <hadoop-client.version>2.5.0-mr1-cdh5.2.0</hadoop-client.version>
    <mesos.version>1.0.1</mesos.version>
    <protobuf.version>2.5.0</protobuf.version>
    <metrics.version>3.1.0</metrics.version>
    <snappy-java.version>1.0.5</snappy-java.version>

    <!-- test deps versions -->
    <junit.version>4.11</junit.version>
    <mockito.version>2.2.9</mockito.version>
</properties>

因此,我开始了构建过程,但失败了。我收到此错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hadoop-mesos: Compilation failure: Compilation failure:
[ERROR] /root/hadoop/src/main/java/org/apache/mesos/hadoop/Utils.java:[46,28] cannot find symbol
[ERROR] symbol:   class ContainerInfo
[ERROR] location: class org.apache.mesos.Protos.CommandInfo
[ERROR] /root/hadoop/src/main/java/org/apache/mesos/hadoop/Utils.java:[50,16] cannot find symbol
[ERROR] symbol:   class ContainerInfo
[ERROR] location: class org.apache.mesos.Protos.CommandInfo
[ERROR] /root/hadoop/src/main/java/org/apache/mesos/hadoop/Utils.java:[51,20] cannot find symbol
[ERROR] symbol:   variable ContainerInfo
[ERROR] location: class org.apache.mesos.Protos.CommandInfo
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hadoop-mesos: Compilation failure
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
    at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
    at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

我该如何解决这个问题?我会查看源代码。但是需要时间去了解。

mesos-hadoop 框架很旧,不支持 Hadoop2/YARN。对于 Hadoop2(和 Mesos 1.x),Apache Myriad 是更好的选择:http://myriad.incubator.apache.org/