hadoop未能从源代码构建(hadoop failed to build from source)
我试图从源代码生成hadoop-2.0.4-alpha ..在Ubuntu 13.04我有maven 3.0.5,protobuf(libprotoc 2.4.1),cmake(2.8.10.1)
我明白了
occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (site) on project hadoop-common: An Ant BuildException has occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml:44: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.tools.ant.taskdefs.XSLTProcess.handleError(XSLTProcess.java:1229) at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:380) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270) ... 21 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :hadoop-common
I am trying to build hadoop-2.0.4-alpha from source..in ubuntu 13.04 I have maven 3.0.5, protobuf(libprotoc 2.4.1), cmake(2.8.10.1)
i get this
occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (site) on project hadoop-common: An Ant BuildException has occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml:44: stylesheet /home/hadoop/hadoop-2.0.4-alpha-src/hadoop-common-project/hadoop-common/${env.FINDBUGS_HOME}/src/xsl/default.xsl doesn't exist. at org.apache.tools.ant.taskdefs.XSLTProcess.handleError(XSLTProcess.java:1229) at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:380) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270) ... 21 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :hadoop-common
原文:https://stackoverflow.com/questions/16871841
更新时间:2022-02-12 11:02
最满意答案
在python 3中,不再支持模块全局
__metaclass__
变量。 您必须使用:class CardContainerField(models.CommaSeparatedIntegerField, metaclass=models.SubfieldBase): ...
In python 3 the module-global
__metaclass__
variable is no longer supported. You must use:class CardContainerField(models.CommaSeparatedIntegerField, metaclass=models.SubfieldBase): ...
相关问答
更多-
我终于完成了这段代码 。 from django.db import models from django.forms import MultiValueField, CharField, TextInput from django.forms.widgets import MultiWidget from django.utils.translation import ugettext_lazy as _ class Address(object): """A postal address."" ...
-
Django自定义字段:只从数据库的值运行to_python()?(Django Custom Field: Only run to_python() on values from DB?)[2022-01-30]
当你第一次给该字段赋值时,你只会得到TypeError吗? 你可以写一个尝试/除了它周围: def to_python(self, value): try: return decode(value) except TypeError: return value 这不是最干净的解决方案,但你可以尝试一下,看看它是否可以让你按照你期望的方式在现场工作。 Do you only get the TypeError when you first assign a value to the fi ... -
在python 3中,不再支持模块全局__metaclass__变量。 您必须使用: class CardContainerField(models.CommaSeparatedIntegerField, metaclass=models.SubfieldBase): ... In python 3 the module-global __metaclass__ variable is no longer supported. You must use: class CardContainerFie ...
-
Django模型字段验证(Django model fields validation)[2023-07-15]
Django自版本1.2起就有一个模型验证系统。 在评论中,sebpiq说:“好的,现在有一个地方放置模型验证,除了它只在使用ModelForm时运行!所以问题仍然存在,当有必要确保验证在db级别你应该怎么做?在哪里调用full_clean? 通过Python级别验证不可能确保在db级别上遵守验证。 最接近的可能是在覆盖的save方法中调用full_clean 。 这不是默认情况下完成的,因为这意味着所有调用save方法的人现在都可以准备好捕捉和处理ValidationError 。 但即使这样做,有人仍然 ... -
我将属性添加到我的模型类中 class Messages(models.Model): userid = models.ForeignKey(User) time = models.TimeField(default=datetime.datetime.now) content = models.CharField(max_length=255) id = models.AutoField(primary_key=True) @property def json(s ...
-
基于整数的MoneyField 我一直在使用这个Django代码片段,但后来在保存数据库之前转换为整数时引入了浮点工件。 此外,从Django 1.9 SubfieldBase 已被弃用 ,我们应该使用Field.from_db_value。 所以我编辑了代码来解决这两个问题。 class CurrencyField(models.IntegerField): description = "A field to save dollars as pennies (int) in db, but act l ...
-
我找到了解决方案,感谢ojii指引我正确的方向。 解释是在有关SubfieldBase的文档中 。 简而言之,因为我使用__metaclass__ = models.SubfieldBase ,我需要子类化forms.CharField并从其to_python()方法中引发ValidationError ,然后在我的字段的formfield()方法中使用它而不是普通的forms.CharField 。 I've found the solution thanks to ojii pointing me in ...
-
我尝试了很多,如果字段是加密的,则没有找到有用的答案来查询部分匹配。 所以我不得不用Python做到这一点(找不到其他方法)。 只有当我们使用的数据库很小时,这种解决方法才能正常工作,否则会带来性能成本。 查询数据库中的所有元组,使用python进行部分匹配。 result = [] temp_result = MyModel.objects.all() for temp in temp_result: if query.lower() in temp.first_name.lower(): ...
-
Django:为什么这个自定义模型字段的行为不符合预期?(Django: Why does this custom model field not behave as expected?)[2022-09-06]
也许你可以尝试将它添加到你的领域: __metaclass__ = models.SubfieldBase 另见这里 。 Maybe you could try adding this to your field: __metaclass__ = models.SubfieldBase Also see here. -
to_python是你做任何事情的错误地方。 您应该只是将数据(由数据库返回)转换为python对象。 在您的特定自定义字段实例上调用to_python时,模型实例甚至不存在,因此您肯定无法访问它。 你想要达到的目标是什么? to_python is the wrong place to do whatever you're trying to do. You should merely be converting data (as returned by a database) to a python o ...