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

[improve][broker] Improve NamespaceUnloadStrategy error message #21880

Merged
merged 4 commits into from
Jan 11, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading