You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Wei ZHOU <w....@leaseweb.com> on 2013/02/04 13:27:04 UTC

Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time

-----------------------------------------------------------
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.


Changes
-------

1. remove line 647 and 656 in VirtualNetworkApplianceManagerImpl.java, to make sure endDate is not before System.currentTimeMillis()
2. add USAGE_AGGREGATION_RANGE_MIN = 10 which is same to com.cloud.usage.UsageManagerImpl.USAGE_AGGREGATION_RANGE_MIN in VirtualNetworkApplianceManagerImpl.java, to set the minimum aggregation range.
3. add "-100" at line 1441 in VirtualNetworkApplianceManagerImpl.java, to make sure the interval is N minutes, no N+1.
4. change the policy of collecting data. For 1440(daily)/60(hourly), it collects aggregation data. for other value, it collects "net_bytes + current_bytes" instead of agg_bytes.


Summary (updated)
-----------------

CloudStack usage server didn't store data to cloud_usage in correct time


Description (updated)
-------

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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs (updated)
-----

  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 (updated)
-------

The patch is tested in CloudStack Virtual Router environment (Advanced Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.

> On Feb. 5, 2013, 1:15 p.m., Kishan Kavala wrote:
> > usage/src/com/cloud/usage/UsageManagerImpl.java, line 557
> > <https://reviews.apache.org/r/8971/diff/2/?file=255149#file255149line557>
> >
> >     This should be hostAggregatedStat.setAggBytesSent( userStat.getNetBytesSent() + userStat.getCurrentBytesSent());
> >     
> >     Note that Agg = net + current
> 
> Wei Zhou wrote:
>     From the logic of original source code, hostAggregatedStat is the aggregated statistics which group by hostKey(DataCenterId-AccountId-DeviceId).
>     So I set agg=agg+net+current, not agg=net+current.

Agreed, this part looks fine. What about case below:
- daily aggregation was used for 1month and changed to 15min aggregation for 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei ZHOU <w....@leaseweb.com>.

> On Feb. 5, 2013, 1:15 p.m., Kishan Kavala wrote:
> > usage/src/com/cloud/usage/UsageManagerImpl.java, line 557
> > <https://reviews.apache.org/r/8971/diff/2/?file=255149#file255149line557>
> >
> >     This should be hostAggregatedStat.setAggBytesSent( userStat.getNetBytesSent() + userStat.getCurrentBytesSent());
> >     
> >     Note that Agg = net + current

>From the logic of original source code, hostAggregatedStat is the aggregated statistics which group by hostKey(DataCenterId-AccountId-DeviceId).
So I set agg=agg+net+current, not agg=net+current.


- Wei


-----------------------------------------------------------
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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.

> On Feb. 5, 2013, 1:15 p.m., Kishan Kavala wrote:
> > usage/src/com/cloud/usage/UsageManagerImpl.java, line 557
> > <https://reviews.apache.org/r/8971/diff/2/?file=255149#file255149line557>
> >
> >     This should be hostAggregatedStat.setAggBytesSent( userStat.getNetBytesSent() + userStat.getCurrentBytesSent());
> >     
> >     Note that Agg = net + current
> 
> Wei Zhou wrote:
>     From the logic of original source code, hostAggregatedStat is the aggregated statistics which group by hostKey(DataCenterId-AccountId-DeviceId).
>     So I set agg=agg+net+current, not agg=net+current.
> 
> Kishan Kavala wrote:
>     Agreed, this part looks fine. What about case below:
>     - daily aggregation was used for 1month and changed to 15min aggregation for the 2nd month. 
>     
>     Will this transition cause any issues?

I think no.

The cloud-management and cloud-usage service have to be restarted after we change the configuration of usage.stats.job.aggregation.range or usage.stats.job.exec.time.
Otherwise, the change will not be effective.
After restarting services, the old threads(UsageManager, Heartbeat) are dropped, and new threads are created. It will be ok.

Between the start time and next job execution time, the thread Heartbeat will handle the data in database periodically (every usage.stats.job.aggregation.range minutes).
After that, the UsageManager will do it.


- Wei


-----------------------------------------------------------
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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review16109
-----------------------------------------------------------



usage/src/com/cloud/usage/UsageManagerImpl.java
<https://reviews.apache.org/r/8971/#comment34444>

    This should be hostAggregatedStat.setAggBytesSent( userStat.getNetBytesSent() + userStat.getCurrentBytesSent());
    
    Note that Agg = net + current


- Kishan Kavala


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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962 CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Rohit Yadav <bh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review16857
-----------------------------------------------------------


Kishan you are in a better position to review it, review it pl.?

- Rohit Yadav


On Feb. 21, 2013, 11:31 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2013, 11:31 a.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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962 CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review17024
-----------------------------------------------------------


Wei Zhou,
 With your patch, UsageServer looks for agg_bytes for daily/hourly aggregation and current + net in other cases. Instead UsageServer should always check agg_bytes. NetworkUsageTask in VirtualNetworkApplianceManagerImpl should update current + net incase of daily/hourly aggregation and agg_bytes in other cases.

In short, my point is that fix should be at the source of the data generation (i.e when data is persisted in user_statistics table after collection from router). There won't be any changes required at all in usage server with this approach.

- Kishan Kavala


On Feb. 21, 2013, 11:31 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2013, 11:31 a.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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review17087
-----------------------------------------------------------

Ship it!


commit 03fdbfb29193885830de90edcbb6f71bd0baf487

- Kishan Kavala


On Feb. 25, 2013, 10:47 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> 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.
> 
> 
> 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review17086
-----------------------------------------------------------

Ship it!


Ship It!

- Kishan Kavala


On Feb. 25, 2013, 10:47 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> 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.
> 
> 
> 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Kishan Kavala <Ki...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review18260
-----------------------------------------------------------

Ship it!


Ship It!

- Kishan Kavala


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review20600
-----------------------------------------------------------


Commit 8f7a51ee5f5d745026d51b9ca3b2746a39f00bf2 in branch refs/heads/ui-vpc-redesign from Chip Childers <ch...@gmail.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=8f7a51e ]

CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685)
https://reviews.apache.org/r/11157/

Signed-off-by: Chip Childers <ch...@gmail.com>


- ASF Subversion and Git Services


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review20595
-----------------------------------------------------------


Commit 8f7a51ee5f5d745026d51b9ca3b2746a39f00bf2 in branch refs/heads/master from Chip Childers <ch...@gmail.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=8f7a51e ]

CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685)
https://reviews.apache.org/r/11157/

Signed-off-by: Chip Childers <ch...@gmail.com>


- ASF Subversion and Git Services


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review18256
-----------------------------------------------------------


Commit 5ac59fbecbae069ab46048e9a73a6f7b8fb2d4b1 in branch refs/heads/4.0 from Kishan Kavala <ki...@cloud.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5ac59fb ]

CLOUDSTACK-962: CloudStack usage server didn't store data to cloud_usage in correct time


- ASF Subversion and Git Services


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review20634
-----------------------------------------------------------


Commit 3fa8fda37c8b9fac1e38b57d28d23917106fe02b in branch refs/heads/object_store from Edison Su <su...@gmail.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=3fa8fda ]

CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685)
https://reviews.apache.org/r/11157/

Signed-off-by: Chip Childers <ch...@gmail.com>


- ASF Subversion and Git Services


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/#review20590
-----------------------------------------------------------


Commit e6af3bf112f33a8e02eb6d964ce799e6f30447e0 in branch refs/heads/4.1 from Chip Childers <ch...@gmail.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e6af3bf ]

CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685)
https://reviews.apache.org/r/11157/

Signed-off-by: Chip Childers <ch...@gmail.com>


- ASF Subversion and Git Services


On March 22, 2013, 9 a.m., Wei Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8971/
> -----------------------------------------------------------
> 
> (Updated March 22, 2013, 9 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).
> 
> This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681
> 
> 
> This addresses bug CLOUDSTACK-962.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
>   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 Networking, not Basic Networking).
> 
> usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
> usage.stats.job.aggregation.range = 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 = 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 = 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
> 
>


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/
-----------------------------------------------------------

(Updated March 22, 2013, 9 a.m.)


Review request for cloudstack, Kishan Kavala, Joe Brockmeier, 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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs (updated)
-----

  server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
  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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/
-----------------------------------------------------------

(Updated March 22, 2013, 8:58 a.m.)


Review request for cloudstack, Kishan Kavala, Joe Brockmeier, and Rohit Yadav.


Changes
-------

update patch for 4.0 branch


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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs (updated)
-----

  server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 008c7c2 
  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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Prasanna Santhanam <Pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/
-----------------------------------------------------------

(Updated March 22, 2013, 8:25 a.m.)


Review request for cloudstack, Kishan Kavala, Joe Brockmeier, and Rohit Yadav.


Changes
-------

including jzb for the patch inclusion in the 4.0 branch


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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs
-----

  server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/
-----------------------------------------------------------

(Updated March 22, 2013, 8:11 a.m.)


Review request for cloudstack, Kishan Kavala and Rohit Yadav.


Changes
-------

This patch also need to be committed to 4.0 branch.


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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs
-----

  server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: (CLOUDSTACK-962) CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.
-----------------------------------------------------------
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 in 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 in correct time


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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


This addresses bug CLOUDSTACK-962.


Diffs (updated)
-----

  server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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


Re: Review Request: (CLOUDSTACK-962 CloudStack usage server didn't store data to cloud_usage in correct time

Posted by Wei Zhou <w....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8971/
-----------------------------------------------------------

(Updated Feb. 21, 2013, 11:31 a.m.)


Review request for cloudstack, Kishan Kavala and Rohit Yadav.


Changes
-------

Could someone have a look at this one?
I have tested it for more than a weeks, it looks fine.


Summary (updated)
-----------------

(CLOUDSTACK-962 CloudStack usage server didn't store data to cloud_usage in correct time


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:30-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 traffic 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 example 16).

This is a patch for this issue (all details are described here: https://issues.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=incubator-cloudstack.git;a=commit;h=2f1d83037bd4bb1165b378d6c1dfc2815f696681


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 Networking, not Basic Networking).

usage.stats.job.aggregation.range = 5, the usage server collects data every 10 minutes (such as collect data traffic between 13:00:00-13:10:00 at 13:10:00).
usage.stats.job.aggregation.range = 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 = 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 = 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