使用maven构建hadoop2.4.1时,压缩和符号链接surefire测试失败

6za6bjd0  于 2021-06-04  发布在  Hadoop
关注(0)|答案(0)|浏览(224)

我正在尝试构建hadoop,在hadoop common上运行surefire测试时遇到以下一组测试失败:
与符号链接有关的故障
与压缩有关的故障
我查看了目录的权限,它们似乎很好:

drwxr-xr-x  2 tom tom  4096 Jul 17 10:51

我不知道该怎么处理压缩问题。所以我希望它与象征性的联系有关。但我真的需要有压缩工作。我确实在禁用测试的情况下运行了构建,但是当尝试解压缩一个文件时,其中有很多错误,正如测试已经指出的那样。
设置:

Power8
Ubuntu 14.04
Hadoop 2.4.1

生成命令:

mvn package -Pdist,native -Dtar

失败测试:

TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkUsingFullyQualPaths:503->SymlinkBaseTest.checkLink:381 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkViaLink:679 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testRenameSymlinkViaSymlink:897 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testRenameSymlinkNonExistantDest:1036 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testRenameSymlinkToExistingFile:1063 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testRenameSymlink:1134 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testStatLinkToFile:244 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testStatLinkToDir:286 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkUsingRelPaths:447->SymlinkBaseTest.checkLink:381 null
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkUsingAbsPaths:472->SymlinkBaseTest.checkLink:381 null      
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkToDirectory:627 null
TestSymlinkLocalFSFileContext>TestSymlinkLocalFS.testStatDanglingLink:115->SymlinkBaseTest.testStatDanglingLink:301 null
TestSymlinkLocalFSFileSystem>TestSymlinkLocalFS.testStatDanglingLink:115->SymlinkBaseTest.testStatDanglingLink:301 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testStatLinkToFile:244 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testStatLinkToDir:286 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkUsingRelPaths:447->SymlinkBaseTest.checkLink:381 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkUsingAbsPaths:472->SymlinkBaseTest.checkLink:381 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkUsingFullyQualPaths:503->SymlinkBaseTest.checkLink:381 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkToDirectory:627 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkViaLink:679 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testRenameSymlinkViaSymlink:897 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testRenameSymlinkNonExistantDest:1036 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testRenameSymlinkToExistingFile:1063 null
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testRenameSymlink:1134 null
TestSocketIOWithTimeout.testSocketIOWithTimeout:157 Did not throw
TestMapFile.testMainMethodMapFile:617 testMainMethodMapFile error !!!
TestCompressorDecompressor.testCompressorDecompressorWithExeedBufferLimit:78 org.apache.hadoop.io.compress.lz4.Lz4Compressor_org.apache.hadoop.io.compress.lz4.Lz4Decompressor-  byte arrays not equals error !!!: arrays first differed at element [1428]; expected:<4> but was:<10>
TestCompressorDecompressor.testCompressorDecompressor:58 org.apache.hadoop.io.compress.lz4.Lz4Compressor_org.apache.hadoop.io.compress.lz4.Lz4Decompressor-  byte arrays not equals error !!!: arrays first differed at element [3623]; expected:<14> but was:<4>
TestLz4CompressorDecompressor.testCompressorDecopressorLogicWithCompressionStreams:295 original array not equals compress/decompressed array: arrays first differed at element [1428]; expected:<10> but was:<4>
TestLz4CompressorDecompressor.testCompressDecompress:217 arrays first differed at element [2900]; expected:<7> but was:<11>

有错误的测试:

TestSymlinkLocalFSFileContext>TestSymlinkLocalFS.testDanglingLink:163 ? IO Pat...
TestSymlinkLocalFSFileContext>TestSymlinkLocalFS.testGetLinkStatusPartQualTarget:201 ? IO
TestSymlinkLocalFSFileContext>SymlinkBaseTest.testCreateLinkToDotDotPrefix:822 ? IO
TestSymlinkLocalFSFileSystem>TestSymlinkLocalFS.testDanglingLink:163 ? IO Path...
TestSymlinkLocalFSFileSystem>TestSymlinkLocalFS.testGetLinkStatusPartQualTarget:201 ? IO
TestSymlinkLocalFSFileSystem>SymlinkBaseTest.testCreateLinkToDotDotPrefix:822 ? IO
TestConfigurationDeprecation.testConcurrentDeprecateAndManipulate:400 ?  test ...
TestCodec.testSequenceFileBZip2Codec:484->sequenceFileCodecTest:528 ? FileNotFound
TestCodec.testSequenceFileBZip2NativeCodec:497->sequenceFileCodecTest:528 ? FileNotFound

故障示例:

testCreateLinkUsingFullyQualPaths(org.apache.hadoop.fs.TestSymlinkLocalFSFileContext)  Time elapsed: 0.113 sec  <<< FAILURE!
java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:92)
    at org.junit.Assert.assertTrue(Assert.java:43)
    at org.junit.Assert.assertTrue(Assert.java:54)
    at org.apache.hadoop.fs.SymlinkBaseTest.checkLink(SymlinkBaseTest.java:381)
    at org.apache.hadoop.fs.SymlinkBaseTest.testCreateLinkUsingFullyQualPaths(SymlinkBaseTest.java:503)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62)

错误示例:

testDanglingLink(org.apache.hadoop.fs.TestSymlinkLocalFSFileContext)  Time elapsed: 0.077 sec  <<< ERROR!
java.io.IOException: Path file:/home/tom/hadoop/hadoop-2.4.1-native/hadoop-2.4.1-src/hadoop-common-project/hadoop-common/target/test/data/jBQavzwkcW/test1/linkToFile is not a symbolic link
    at org.apache.hadoop.fs.FileStatus.getSymlink(FileStatus.java:251)
    at org.apache.hadoop.fs.TestSymlinkLocalFS.testDanglingLink(TestSymlinkLocalFS.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62)

压缩机示例:

testCompressorDecompressor(org.apache.hadoop.io.compress.TestCompressorDecompressor)  Time elapsed: 0.06 sec  <<< FAILURE!
org.junit.internal.ArrayComparisonFailure: org.apache.hadoop.io.compress.lz4.Lz4Compressor_org.apache.hadoop.io.compress.lz4.Lz4Decompressor-  byte arrays not equals error !!!: arrays first differed at element [3623]; expected:<14> but was:<4>
    at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:52)
    at org.junit.Assert.internalArrayEquals(Assert.java:416)
    at org.junit.Assert.assertArrayEquals(Assert.java:202)
    at org.apache.hadoop.io.compress.CompressDecompressTester$CompressionTestStrategy$2.assertCompression(CompressDecompressTester.java:325)
    at org.apache.hadoop.io.compress.CompressDecompressTester.test(CompressDecompressTester.java:135)
    at org.apache.hadoop.io.compress.TestCompressorDecompressor.testCompressorDecompressor(TestCompressorDecompressor.java:58)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题