[
https://issues.apache.org/jira/browse/HADOOP-16967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081554#comment-17081554
]
Hadoop QA commented on HADOOP-16967:
------------------------------------
| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m
51s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m
0s{color} | {color:green} The patch appears to include 1 new or modified test
files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 20m
23s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 16m
11s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m
46s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m
16s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green}
16m 34s{color} | {color:green} branch has no errors when building and testing
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m
3s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m
53s{color} | {color:green} trunk passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m
49s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 15m
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 15m
39s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m
43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m
14s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m
0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green}
14m 16s{color} | {color:green} patch has no errors when building and testing
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m
10s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m
54s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 9m
0s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m
44s{color} | {color:green} The patch does not generate ASF License warnings.
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}104m 24s{color} |
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=19.03.8 Server=19.03.8 Image:yetus/hadoop:e6455cc864d |
| JIRA Issue | HADOOP-16967 |
| JIRA Patch URL |
https://issues.apache.org/jira/secure/attachment/12999662/HADOOP-16967.002.patch
|
| Optional Tests | dupname asflicense compile javac javadoc mvninstall
mvnsite unit shadedclient findbugs checkstyle |
| uname | Linux 119834b14268 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19
08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 275c478 |
| maven | version: Apache Maven 3.3.9 |
| Default Java | 1.8.0_242 |
| findbugs | v3.1.0-RC1 |
| Test Results |
https://builds.apache.org/job/PreCommit-HADOOP-Build/16875/testReport/ |
| Max. process+thread count | 2918 (vs. ulimit of 5500) |
| modules | C: hadoop-common-project/hadoop-common U:
hadoop-common-project/hadoop-common |
| Console output |
https://builds.apache.org/job/PreCommit-HADOOP-Build/16875/console |
| Powered by | Apache Yetus 0.8.0 http://yetus.apache.org |
This message was automatically generated.
> TestSequenceFile#testRecursiveSeqFileCreate failed to clean its data caused
> failures in subsequent run
> -------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-16967
> URL: https://issues.apache.org/jira/browse/HADOOP-16967
> Project: Hadoop Common
> Issue Type: Bug
> Components: common, test
> Affects Versions: 3.2.1, 3.4.0
> Reporter: Ctest
> Priority: Minor
> Labels: easyfix, test
> Attachments: HADOOP-16967.000.patch, HADOOP-16967.001.patch,
> HADOOP-16967.002.patch
>
>
> The test expects an IOException when creating a writer for file
> `target/test/data/recursiveCreateDir/file` with `createParent=false`. And it
> expects to create the writer successfully when `createParent=True`.
> `createParent` means `create parent directory if non-existent`.
> The test will pass if it is run for the first time, but it will fail for the
> second run. This is because the test did not clean the parent directory
> created during the first run.
> The parent directory `recursiveCreateDir` was created, but it was not deleted
> before the test finished. So, when the test was run again, it still treated
> the parent directory `recursiveCreateDir` as non-existent and expected an
> IOException from creating a writer with `createParent=false`. Then the test
> did not get the expected IOException because `recursiveCreateDir` has been
> created in the first test run.
> {code:java}
> @SuppressWarnings("deprecation")
> @Test
> public void testRecursiveSeqFileCreate() throws IOException {
> FileSystem fs = FileSystem.getLocal(conf);
> Path name = new Path(new Path(GenericTestUtils.getTempPath(
> "recursiveCreateDir")), "file"); // FILE SUCCESSULLY CREATED HERE
> boolean createParent = false;
> try {
> SequenceFile.createWriter(fs, conf, name, RandomDatum.class,
> RandomDatum.class, 512, (short) 1, 4096, createParent,
> CompressionType.NONE, null, new Metadata());
> fail("Expected an IOException due to missing parent");
> } catch (IOException ioe) {
> // Expected
> }
> createParent = true;
> SequenceFile.createWriter(fs, conf, name, RandomDatum.class,
> RandomDatum.class, 512, (short) 1, 4096, createParent,
> CompressionType.NONE, null, new Metadata());
> // should succeed, fails if exception thrown
> }
> {code}
> Suggested patch:
>
> {code:java}
> diff --git
> a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
>
> b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
> index 044824356ed..1aff2936264 100644
> ---
> a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
> +++
> b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
> @@ -649,8 +649,9 @@ public void testCreateWriterOnExistingFile() throws
> IOException {
> @Test
> public void testRecursiveSeqFileCreate() throws IOException {
> FileSystem fs = FileSystem.getLocal(conf);
> - Path name = new Path(new Path(GenericTestUtils.getTempPath(
> - "recursiveCreateDir")), "file");
> + Path parentDir = new Path(GenericTestUtils.getTempPath(
> + "recursiveCreateDir"));
> + Path name = new Path(parentDir, "file");
> boolean createParent = false;
>
> try {
> @@ -667,6 +668,9 @@ public void testRecursiveSeqFileCreate() throws
> IOException {
> RandomDatum.class, 512, (short) 1, 4096, createParent,
> CompressionType.NONE, null, new Metadata());
> // should succeed, fails if exception thrown
> +
> + fs.deleteOnExit(parentDir);
> + fs.close();
> }
>
> @Test{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]