Skip to content

Commit

Permalink
Configure split-bundle task interval different than loadReportGenerat…
Browse files Browse the repository at this point in the history
…ionTask-interval
  • Loading branch information
rdhabalia committed Jan 31, 2017
1 parent de2a611 commit 6607ef8
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 71 deletions.
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

0 comments on commit 6607ef8

Please sign in to comment.