Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure split-bundle task interval different than loadReportGenerationTask-interval #183

Merged
merged 1 commit into from Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions conf/broker.conf
Expand Up @@ -237,9 +237,6 @@ loadBalancerBrokerComfortLoadLevelPercentage=65
# enable/disable namespace bundle auto split
loadBalancerAutoBundleSplitEnabled=false

# interval to detect & split hot namespace bundle
loadBalancerNamespaceBundleSplitIntervalMinutes=15

# maximum topics in a bundle, otherwise bundle split will be triggered
loadBalancerNamespaceBundleMaxTopics=1000

Expand Down
3 changes: 0 additions & 3 deletions conf/standalone.conf
Expand Up @@ -210,9 +210,6 @@ loadBalancerBrokerComfortLoadLevelPercentage=65
# enable/disable namespace bundle auto split
loadBalancerAutoBundleSplitEnabled=false

# interval to detect & split hot namespace bundle
loadBalancerNamespaceBundleSplitIntervalMinutes=15

# maximum topics in a bundle, otherwise bundle split will be triggered
loadBalancerNamespaceBundleMaxTopics=1000

Expand Down
Expand Up @@ -207,8 +207,6 @@ public class ServiceConfiguration implements PulsarConfiguration{
private int loadBalancerBrokerComfortLoadLevelPercentage = 65;
// enable/disable automatic namespace bundle split
private boolean loadBalancerAutoBundleSplitEnabled = false;
// interval to detect & split hot namespace bundle
private int loadBalancerNamespaceBundleSplitIntervalMinutes = 15;
// maximum topics in a bundle, otherwise bundle split will be triggered
private int loadBalancerNamespaceBundleMaxTopics = 1000;
// maximum sessions (producers + consumers) in a bundle, otherwise bundle split will be triggered
Expand Down Expand Up @@ -759,14 +757,6 @@ public int getLoadBalancerBrokerOverloadedThresholdPercentage() {
return loadBalancerBrokerOverloadedThresholdPercentage;
}

public void setLoadBalancerBundleSplitIntervalMinutes(int interval) {
this.loadBalancerNamespaceBundleSplitIntervalMinutes = interval;
}

public int getLoadBalancerBundleSplitIntervalMinutes() {
return this.loadBalancerNamespaceBundleSplitIntervalMinutes;
}

public void setLoadBalancerNamespaceBundleMaxTopics(int topics) {
this.loadBalancerNamespaceBundleMaxTopics = topics;
}
Expand Down
Expand Up @@ -45,7 +45,6 @@
import com.yahoo.pulsar.broker.loadbalance.LoadReportUpdaterTask;
import com.yahoo.pulsar.broker.loadbalance.LoadResourceQuotaUpdaterTask;
import com.yahoo.pulsar.broker.loadbalance.LoadSheddingTask;
import com.yahoo.pulsar.broker.loadbalance.NamespaceBundleSplitTask;
import com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl;
import com.yahoo.pulsar.broker.namespace.NamespaceService;
import com.yahoo.pulsar.broker.service.BrokerService;
Expand Down Expand Up @@ -92,7 +91,6 @@ public class PulsarService implements AutoCloseable {
private final OrderedSafeExecutor orderedExecutor = new OrderedSafeExecutor(8, "pulsar-ordered");
private ScheduledExecutorService loadManagerExecutor = null;
private ScheduledFuture<?> loadReportTask = null;
private ScheduledFuture<?> bundleSplitTask = null;
private ScheduledFuture<?> loadSheddingTask = null;
private ScheduledFuture<?> loadResourceQuotaTask = null;
private LoadManager loadManager = null;
Expand Down Expand Up @@ -408,13 +406,6 @@ private void startLoadManagementService() throws PulsarServerException {
new LoadReportUpdaterTask(loadManager), loadReportMinInterval, loadReportMinInterval,
TimeUnit.MILLISECONDS);
}
if (this.bundleSplitTask == null) {
long bundleSplitInterval = TimeUnit.MINUTES
.toMillis(getConfiguration().getLoadBalancerBundleSplitIntervalMinutes());
this.bundleSplitTask = this.loadManagerExecutor.scheduleAtFixedRate(
new NamespaceBundleSplitTask(loadManager), bundleSplitInterval, bundleSplitInterval,
TimeUnit.MILLISECONDS);
}
}
}

Expand Down

This file was deleted.

Expand Up @@ -1199,6 +1199,8 @@ public void writeLoadReportOnZookeeper() throws Exception {
-1);
this.lastLoadReport = lr;
this.lastResourceUsageTimestamp = lr.getTimestamp();
// split-bundle if requires
doNamespaceBundleSplit();
}
}

Expand Down
Expand Up @@ -459,10 +459,6 @@ public void testTask() throws Exception {
LoadSheddingTask task2 = new LoadSheddingTask(loadManager);
task2.run();
verify(loadManager, times(1)).doLoadShedding();

NamespaceBundleSplitTask task3 = new NamespaceBundleSplitTask(loadManager);
task3.run();
verify(loadManager, times(1)).doNamespaceBundleSplit();
}

@Test
Expand Down