public Parameters(Map<String, String> params) { clusterName = params.get("cluster"); distributionConfigId = params.get("clusterconfigid"); slobrokHostPatternGenerator = createPatternGenerator(); if (clusterName == null) throw new IllegalArgumentException("Required parameter cluster with clustername not set"); }
public StoragePolicy(Map<String, String> params) { this(new Parameters(params), params); }
public Distribution createDistribution(ExternalSlobrokPolicy policy) { return (policy.configSources != null ? new Distribution(getDistributionConfigId(), new ConfigSourceSet(policy.configSources)) : new Distribution(getDistributionConfigId())); }
public SlobrokHostPatternGenerator createPatternGenerator() { return new SlobrokHostPatternGenerator(getClusterName()); } public HostFetcher createHostFetcher(ExternalSlobrokPolicy policy) {
public DistributorSelectionLogic(Parameters params, ExternalSlobrokPolicy policy) { this.hostFetcher = params.createHostFetcher(policy); this.hostFetcher.setRequiredUpPercentageToSendToKnownGoodNodes(params.getRequiredUpPercentageToSendToKnownGoodNodes()); this.distribution = params.createDistribution(policy); persistentFailureChecker = new InstabilityChecker(params.getAttemptRandomOnFailuresLimit()); maxOldClusterVersionBeforeSendingRandom = params.maxOldClusterStatesSeenBeforeThrowingCachedState(); }