jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignasi Barrera (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (JCLOUDS-357) ComputeService.listnodes() in the case of softlayer cloud takes about 2 minutes for cloud with only 3 machines
Date Sun, 10 Nov 2013 22:30:19 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818577#comment-13818577
] 

Ignasi Barrera edited comment on JCLOUDS-357 at 11/10/13 10:29 PM:
-------------------------------------------------------------------

There is no way to configure that directly, but you can customize it. Jclouds uses a set of
transformation functions to convert objects from the provider domain model to the jclouds
portable one. Those functions are usually [bound to the Guice|https://github.com/jclouds/jclouds/blob/master/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java#L75-L82]
context so they are easy to override.

You could build your own transformation function for the _NodeMetadata_ and configure a linked
binding so it replaces the default one:

{code:java}
public class CustomTransformations extends AbstractModule {
   @Override
   protected void configure() {
      bind(VirtualGuestToNodeMetadata.class).to(YourCustomFunction.class);
   }
{code}

And make sure you include that module in the list of modules used to create the jclouds context.

Let us know if that helps!


was (Author: nacx):
There is no way to configure that directly, but you can customize it. Jclouds uses a set of
transformation functions to convert objects from the provider domain model to the jclouds
portable one. Those functions are usually [bound to the Guice|https://github.com/jclouds/jclouds/blob/master/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java#L75-L82]
context so they are easy to override.

You could build your own transformation function for the _NodeMetadata_ and configure a linked
binding so it replaces the default one:

{code:java}
public class CustomTransformations extends AbstractModule {
   @Override
   protected void configure() {
      bind(VirtualGuestToNodeMetadata.class).to(YourCustomFunction.class);
   }
{code}

And make sure you include that module in the list of modules used to create the jclouds context.

> ComputeService.listnodes() in the case of softlayer cloud takes about 2 minutes for cloud
with only 3 machines
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-357
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-357
>             Project: jclouds
>          Issue Type: Improvement
>          Components: jclouds-compute
>    Affects Versions: 1.5.10, 1.6.2
>         Environment: Windows 7 64-bit
>            Reporter: Evgeny Fisher
>            Priority: Critical
>              Labels: softlayer
>
> The significant delay is on the following call: method apply(VirtualGuest) of 
> org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata 
>  findLocationForVirtualGuest.apply(from).
> If I removes in above calling initializing location within builder then it improves performance
dramatically: instead of 2 minutes it takes now about 12 seconds in order to bring 3 nodes..
> Performance is improved as well if in addition to location the following fields of builder
are not initialized: operatingSystem, hardware, group.
> I think initializing of of these builder fields should be optional, since like in my
case I need only id, hostname, public IP and private ip.
> I'm aware that next calls will go to cache and will have much better performance, but
I need good performance already during first call.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message