2014-05-06 27 views
1

我想建立Oozie的4.0.1instructionOozie構建失敗無法鎖定存儲構建/測試/數據/ dfs/name1。該目錄已經在建鎖定

碰到這個問題,在這裏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與

[email protected]:~ $ 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) 

[email protected]:~ $ 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跳過測試,我可以成功建立它

[email protected]:~ $ 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" 

[email protected]:~ $ pig -version 
Apache Pig version 0.12.0 (r1529718) 
compiled Oct 07 2013, 12:20:14 

。我只是想知道我是否應該關心這個測試失敗。

任何幫助表示讚賞,謝謝。

+0

Marco的下面的評論工作來解決這個錯誤,但新的錯誤來了這是由馬可的解決方案又解決:HTTPS://stackoverflow.com/questions/21538862 /編譯-錯誤,而建設的,minioozie/23676572#23676572 – shashaDenovo

回答

2

如此地:

http://mail-archives.apache.org/mod_mbox/oozie-dev/201210.mbox/%[email protected]%3E

的問題是與創建目錄的權限。

在我進行的測試,外殼設置

umask 022 

解決了這個問題對我來說。 之前改變的umask,在萬無一失的報告,我發現:

14/05/14 18:29:25 WARN datanode.DataNode: Invalid directory in dfs.data.dir: 
Incorrect permission for build/test/data/dfs/data/data1, 
expected: rwxr-xr-x, while actual: rwxrwxr-x 
相關問題