我正试图按照说明构建oozie4.0.1
在工作中遇到这个问题 mvn test
内部版本
-------------------------------------------------------------------------------
Test set: org.apache.oozie.store.TestCoordinatorStore
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< FAILURE!
testCoordStore(org.apache.oozie.store.TestCoordinatorStore) Time elapsed: 0.002 sec <<< ERROR!
java.io.IOException: Cannot lock storage build/test/data/dfs/name1. The directory is already locked.
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.lock(Storage.java:599)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1325)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1343)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1200)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:185)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:268)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:124)
at org.apache.oozie.test.XTestCase.setUpEmbeddedHadoop(XTestCase.java:801)
at org.apache.oozie.test.XTestCase.setUp(XTestCase.java:323)
at org.apache.oozie.store.TestCoordinatorStore.setUp(TestCoordinatorStore.java:39)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junitcore.ClassDemarcatingRunner.run(ClassDemarcatingRunner.java:58)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
结果如下:
Tests run: 1173, Failures: 0, Errors: 1131, Skipped: 2
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Oozie Main ................................. SUCCESS [0.373s]
[INFO] Apache Oozie Client ............................... SUCCESS [3.285s]
[INFO] Apache Oozie Hadoop 1.1.1.oozie-4.0.1 ............. SUCCESS [0.177s]
[INFO] Apache Oozie Hadoop Distcp 1.1.1.oozie-4.0.1 ...... SUCCESS [0.118s]
[INFO] Apache Oozie Hadoop 1.1.1.oozie-4.0.1 Test ........ SUCCESS [0.212s]
[INFO] Apache Oozie Hadoop 2.3.0.oozie-4.0.1 ............. SUCCESS [0.282s]
[INFO] Apache Oozie Hadoop 2.3.0.oozie-4.0.1 Test ........ SUCCESS [0.241s]
[INFO] Apache Oozie Hadoop Distcp 2.3.0.oozie-4.0.1 ...... SUCCESS [0.096s]
[INFO] Apache Oozie Hadoop 0.23.5.oozie-4.0.1 ............ SUCCESS [0.274s]
[INFO] Apache Oozie Hadoop 0.23.5.oozie-4.0.1 Test ....... SUCCESS [0.267s]
[INFO] Apache Oozie Hadoop Distcp 0.23.5.oozie-4.0.1 ..... SUCCESS [0.111s]
[INFO] Apache Oozie Hadoop Libs .......................... SUCCESS [0.003s]
[INFO] Apache Oozie Hbase 0.94.2.oozie-4.0.1 ............. SUCCESS [0.111s]
[INFO] Apache Oozie Hbase Libs ........................... SUCCESS [0.004s]
[INFO] Apache Oozie HCatalog 0.5.0.oozie-4.0.1 ........... SUCCESS [0.287s]
[INFO] Apache Oozie HCatalog 0.6.0.oozie-4.0.1 ........... SUCCESS [0.201s]
[INFO] Apache Oozie HCatalog Libs ........................ SUCCESS [0.002s]
[INFO] Apache Oozie Share Lib Oozie ...................... SUCCESS [1.248s]
[INFO] Apache Oozie Share Lib HCatalog ................... SUCCESS [1.022s]
[INFO] Apache Oozie Core ................................. FAILURE [25.610s]
[INFO] Apache Oozie Docs ................................. SKIPPED
[INFO] Apache Oozie Share Lib Pig ........................ SKIPPED
[INFO] Apache Oozie Share Lib Hive ....................... SKIPPED
[INFO] Apache Oozie Share Lib Sqoop ...................... SKIPPED
[INFO] Apache Oozie Share Lib Streaming .................. SKIPPED
[INFO] Apache Oozie Share Lib Distcp ..................... SKIPPED
[INFO] Apache Oozie WebApp ............................... SKIPPED
[INFO] Apache Oozie Examples ............................. SKIPPED
[INFO] Apache Oozie Share Lib ............................ SKIPPED
[INFO] Apache Oozie Tools ................................ SKIPPED
[INFO] Apache Oozie MiniOozie ............................ SKIPPED
[INFO] Apache Oozie Distro ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.512s
[INFO] Finished at: Tue May 06 03:09:47 EDT 2014
[INFO] Final Memory: 81M/550M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project oozie-core: There are test failures.
[ERROR]
[ERROR] Please refer to /home/hduser/oozie-4.0.1/core/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project oozie-core: There are test failures.
Please refer to /home/hduser/oozie-4.0.1/core/target/surefire-reports for the individual test results.
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: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.MojoFailureException: There are test failures.
Please refer to /home/hduser/oozie-4.0.1/core/target/surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
at org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:673)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:647)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:137)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98)
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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :oozie-core
我正在运行hadoop版本1.2.1
hduser@hadoop-node1:~ $ java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
和
hduser@hadoop-node1:~ $ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-60-generic", arch: "amd64", family: "unix"
以及
hduser@hadoop-node1:~ $ pig -version
Apache Pig version 0.12.0 (r1529718)
compiled Oct 07 2013, 12:20:14
在
hduser@hadoop-node1:~ $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
但是,如果我跳过测试 bin/mkdistro.sh -DskipTests
,我可以成功地建立它。我只是想知道我是否应该担心这次考试失败。
谢谢您的帮助。
1条答案
按热度按时间atmip9wb1#
如前所述:
http://mail-archives.apache.org/mod_mbox/oozie-dev/201210.mbox/%3c507bc0ab.5080201@adition.com%3e
问题是创建目录的权限。
设置
在我运行测试的shell中为我解决了问题。在更换umask之前,我在surefire报告中发现: