codelipenghui commented on code in PR #18949:
URL: https://github.com/apache/pulsar/pull/18949#discussion_r1051276223
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -1440,6 +1440,17 @@ public static boolean isSystemServiceNamespace(String
namespace) {
|| HEARTBEAT_NAMESPACE_PATTERN_V2.matcher(namespace).matches();
}
+ /**
+ * used for filtering bundles in special namespace.
+ * @param namespace
+ * @return True if namespace is HEARTBEAT_NAMESPACE or SLA_NAMESPACE
+ */
+ public static boolean filterNamespaceForShedding(String namespace) {
+ return SLA_NAMESPACE_PATTERN.matcher(namespace).matches()
+ || HEARTBEAT_NAMESPACE_PATTERN.matcher(namespace).matches()
+ || HEARTBEAT_NAMESPACE_PATTERN_V2.matcher(namespace).matches();
+ }
+
Review Comment:
If it is only used by `LoadData.java`, can we move to the internal of the
`LoadData.java`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]