Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC659EA5E for ; Mon, 25 Feb 2013 10:47:40 +0000 (UTC) Received: (qmail 21552 invoked by uid 500); 25 Feb 2013 10:47:40 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 21155 invoked by uid 500); 25 Feb 2013 10:47:40 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 21114 invoked by uid 99); 25 Feb 2013 10:47:39 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 10:47:39 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 3C2281C71B9; Mon, 25 Feb 2013 10:47:31 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1538941738259541497==" MIME-Version: 1.0 Subject: Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time From: "Wei Zhou" To: "Kishan Kavala" , "Rohit Yadav" Cc: "cloudstack" , "Wei Zhou" Date: Mon, 25 Feb 2013 10:47:31 -0000 Message-ID: <20130225104731.1280.47793@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Wei Zhou" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/8971/ X-Sender: "Wei Zhou" References: <20130221113121.18986.73780@reviews.apache.org> In-Reply-To: <20130221113121.18986.73780@reviews.apache.org> Reply-To: "Wei Zhou" --===============1538941738259541497== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8971/ ----------------------------------------------------------- (Updated Feb. 25, 2013, 10:47 a.m.) Review request for cloudstack, Kishan Kavala and Rohit Yadav. Changes ------- according to the comment from Kishan, setAggBytesSent/setAggBytesReceived i= n NetworkUsageTask when not in case of dailyor hourly. It is more clear than before, and reduce the modification of source code. = Thanks, Kishan. Summary (updated) ----------------- (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage i= n correct time Description ------- The usage sever does not handle data in the correct time. For example, it r= egards the data traffic between 9:15-9:30 as the data traffic between 9:30-= 9:45. = If the interval is set to 1440(this means usge server calculate the data fr= om 0:00-23:59:59 at predefined time). The usage server regards the data tra= ffic between the server starting time(such as 13:00) to the next day(13:00)= as the data traffic between 0:00 an 23:59:59. Another problem is, when the usage.stats.job.aggregation.range is set to N(= for example, 15), the usage job handle the data every N+1 minutes( for exa= mple 16). This is a patch for this issue (all details are described here: https://iss= ues.apache.org/jira/browse/CLOUDSTACK-962 ). = This patch depends on the patch for CLOUDSTACK-685 which is fixed in 4.0.1.= = You can get from: https://git-wip-us.apache.org/repos/asf?p=3Dincubator-clo= udstack.git;a=3Dcommit;h=3D2f1d83037bd4bb1165b378d6c1dfc2815f696681 This addresses bug CLOUDSTACK-962. Diffs (updated) ----- server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.ja= va 943c85f = usage/src/com/cloud/usage/UsageManagerImpl.java 53ebb14 = Diff: https://reviews.apache.org/r/8971/diff/ Testing ------- The patch is tested in CloudStack Virtual Router environment (Advanced Netw= orking, not Basic Networking). usage.stats.job.aggregation.range =3D 5, the usage server collects data eve= ry 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13= :10:00). usage.stats.job.aggregation.range =3D 15, the usage server collects data ev= ery 15 minutes (such as collect data traffic between 13:00:00-13:15:00 at 1= 3:15:00). usage.stats.job.aggregation.range =3D 60, the usage server collects data ev= ery hour (such as collect data traffic between 13:00:00-14:00:00 at 14:10). usage.stats.job.aggregation.range =3D 1440, the usage server collects data = every day (such as collect data traffic between 0:00:00-23:59:59 at 0:30). Thanks, Wei Zhou --===============1538941738259541497==--