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 40FD1E61A for ; Mon, 11 Feb 2013 09:01:52 +0000 (UTC) Received: (qmail 35668 invoked by uid 500); 11 Feb 2013 09:01:51 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 35630 invoked by uid 500); 11 Feb 2013 09:01:51 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 35604 invoked by uid 99); 11 Feb 2013 09:01:51 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 09:01:51 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id CDE4D1C5167; Mon, 11 Feb 2013 09:01:43 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3840357989272925531==" MIME-Version: 1.0 Subject: Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time From: "Kishan Kavala" To: "Kishan Kavala" , "Rohit Yadav" Cc: "cloudstack" , "Wei Zhou" Date: Mon, 11 Feb 2013 09:01:43 -0000 Message-ID: <20130211090143.21521.29204@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Kishan Kavala" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/8971/ X-Sender: "Kishan Kavala" References: <20130205131509.13218.83115@reviews.apache.org> In-Reply-To: <20130205131509.13218.83115@reviews.apache.org> Reply-To: "Kishan Kavala" --===============3840357989272925531== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On Feb. 5, 2013, 1:15 p.m., Kishan Kavala wrote: > > usage/src/com/cloud/usage/UsageManagerImpl.java, line 557 > > > > > > This should be hostAggregatedStat.setAggBytesSent( userStat.getNetB= ytesSent() + userStat.getCurrentBytesSent()); > > = > > Note that Agg =3D net + current > = > Wei Zhou wrote: > From the logic of original source code, hostAggregatedStat is the agg= regated statistics which group by hostKey(DataCenterId-AccountId-DeviceId). > So I set agg=3Dagg+net+current, not agg=3Dnet+current. Agreed, this part looks fine. What about case below: - daily aggregation was used for 1month and changed to 15min aggregation fo= r the 2nd month. = Will this transition cause any issues? - Kishan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8971/#review16109 ----------------------------------------------------------- On Feb. 4, 2013, 12:27 p.m., Wei Zhou wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/8971/ > ----------------------------------------------------------- > = > (Updated Feb. 4, 2013, 12:27 p.m.) > = > = > Review request for cloudstack, Kishan Kavala and Rohit Yadav. > = > = > Description > ------- > = > The usage sever does not handle data in the correct time. For example, it= regards the data traffic between 9:15-9:30 as the data traffic between 9:3= 0-9:45. = > = > If the interval is set to 1440(this means usge server calculate the data = from 0:00-23:59:59 at predefined time). The usage server regards the data t= raffic between the server starting time(such as 13:00) to the next day(13:0= 0) 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 e= xample 16). > = > This is a patch for this issue (all details are described here: https://i= ssues.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-c= loudstack.git;a=3Dcommit;h=3D2f1d83037bd4bb1165b378d6c1dfc2815f696681 > = > = > This addresses bug CLOUDSTACK-962. > = > = > Diffs > ----- > = > server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.= java 943c85f = > server/src/com/cloud/user/dao/UserStatisticsDao.java eb175ca = > server/src/com/cloud/user/dao/UserStatisticsDaoImpl.java fd7795a = > 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 Ne= tworking, not Basic Networking). > = > usage.stats.job.aggregation.range =3D 5, the usage server collects data e= very 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 = every 15 minutes (such as collect data traffic between 13:00:00-13:15:00 at= 13:15:00). > usage.stats.job.aggregation.range =3D 60, the usage server collects data = every 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 dat= a every day (such as collect data traffic between 0:00:00-23:59:59 at 0:30). > = > = > Thanks, > = > Wei Zhou > = > --===============3840357989272925531==--