Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 62923EF7D for ; Fri, 15 Mar 2013 04:32:16 +0000 (UTC) Received: (qmail 52775 invoked by uid 500); 15 Mar 2013 04:32:15 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 52605 invoked by uid 500); 15 Mar 2013 04:32:15 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 52550 invoked by uid 99); 15 Mar 2013 04:32:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 04:32:13 +0000 Date: Fri, 15 Mar 2013 04:32:12 +0000 (UTC) From: "Huned Lokhandwala (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-4590) Add more Unit Test Case for HDFS-3701 HDFS Miss Final Block Reading when File is Open for Write MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-4590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13603116#comment-13603116 ] Huned Lokhandwala commented on HDFS-4590: ----------------------------------------- The test result is pass with the following Expected Exception being thrown which passes the test. java.io.IOException: Failed to get block info from any of the DN in pipeline: [127.0.0.1:57372] at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.updateBlockInfo(DFSClient.java:2048) at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.fetchLocatedBlocks(DFSClient.java:1989) at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.openInfo(DFSClient.java:1944) at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.(DFSClient.java:1936) at org.apache.hadoop.hdfs.DFSClient.open(DFSClient.java:731) at org.apache.hadoop.hdfs.DistributedFileSystem.open(DistributedFileSystem.java:165) at org.apache.hadoop.hdfs.TestFileLengthOnClusterRestart.testFileLengthWithDatNodesShutDown(TestFileLengthOnClusterRestart.java:130) 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.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) Shutting down the Mini HDFS Cluster > Add more Unit Test Case for HDFS-3701 HDFS Miss Final Block Reading when File is Open for Write > ----------------------------------------------------------------------------------------------- > > Key: HDFS-4590 > URL: https://issues.apache.org/jira/browse/HDFS-4590 > Project: Hadoop HDFS > Issue Type: Test > Components: hdfs-client > Affects Versions: 1.2.0 > Environment: Java Unit Test Case > Reporter: Huned Lokhandwala > Priority: Minor > Attachments: HDFS-4590.b1.001.patch > > > Add more Java Unit Test Coverage for the feature HDFS-3701 where the file is opened for writing, the DFSClient calls one of the datanode owning the last block to get its size, and if this datanode is dead then test for if socket IO Exception is thrown. Add a unit test case to write to a file, shutdown the datanodes, and then try to read from the file and expect an IO Exception. On branch 1 it should throw the IO Exception as expected. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira