You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Adrian Cole (JIRA)" <ji...@apache.org> on 2011/08/13 13:39:27 UTC
[jira] [Updated] (WHIRR-363) ComputeCache redundantly creates
ComputeServiceContexts
[ https://issues.apache.org/jira/browse/WHIRR-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrian Cole updated WHIRR-363:
------------------------------
Attachment: ComputeCache.java
save as the following once WHIRR-361 is applied
./core/src/main/java/org/apache/whirr/service/ComputeCache.java
> ComputeCache redundantly creates ComputeServiceContexts
> -------------------------------------------------------
>
> Key: WHIRR-363
> URL: https://issues.apache.org/jira/browse/WHIRR-363
> Project: Whirr
> Issue Type: Bug
> Affects Versions: 0.6.0
> Reporter: Adrian Cole
> Assignee: Adrian Cole
> Fix For: 0.6.0
>
> Attachments: ComputeCache.java
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Previously, ComputeCache used a stringified Key to ensure we don't create another ComputeService for the same provider. At some point, Key was modified to use both a string and a commons configuration object. Since commons configuration doesn't implement hashCode in a predictable way, the ComputeCache creates a new ComputeServiceContext each time it is used. Since we don't log or test this, it was easy to miss.
> Adding a simple log statement inside ComputeCache shows this:
> 2011-08-13 12:29:22,532 INFO [org.apache.whirr.service.hbase.integration.HBaseServiceController] (main) Starting up cluster...
> 2011-08-13 12:29:37,760 INFO [org.apache.whirr.service.ComputeCache] (main) created new ComputeServiceContext [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
> 2011-08-13 12:29:46,115 INFO [org.apache.whirr.service.ComputeCache] (main) created new ComputeServiceContext [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
> 2011-08-13 12:29:46,118 INFO [org.apache.whirr.actions.BootstrapClusterAction] (main) Bootstrapping cluster
> --snip--
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira