Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AFC0D200CB8 for ; Sat, 1 Jul 2017 11:34:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AE678160BF8; Sat, 1 Jul 2017 09:34:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0062E160BD2 for ; Sat, 1 Jul 2017 11:34:05 +0200 (CEST) Received: (qmail 5567 invoked by uid 500); 1 Jul 2017 09:34:05 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 5558 invoked by uid 99); 1 Jul 2017 09:34:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2017 09:34:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BCCD51A0401 for ; Sat, 1 Jul 2017 09:34:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id G7xLG1qHQaWs for ; Sat, 1 Jul 2017 09:34:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B90BB5FCB5 for ; Sat, 1 Jul 2017 09:34:02 +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 8B017E08B7 for ; Sat, 1 Jul 2017 09:34:01 +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 2B014245DD for ; Sat, 1 Jul 2017 09:34:00 +0000 (UTC) Date: Sat, 1 Jul 2017 09:34:00 +0000 (UTC) From: "Fei Shao (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SPARK-21206) the window slice of Dstream is wrong MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 01 Jul 2017 09:34:06 -0000 [ https://issues.apache.org/jira/browse/SPARK-21206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071110#comment-16071110 ] Fei Shao edited comment on SPARK-21206 at 7/1/17 9:33 AM: ---------------------------------------------------------- [~srowen] This issue is about the xpressions about oldRDDs and newRDDs. Here is the case I want to express: !screenshot-2.png! I think the code is: ============= // Get the RDDs of the reduced values in "old time steps" val oldRDDs = if (windowDuration < slideDuration ) { reducedStream.slice(previousWindow.beginTime, previousWindow.endTime) } else { reducedStream.slice(previousWindow.beginTime, currentWindow.beginTime - parent.slideDuration) } logDebug("# old RDDs = " + oldRDDs.size) // Get the RDDs of the reduced values in "new time steps" val newRDDs = if (windowDuration < slideDuration ) { reducedStream.slice(currentWindow.beginTime, currentWindow.endTime) } else { reducedStream.slice(previousWindow.endTime + parent.slideDuration, currentWindow.endTime) } logDebug("# new RDDs = " + newRDDs.size) ============================== I sent an email named "the function of countByValueAndWindow and foreachRDD in DStream, would you like help me understand it please?". It is related to this issues. was (Author: robin shao): [~srowen] Here is the case I want to express: !screenshot-2.png! I sent an email named "the function of countByValueAndWindow and foreachRDD in DStream, would you like help me understand it please?". It is related to this issues. > the window slice of Dstream is wrong > ------------------------------------ > > Key: SPARK-21206 > URL: https://issues.apache.org/jira/browse/SPARK-21206 > Project: Spark > Issue Type: Bug > Components: DStreams > Affects Versions: 2.1.0 > Reporter: Fei Shao > Attachments: screenshot-1.png, screenshot-2.png > > > the code is : > val conf = new SparkConf().setAppName("testDstream").setMaster("local[4]") > val ssc = new StreamingContext(conf, Seconds(1)) > ssc.checkpoint( "path") > val lines = ssc.socketTextStream("IP", PORT) > lines.countByValueAndWindow( Seconds(2), Seconds(8)).foreachRDD( s => { > println( "RDD ID IS : " + s.id) > s.foreach( e => println("data is " + e._1 + " :" + e._2)) > println() > }) > The result is wrong. > I checked the log, it showed: > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Time 1498383086000 ms is valid > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Window time = 2000 ms > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Slide time = 8000 ms > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Zero time = 1498383078000 ms > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Current window = [1498383085000 ms, 1498383086000 ms] > 17/06/25 17:31:26 DEBUG ReducedWindowedDStream: Previous window = [1498383077000 ms, 1498383078000 ms] > 17/06/25 17:31:26 INFO ShuffledDStream: Slicing from 1498383077000 ms to 1498383084000 ms (aligned to 1498383077000 ms and 1498383084000 ms) > 17/06/25 17:31:26 INFO ShuffledDStream: Time 1498383078000 ms is invalid as zeroTime is 1498383078000 ms , slideDuration is 1000 ms and difference is 0 ms > 17/06/25 17:31:26 DEBUG ShuffledDStream: Time 1498383079000 ms is valid > 17/06/25 17:31:26 DEBUG MappedDStream: Time 1498383079000 ms is valid > the slice time is wrong. > [BTW]: Team members, > If it was a bug, please don't fix it.I try to fix it myself.Thanks:) -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org