From mapreduce-issues-return-91489-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Apr 10 22:45:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B7D0F18072F for ; Tue, 10 Apr 2018 22:45:03 +0200 (CEST) Received: (qmail 79112 invoked by uid 500); 10 Apr 2018 20:45:02 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 79101 invoked by uid 99); 10 Apr 2018 20:45:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2018 20:45:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4864E18051A for ; Tue, 10 Apr 2018 20:45:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BeTdBdEpYpgf for ; Tue, 10 Apr 2018 20:45:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 185165F666 for ; Tue, 10 Apr 2018 20:45:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6F72BE0117 for ; Tue, 10 Apr 2018 20:45:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2D24D21209 for ; Tue, 10 Apr 2018 20:45:00 +0000 (UTC) Date: Tue, 10 Apr 2018 20:45:00 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MAPREDUCE-7076) TestNNBench#testNNBenchCreateReadAndDelete failing in our internal build 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/MAPREDUCE-7076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rushabh S Shah updated MAPREDUCE-7076: -------------------------------------- Labels: newbie (was: ) > TestNNBench#testNNBenchCreateReadAndDelete failing in our internal build > ------------------------------------------------------------------------ > > Key: MAPREDUCE-7076 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7076 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: test > Affects Versions: 2.8.0 > Reporter: Rushabh S Shah > Priority: Minor > Labels: newbie > > TestNNBench#testNNBenchCreateReadAndDelete failed couple of times in our internal jenkins build. > {noformat} > java.lang.AssertionError: create_write should create the file > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.apache.hadoop.hdfs.TestNNBench.testNNBenchCreateReadAndDelete(TestNNBench.java:55) > {noformat} > Below is my analysis for why it didn't create the file. > {code:title=NNBench.java|borderStyle=solid} > // Some comments here > public void map(Text key, > LongWritable value, > OutputCollector output, > Reporter reporter) throws IOException { > if (barrier()) { > String fileName = "file_" + value; > if (op.equals(OP_CREATE_WRITE)) { > startTimeTPmS = System.currentTimeMillis(); > doCreateWriteOp(fileName, reporter); > } ... > } else { > output.collect(new Text("l:latemaps"), new Text("1")); > } > // Below are the relevant parts of barrier() method > private boolean barrier() { > .. > // If the sleep time is greater than 0, then sleep and return > ... > LOG.info("Waiting in barrier for: " + sleepTime + " ms"); > return retVal; > } > // Below are the relevant parts of the doCreateWriteOp > private void doCreateWriteOp(String name, > Reporter reporter) { > FSDataOutputStream out; > byte[] buffer = new byte[bytesToWrite]; > for (long l = 0l; l < numberOfFiles; l++) { > Path filePath = new Path(new Path(baseDir, dataDirName), > name + "_" + l); > } > .... > } > {code} > This file {{BASE_DIR/data/file_0_0}} is getting created only if the map task starts before the time mentioned by {{startTime}}. > Refer the chunk which I pasted above. > {{map(..)}} --> {{barrier()}} and *only if* {{barrier()}} evaluates to true it will call {{doCreateWriteOp}} which will eventually create the file. > In test case, the delay value is 3 seconds as per {{"-startTime", "" + (Time.now() / 1000 + 3)}} > In this failing test case, I can see the task starting minimum 6 seconds after the test case started. > {noformat} > 2017-01-27 03:11:15,387 INFO [Thread-4] mapreduce.JobSubmitter (JobSubmitter.java:printTokens(289)) - Submitting tokens for job: job_local1711545156_0001 > 2017-01-27 03:11:23,405 INFO [Thread-4] mapreduce.Job (Job.java:submit(1345)) - The url to track the job: http://localhost:8080/ > {noformat} > Also when I run this test on my laptop, I see the following line being printed. > {noformat} > 2017-01-27 17:09:27,982 INFO [LocalJobRunner Map Task Executor #0] hdfs.NNBench (NNBench.java:barrier(676)) - Waiting in barrier for: 1018 ms > {noformat} > This line will be printed only in {{barrier()}} method and I don't see this line in the logs of failed test. > In our environment, the jenkins server was very slow and it took more than 6 seconds to launch a map task. > The correct fix in my opinion would be to return true in case there is no sleep in {{barrier() method}}. Only in exception, it will return false. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org