Search in sources :

Example 1 with SharedResourcesBrokerImpl

use of org.apache.gobblin.broker.SharedResourcesBrokerImpl in project incubator-gobblin by apache.

the class AsyncHttpWriterTest method createMockBroker.

private static SharedResourcesBroker createMockBroker() {
    Joiner JOINER = Joiner.on(".");
    Config config = ConfigFactory.parseMap(ImmutableMap.of(JOINER.join(BrokerConstants.GOBBLIN_BROKER_CONFIG_PREFIX, SharedLimiterFactory.NAME, SharedLimiterFactory.LIMITER_CLASS_KEY), "qps", JOINER.join(BrokerConstants.GOBBLIN_BROKER_CONFIG_PREFIX, SharedLimiterFactory.NAME, RateBasedLimiter.Factory.QPS_KEY), "10"));
    SharedResourcesBrokerImpl broker = SharedResourcesBrokerFactory.<SimpleScopeType>createDefaultTopLevelBroker(config, SimpleScopeType.GLOBAL.defaultScopeInstance());
    return broker;
}
Also used : Joiner(com.google.common.base.Joiner) Config(com.typesafe.config.Config) SharedResourcesBrokerImpl(org.apache.gobblin.broker.SharedResourcesBrokerImpl) SimpleScopeType(org.apache.gobblin.broker.SimpleScopeType)

Aggregations

Joiner (com.google.common.base.Joiner)1 Config (com.typesafe.config.Config)1 SharedResourcesBrokerImpl (org.apache.gobblin.broker.SharedResourcesBrokerImpl)1 SimpleScopeType (org.apache.gobblin.broker.SimpleScopeType)1