brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <>
Subject [GitHub] incubator-brooklyn pull request: Mongodb authentication
Date Tue, 15 Sep 2015 09:53:47 GMT
Github user sjcorbett commented on a diff in the pull request:
    --- Diff: software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/
    @@ -19,32 +19,47 @@
     package org.apache.brooklyn.entity.nosql.mongodb.sharding;
     import java.util.Collection;
    +import java.util.concurrent.ExecutionException;
     import org.apache.brooklyn.api.entity.EntitySpec;
     import org.apache.brooklyn.api.location.Location;
    +import org.apache.brooklyn.api.mgmt.Task;
     import org.apache.brooklyn.core.entity.Entities;
     import org.apache.brooklyn.core.entity.trait.Startable;
     import org.apache.brooklyn.core.sensor.DependentConfiguration;
     import org.apache.brooklyn.enricher.stock.Enrichers;
    +import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationMixins;
    +import org.apache.brooklyn.entity.nosql.mongodb.MongoDBAuthenticationUtils;
    +import org.apache.brooklyn.util.exceptions.Exceptions;
    -public class CoLocatedMongoDBRouterImpl extends SameServerEntityImpl implements CoLocatedMongoDBRouter
    +public class CoLocatedMongoDBRouterImpl extends SameServerEntityImpl implements CoLocatedMongoDBRouter,
MongoDBAuthenticationMixins {
    +    private MongoDBRouter router;
         public void init() {
    +        router = addChild(EntitySpec.create(MongoDBRouter.class)
    +                .configure(MongoDBRouter.CONFIG_SERVERS,
    +                        DependentConfiguration.attributeWhenReady(
    +                                getConfig(CoLocatedMongoDBRouter.SHARDED_DEPLOYMENT),
    +                                MongoDBConfigServerCluster.CONFIG_SERVER_ADDRESSES)));
             for (EntitySpec<?> siblingSpec : getConfig(CoLocatedMongoDBRouter.SIBLING_SPECS))
    +        sensors().set(ROUTER, (MongoDBRouter) Iterables.tryFind(getChildren(), Predicates.instanceOf(MongoDBRouter.class)).get());
         protected void doStart(Collection<? extends Location> locations) {
             // TODO Changed to create the router child after init as a workaround.
    --- End diff --
    Is this still valid now you've moved the creation of the router back to init?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message