You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2022. It is now read-only.
The error message "Hostname could not be found in context. HostNamePartitioningStrategy will not work." and variable name "hostname" are weird.
ContextNameKeyingStrategy: <-- problem code
@OverridepublicvoidsetContext(Contextcontext) {
super.setContext(context);
finalStringhostname = context.getProperty(CoreConstants.CONTEXT_NAME_KEY);
if (hostname == null) {
addError("Hostname could not be found in context. HostNamePartitioningStrategy will not work.");
} else {
contextNameHash = ByteBuffer.allocate(4).putInt(hostname.hashCode()).array();
}
}
HostNameKeyingStrategy:
@OverridepublicvoidsetContext(Contextcontext) {
super.setContext(context);
finalStringhostname = context.getProperty(CoreConstants.HOSTNAME_KEY);
if (hostname == null) {
if (!errorWasShown) {
addError("Hostname could not be found in context. HostNamePartitioningStrategy will not work.");
errorWasShown = true;
}
} else {
hostnameHash = ByteBuffer.allocate(4).putInt(hostname.hashCode()).array();
}
}
The text was updated successfully, but these errors were encountered:
The error message "Hostname could not be found in context. HostNamePartitioningStrategy will not work." and variable name "hostname" are weird.
ContextNameKeyingStrategy: <-- problem code
HostNameKeyingStrategy:
The text was updated successfully, but these errors were encountered: