Skip to content

Commit

Permalink
[improve][broker] Improve NamespaceUnloadStrategy error message (#21880)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosvictor committed Jan 11, 2024
1 parent 46ec730 commit 80e3890
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,8 @@ private static NamespaceUnloadStrategy createNamespaceUnloadStrategy(PulsarServi
Thread.currentThread().getContextClassLoader());
log.info("Created namespace unload strategy:{}", unloadStrategy.getClass().getCanonicalName());
} catch (Exception e) {
log.error("Error when trying to create namespace unload strategy: {}",
conf.getLoadBalancerLoadPlacementStrategy(), e);
log.error("create namespace unload strategy failed. using TransferShedder instead.");
log.error("Error when trying to create namespace unload strategy: {}. Using {} instead.",
conf.getLoadBalancerLoadSheddingStrategy(), TransferShedder.class.getCanonicalName(), e);
unloadStrategy = new TransferShedder();
}
unloadStrategy.initialize(pulsar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.authentication.AuthenticationService;
import org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImpl;
import org.apache.pulsar.broker.loadbalance.extensions.scheduler.TransferShedder;
import org.apache.pulsar.client.admin.PulsarAdminException;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
Expand Down Expand Up @@ -97,6 +98,7 @@ private ServiceConfiguration configureExtensibleLoadManager(ServiceConfiguration
config.setLoadBalancerInFlightServiceUnitStateWaitingTimeInMillis(5 * 1000);
config.setLoadBalancerServiceUnitStateMonitorIntervalInSeconds(1);
config.setLoadManagerClassName(ExtensibleLoadManagerImpl.class.getName());
config.setLoadBalancerLoadSheddingStrategy(TransferShedder.class.getName());
config.setLoadBalancerSheddingEnabled(false);
return config;
}
Expand Down

0 comments on commit 80e3890

Please sign in to comment.