[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-03-04 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347921#comment-14347921
 ] 

Konstantin Shvachko commented on HDFS-7740:
---

Yi, do you have any more context on this. Should we create a jira?

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-03-04 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347939#comment-14347939
 ] 

Yi Liu commented on HDFS-7740:
--

I create HDFS-7886, thanks.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-03-04 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14347934#comment-14347934
 ] 

Yi Liu commented on HDFS-7740:
--

[~shv], let's create a JIRA to track it.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-25 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14337440#comment-14337440
 ] 

Tsz Wo Nicholas Sze commented on HDFS-7740:
---

TestFileTruncate.testTruncateWithDataNodesRestart may time out.   Could you 
take a look?

- 
https://builds.apache.org/job/PreCommit-HDFS-Build/9641/testReport/org.apache.hadoop.hdfs.server.namenode/TestFileTruncate/testTruncateWithDataNodesRestart/
- 
https://builds.apache.org/job/PreCommit-HDFS-Build/9664//testReport/org.apache.hadoop.hdfs.server.namenode/TestFileTruncate/testTruncateWithDataNodesRestart/

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-25 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14337559#comment-14337559
 ] 

Yi Liu commented on HDFS-7740:
--

Sure, let me take a look.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-25 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14337715#comment-14337715
 ] 

Yi Liu commented on HDFS-7740:
--

Seems it's not the same reason as HDFS-7695 where NN restarts and is unable to 
leave SafeMode.  While in {{testTruncateWithDataNodesRestart}} NN is not 
restarted and is caused by {{triggerBlockReportForTests}} can't finish.
The only possible reason is that the block report on that datanode is not 
successful.
I can't reproduce this issue locally, but I check the log and find there is 
indeed no block report after that DN restarts.

Let me see more details.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-25 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14337580#comment-14337580
 ] 

Konstantin Shvachko commented on HDFS-7740:
---

It could be related to HDFS-7695.
I did not look closely, so it's just a possibility.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-22 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14332195#comment-14332195
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #112 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/112/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-22 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14332223#comment-14332223
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-Mapreduce-trunk #2062 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2062/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-21 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330123#comment-14330123
 ] 

Hadoop QA commented on HDFS-7740:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12700012/HDFS-7740.003.patch
  against trunk revision 6f01330.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:red}-1 core tests{color}.  The patch failed these unit tests in 
hadoop-hdfs-project/hadoop-hdfs:

  org.apache.hadoop.hdfs.server.namenode.TestFileTruncate

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/9636//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9636//console

This message is automatically generated.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330309#comment-14330309
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #102 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/102/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330287#comment-14330287
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-Hdfs-trunk #2043 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/2043/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330149#comment-14330149
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #111 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/111/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330179#comment-14330179
 ] 

Hudson commented on HDFS-7740:
--

SUCCESS: Integrated in Hadoop-Yarn-trunk #845 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/845/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-20 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14328679#comment-14328679
 ] 

Yi Liu commented on HDFS-7740:
--

Thanks [~shv] for your comments. I will address them later, currently I'am on 
holiday for Chinese traditional new year, so there is some delay for the update.

{quote}
I don't think your new tests will work with the ones existing in 
TestFileTruncate, because you are restarting the whole cluster
{quote}
Oh, not noticed these before :) I thought if I use a different Mini DFS Cluster 
with different ports, then they will not affect each other.

{quote}
I would propose to put your new cases into a new file
It would be good to start the cluster once in @BeforeClass
I think this is possible as you do not need to reformat the cluster after each 
test
{quote}
Good idea, I will move them to a new class, and then we can use @BeforeClass. 
Yes, we don't need to reformat the cluster.

{quote}
With DNs restarting one way to accelerate test running time is to shorten 
heartbeats, as we did in TestFileTruncate.
{quote}
We already use the short hearbeats for the new test.


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-20 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14328870#comment-14328870
 ] 

Hadoop QA commented on HDFS-7740:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12699840/HDFS-7740.002.patch
  against trunk revision c0d9b93.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:red}-1 core tests{color}.  The patch failed these unit tests in 
hadoop-hdfs-project/hadoop-hdfs:

  org.apache.hadoop.hdfs.tools.TestDFSHAAdminMiniCluster

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/9628//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9628//console

This message is automatically generated.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-20 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14329683#comment-14329683
 ] 

Konstantin Shvachko commented on HDFS-7740:
---

This actually worked pretty good.
Only one test is running too long: 
{{testTruncateWithDataNodesShutdownImmediately()}} adds 30 secs to the running 
time because you check {{isUnderConstruction()}} for the block 300 times with 
interval 100 msec. I'd suggest waiting for DNs being down, and then checking 
the block being still under construction.
{code}
cluster.shutdownDataNodes();
try {
  for(int i = 0; i  SUCCESS_ATTEMPTS  cluster.isDataNodeUp(); i++) {
Thread.sleep(SLEEP);
  }
  assertFalse(All DataNodes should be down., cluster.isDataNodeUp());
  LocatedBlocks blocks = getLocatedBlocks(p);
  assertTrue(blocks.isUnderConstruction());
} finally {
  cluster.startDataNodes(conf, DATANODE_NUM, true,
  StartupOption.REGULAR, null);
  cluster.waitActive();
}
{code}
I am +1 on the rest.
Yi, if you cannot update the patch I can make just this change to the latest 
and commit.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-20 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330055#comment-14330055
 ] 

Yi Liu commented on HDFS-7740:
--

Thanks [~shv] for you review, your suggestion about 
{{testTruncateWithDataNodesShutdownImmediately}} is pretty good and I will 
update the patch for that and commit it later.

{quote}
I am +1 on the rest.
Yi, if you cannot update the patch I can make just this change to the latest 
and commit.
{quote}
Thanks a lot :) I can get time to update and commit.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-20 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14330067#comment-14330067
 ] 

Hudson commented on HDFS-7740:
--

FAILURE: Integrated in Hadoop-trunk-Commit #7172 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/7172/])
HDFS-7740. Test truncate with DataNodes restarting. (yliu) (yliu: rev 
737bad02d4cf879fa7d20b7c0e083d9dc59f604c)
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java


 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch, HDFS-7740.002.patch, 
 HDFS-7740.003.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-19 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14328470#comment-14328470
 ] 

Konstantin Shvachko commented on HDFS-7740:
---

Hey Yi. The test scenarios sound great.
# I don't think your new tests will work with the ones existing in 
TestFileTruncate, because you are restarting the whole cluster.
I would propose to put your new cases into a new file, smth, like 
TestTruncateDataNodeRestarting.
# It would be good to start the cluster once in @BeforeClass, and make sure all 
DNs are up after each test case. I think this is possible as you do not need to 
reformat the cluster after each test. If you need to reformat, then we should 
use try-catch to start / stop clusters.
# With DNs restarting one way to accelerate test running time is to shorten 
heartbeats, as we did in TestFileTruncate.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-17 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14324005#comment-14324005
 ] 

Hadoop QA commented on HDFS-7740:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12699211/HDFS-7740.001.patch
  against trunk revision 9729b24.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:red}-1 core tests{color}.  The patch failed these unit tests in 
hadoop-hdfs-project/hadoop-hdfs:

  org.apache.hadoop.hdfs.server.namenode.TestFileTruncate
  org.apache.hadoop.hdfs.TestLeaseRecovery2

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/9598//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9598//console

This message is automatically generated.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-16 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14323712#comment-14323712
 ] 

Yi Liu commented on HDFS-7740:
--

Sorry for the late update.
Add tests for the above 4 scenarios. To let this tests free control the 
datanodes number and don't affect other tests, I use separate MiniDFSCluster 
for them.

Some explanations to the 4 tests:
{quote}
Create file with 3 DNs up. Kill DN(0). Truncate file. Restart DN(0), make sure 
the old replica is disregarded and replaced with the truncated one.
{quote}
For non copy-on-truncate, the new (truncated) block id is the same, but the GS 
(GenerationStamp) should increase. In the test, I trigger block report for dn0 
after it restarts, since the GS of replica for the last block is old on dn0, so 
the reported last block from dn0 should be marked corrupt on nn and the 
replicas of last block should decrease 1 on nn, then the truncated block will 
be replicated to dn0. In the test, I check old replica (the block file and 
block metatdata file) is removed and replaced with the new (truncated) one.

{quote}
Kill DN(1). Truncate within the same last block with copy-on-truncate. Restart 
DN(1), verify replica consistency.
{quote}
For copy-on-truncate, new block is made with new block id and new GS. In the 
test, I trigger block report for dn1 after it restarts. The replicas of the new 
block is 2, and then it's replicated to dn1. In the test, I check new block 
file is replicated in dn1, and old replica exists too because there is snapshot.

{quote}
Create a single block file with 3 replicas. Truncate mid of block and then 
immediately restart 2 of the DNs. Check the files
{quote}
In the test, I restart dn0 and dn1 immediately after truncate, and check the 
old replica is removed and replaced with the truncated one on dn0 and dn1.

{quote}
Same as before except completely shutting down 3 of the DNs but not restarting 
them.
{quote}
In the test, I check the truncated block is always under construction after the 
3 datanodes shutdown.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0

 Attachments: HDFS-7740.001.patch


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-05 Thread Yi Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14308737#comment-14308737
 ] 

Yi Liu commented on HDFS-7740:
--

I will update the patch to cover these test scenarios, thanks guys.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-05 Thread Konstantin Shvachko (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14308056#comment-14308056
 ] 

Konstantin Shvachko commented on HDFS-7740:
---

Scenario for the test:
- Create file with 3 DNs up. Kill DN(0). Truncate file. Restart DN(0), make 
sure the old replica is disregarded and replaced with the truncated one.
- Kill DN(1). Truncate within the same last block with copy-on-truncate. 
Restart DN(1), verify replica consistency.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
 Fix For: 2.7.0


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HDFS-7740) Test truncate with DataNodes restarting

2015-02-05 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14308434#comment-14308434
 ] 

Tsz Wo Nicholas Sze commented on HDFS-7740:
---

Some test cases:  
- Create a single block file with 3 replicas.  Truncate mid of block and then 
immediately restart 2 of the DNs.  Check the files
- Same as before except completely shutting down 3 of the DNs but not 
restarting them.

 Test truncate with DataNodes restarting
 ---

 Key: HDFS-7740
 URL: https://issues.apache.org/jira/browse/HDFS-7740
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: test
Affects Versions: 2.7.0
Reporter: Konstantin Shvachko
Assignee: Yi Liu
 Fix For: 2.7.0


 Add a test case, which ensures replica consistency when DNs are failing and 
 restarting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)