Merge branch 'apache-3.1' into apache-3.2
# Conflicts: # dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/CacheableFailbackRegistry.java
This commit is contained in:
commit
eba39fd65b
|
|
@ -22,7 +22,7 @@ import org.apache.dubbo.common.logger.LoggerFactory;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
import static org.apache.dubbo.common.config.ConfigurationUtils.isEmptyValue;
|
import static org.apache.dubbo.common.config.ConfigurationUtils.isEmptyValue;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_MISSPELLING;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration interface, to fetch the value for the specified key.
|
* Configuration interface, to fetch the value for the specified key.
|
||||||
|
|
@ -74,7 +74,7 @@ public interface Configuration {
|
||||||
return convert(Integer.class, key, defaultValue);
|
return convert(Integer.class, key, defaultValue);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// 0-2 Property type mismatch.
|
// 0-2 Property type mismatch.
|
||||||
interfaceLevelLogger.error(COMMON_PROPERTY_MISSPELLING, "typo in property value",
|
interfaceLevelLogger.error(COMMON_PROPERTY_TYPE_MISMATCH, "typo in property value",
|
||||||
"This property requires an integer value.",
|
"This property requires an integer value.",
|
||||||
"Actual Class: " + getClass().getName(), e);
|
"Actual Class: " + getClass().getName(), e);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public interface LoggerCodeConstants {
|
||||||
// common module
|
// common module
|
||||||
String COMMON_THREAD_POOL_EXHAUSTED = "0-1";
|
String COMMON_THREAD_POOL_EXHAUSTED = "0-1";
|
||||||
|
|
||||||
String COMMON_PROPERTY_MISSPELLING = "0-2";
|
String COMMON_PROPERTY_TYPE_MISMATCH = "0-2";
|
||||||
|
|
||||||
String COMMON_CACHE_PATH_INACCESSIBLE = "0-3";
|
String COMMON_CACHE_PATH_INACCESSIBLE = "0-3";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ public class GlobalResourcesRepository {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (executorService == null || executorService.isShutdown()) {
|
if (executorService == null || executorService.isShutdown()) {
|
||||||
if (logger.isInfoEnabled()) {
|
if (logger.isInfoEnabled()) {
|
||||||
logger.error("Creating global shared handler ...");
|
logger.info("Creating global shared handler ...");
|
||||||
}
|
}
|
||||||
executorService = Executors.newCachedThreadPool(new NamedThreadFactory("Dubbo-global-shared-handler", true));
|
executorService = Executors.newCachedThreadPool(new NamedThreadFactory("Dubbo-global-shared-handler", true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,10 @@ public abstract class AbstractConfig implements Serializable {
|
||||||
* <b>NOTE:</b> the model maybe changed during config processing,
|
* <b>NOTE:</b> the model maybe changed during config processing,
|
||||||
* the extension spi instance needs to be reinitialized after changing the model!
|
* the extension spi instance needs to be reinitialized after changing the model!
|
||||||
*/
|
*/
|
||||||
protected ScopeModel scopeModel;
|
private volatile ScopeModel scopeModel;
|
||||||
|
|
||||||
public AbstractConfig() {
|
public AbstractConfig() {
|
||||||
this(ApplicationModel.defaultModel());
|
this(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractConfig(ScopeModel scopeModel) {
|
public AbstractConfig(ScopeModel scopeModel) {
|
||||||
|
|
@ -384,6 +384,9 @@ public abstract class AbstractConfig implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationModel getApplicationModel() {
|
public ApplicationModel getApplicationModel() {
|
||||||
|
if (scopeModel == null) {
|
||||||
|
setScopeModel(getDefaultModel());
|
||||||
|
}
|
||||||
if (scopeModel instanceof ApplicationModel) {
|
if (scopeModel instanceof ApplicationModel) {
|
||||||
return (ApplicationModel) scopeModel;
|
return (ApplicationModel) scopeModel;
|
||||||
} else if (scopeModel instanceof ModuleModel) {
|
} else if (scopeModel instanceof ModuleModel) {
|
||||||
|
|
@ -394,11 +397,18 @@ public abstract class AbstractConfig implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScopeModel getScopeModel() {
|
public ScopeModel getScopeModel() {
|
||||||
|
if (scopeModel == null) {
|
||||||
|
setScopeModel(getDefaultModel());
|
||||||
|
}
|
||||||
return scopeModel;
|
return scopeModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected ScopeModel getDefaultModel() {
|
||||||
|
return ApplicationModel.defaultModel();
|
||||||
|
}
|
||||||
|
|
||||||
public final void setScopeModel(ScopeModel scopeModel) {
|
public final void setScopeModel(ScopeModel scopeModel) {
|
||||||
if (this.scopeModel != scopeModel) {
|
if (scopeModel != null && this.scopeModel != scopeModel) {
|
||||||
checkScopeModel(scopeModel);
|
checkScopeModel(scopeModel);
|
||||||
ScopeModel oldScopeModel = this.scopeModel;
|
ScopeModel oldScopeModel = this.scopeModel;
|
||||||
this.scopeModel = scopeModel;
|
this.scopeModel = scopeModel;
|
||||||
|
|
@ -444,7 +454,7 @@ public abstract class AbstractConfig implements Serializable {
|
||||||
|
|
||||||
protected <T> ExtensionLoader<T> getExtensionLoader(Class<T> type) {
|
protected <T> ExtensionLoader<T> getExtensionLoader(Class<T> type) {
|
||||||
if (scopeModel == null) {
|
if (scopeModel == null) {
|
||||||
throw new IllegalStateException("scopeModel is not initialized");
|
setScopeModel(getScopeModel());
|
||||||
}
|
}
|
||||||
return scopeModel.getExtensionLoader(type);
|
return scopeModel.getExtensionLoader(type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
|
||||||
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
||||||
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
||||||
// change referenced config's scope model
|
// change referenced config's scope model
|
||||||
ApplicationModel applicationModel = ScopeModelUtil.getApplicationModel(scopeModel);
|
ApplicationModel applicationModel = ScopeModelUtil.getApplicationModel(getScopeModel());
|
||||||
if (this.configCenter != null && this.configCenter.getScopeModel() != applicationModel) {
|
if (this.configCenter != null && this.configCenter.getScopeModel() != applicationModel) {
|
||||||
this.configCenter.setScopeModel(applicationModel);
|
this.configCenter.setScopeModel(applicationModel);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ public abstract class AbstractMethodConfig extends AbstractConfig {
|
||||||
protected Integer forks;
|
protected Integer forks;
|
||||||
|
|
||||||
public AbstractMethodConfig() {
|
public AbstractMethodConfig() {
|
||||||
super(ApplicationModel.defaultModel().getDefaultModule());
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractMethodConfig(ModuleModel moduleModel) {
|
public AbstractMethodConfig(ModuleModel moduleModel) {
|
||||||
|
|
@ -109,7 +109,12 @@ public abstract class AbstractMethodConfig extends AbstractConfig {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ModuleModel getScopeModel() {
|
public ModuleModel getScopeModel() {
|
||||||
return (ModuleModel) scopeModel;
|
return (ModuleModel) super.getScopeModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ScopeModel getDefaultModel() {
|
||||||
|
return ApplicationModel.defaultModel().getDefaultModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class ModuleConfig extends AbstractConfig {
|
||||||
private Integer exportThreadNum;
|
private Integer exportThreadNum;
|
||||||
|
|
||||||
public ModuleConfig() {
|
public ModuleConfig() {
|
||||||
super(ApplicationModel.defaultModel().getDefaultModule());
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModuleConfig(ModuleModel moduleModel) {
|
public ModuleConfig(ModuleModel moduleModel) {
|
||||||
|
|
@ -129,6 +129,16 @@ public class ModuleConfig extends AbstractConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ModuleModel getScopeModel() {
|
||||||
|
return (ModuleModel) super.getScopeModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ScopeModel getDefaultModel() {
|
||||||
|
return ApplicationModel.defaultModel().getDefaultModule();
|
||||||
|
}
|
||||||
|
|
||||||
@Parameter(key = "module")
|
@Parameter(key = "module")
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
|
|
||||||
|
|
@ -240,8 +240,8 @@ public abstract class ReferenceConfigBase<T> extends AbstractReferenceConfig {
|
||||||
@Override
|
@Override
|
||||||
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
||||||
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
||||||
if (this.consumer != null && this.consumer.getScopeModel() != scopeModel) {
|
if (this.consumer != null && this.consumer.getScopeModel() != getScopeModel()) {
|
||||||
this.consumer.setScopeModel(scopeModel);
|
this.consumer.setScopeModel(getScopeModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,8 @@ public abstract class ServiceConfigBase<T> extends AbstractServiceConfig {
|
||||||
@Override
|
@Override
|
||||||
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
protected void postProcessAfterScopeModelChanged(ScopeModel oldScopeModel, ScopeModel newScopeModel) {
|
||||||
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
super.postProcessAfterScopeModelChanged(oldScopeModel, newScopeModel);
|
||||||
if (this.provider != null && this.provider.getScopeModel() != scopeModel) {
|
if (this.provider != null && this.provider.getScopeModel() != getScopeModel()) {
|
||||||
this.provider.setScopeModel(scopeModel);
|
this.provider.setScopeModel(getScopeModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ import static java.lang.Boolean.TRUE;
|
||||||
import static java.util.Collections.emptyMap;
|
import static java.util.Collections.emptyMap;
|
||||||
import static java.util.Optional.ofNullable;
|
import static java.util.Optional.ofNullable;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
|
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_MISSPELLING;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_UNEXPECTED_EXCEPTION;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_UNEXPECTED_EXCEPTION;
|
||||||
import static org.apache.dubbo.config.AbstractConfig.getTagName;
|
import static org.apache.dubbo.config.AbstractConfig.getTagName;
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ public abstract class AbstractConfigManager extends LifecycleAdapter {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = "Illegal '" + ConfigKeys.DUBBO_CONFIG_MODE + "' config value [" + configModeStr + "], available values " + Arrays.toString(ConfigMode.values());
|
String msg = "Illegal '" + ConfigKeys.DUBBO_CONFIG_MODE + "' config value [" + configModeStr + "], available values " + Arrays.toString(ConfigMode.values());
|
||||||
logger.error(COMMON_PROPERTY_MISSPELLING, "", "", msg, e);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", msg, e);
|
||||||
throw new IllegalArgumentException(msg, e);
|
throw new IllegalArgumentException(msg, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -506,7 +506,7 @@ public abstract class AbstractConfigManager extends LifecycleAdapter {
|
||||||
this.addConfig(config);
|
this.addConfig(config);
|
||||||
tmpConfigs.add(config);
|
tmpConfigs.add(config);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(COMMON_PROPERTY_MISSPELLING, "", "", "load config failed, id: " + id + ", type:" + cls.getSimpleName(), e);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", "load config failed, id: " + id + ", type:" + cls.getSimpleName(), e);
|
||||||
throw new IllegalStateException("load config failed, id: " + id + ", type:" + cls.getSimpleName());
|
throw new IllegalStateException("load config failed, id: " + id + ", type:" + cls.getSimpleName());
|
||||||
} finally {
|
} finally {
|
||||||
if (addDefaultNameConfig && key != null) {
|
if (addDefaultNameConfig && key != null) {
|
||||||
|
|
|
||||||
|
|
@ -608,7 +608,7 @@ public class ReferenceConfig<T> extends ReferenceConfigBase<T> {
|
||||||
!curUrl.getParameter(UNLOAD_CLUSTER_RELATED, false)) {
|
!curUrl.getParameter(UNLOAD_CLUSTER_RELATED, false)) {
|
||||||
List<Invoker<?>> invokers = new ArrayList<>();
|
List<Invoker<?>> invokers = new ArrayList<>();
|
||||||
invokers.add(invoker);
|
invokers.add(invoker);
|
||||||
invoker = Cluster.getCluster(scopeModel, Cluster.DEFAULT).join(new StaticDirectory(curUrl, invokers), true);
|
invoker = Cluster.getCluster(getScopeModel(), Cluster.DEFAULT).join(new StaticDirectory(curUrl, invokers), true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
List<Invoker<?>> invokers = new ArrayList<>();
|
List<Invoker<?>> invokers = new ArrayList<>();
|
||||||
|
|
@ -638,7 +638,7 @@ public class ReferenceConfig<T> extends ReferenceConfigBase<T> {
|
||||||
}
|
}
|
||||||
URL curUrl = invokers.get(0).getUrl();
|
URL curUrl = invokers.get(0).getUrl();
|
||||||
String cluster = curUrl.getParameter(CLUSTER_KEY, Cluster.DEFAULT);
|
String cluster = curUrl.getParameter(CLUSTER_KEY, Cluster.DEFAULT);
|
||||||
invoker = Cluster.getCluster(scopeModel, cluster).join(new StaticDirectory(curUrl, invokers), true);
|
invoker = Cluster.getCluster(getScopeModel(), cluster).join(new StaticDirectory(curUrl, invokers), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,7 @@ class MultiInstanceTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testMultiProviderApplicationsStopOneByOne() {
|
void testMultiProviderApplicationsStopOneByOne() {
|
||||||
|
FrameworkModel.destroyAll();
|
||||||
|
|
||||||
String version1 = "1.0";
|
String version1 = "1.0";
|
||||||
String version2 = "2.0";
|
String version2 = "2.0";
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,6 @@
|
||||||
<groupId>org.apache.dubbo</groupId>
|
<groupId>org.apache.dubbo</groupId>
|
||||||
<artifactId>dubbo-registry-zookeeper</artifactId>
|
<artifactId>dubbo-registry-zookeeper</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.dubbo</groupId>
|
|
||||||
<artifactId>dubbo-configcenter-zookeeper</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.dubbo</groupId>
|
<groupId>org.apache.dubbo</groupId>
|
||||||
<artifactId>dubbo-rpc-dubbo</artifactId>
|
<artifactId>dubbo-rpc-dubbo</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -1947,7 +1947,14 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "org.apache.dubbo.remoting.zookeeper.curator5.Curator5ZookeeperTransporter"
|
"name": "org.apache.dubbo.remoting.zookeeper.curator5.Curator5ZookeeperTransporter",
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"methods": [
|
||||||
|
{
|
||||||
|
"name": "<init>",
|
||||||
|
"parameterTypes": []
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "org.apache.dubbo.rpc.Invoker",
|
"name": "org.apache.dubbo.rpc.Invoker",
|
||||||
|
|
@ -2556,6 +2563,10 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "org.apache.logging.log4j.Level",
|
||||||
|
"allPublicMethods": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "org.apache.log4j.helpers.Loader"
|
"name": "org.apache.log4j.helpers.Loader"
|
||||||
},
|
},
|
||||||
|
|
@ -2565,6 +2576,10 @@
|
||||||
{
|
{
|
||||||
"name": "org.apache.zookeeper.ClientCnxnSocketNIO",
|
"name": "org.apache.zookeeper.ClientCnxnSocketNIO",
|
||||||
"methods": [
|
"methods": [
|
||||||
|
{
|
||||||
|
"name": "<init>",
|
||||||
|
"parameterTypes": ["org.apache.zookeeper.client.ZKClientConfig"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "<init>",
|
"name": "<init>",
|
||||||
"parameterTypes": []
|
"parameterTypes": []
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import org.apache.dubbo.registry.client.ServiceInstance;
|
||||||
import org.apache.dubbo.registry.client.ServiceInstanceCustomizer;
|
import org.apache.dubbo.registry.client.ServiceInstanceCustomizer;
|
||||||
import org.apache.dubbo.rpc.Protocol;
|
import org.apache.dubbo.rpc.Protocol;
|
||||||
import org.apache.dubbo.rpc.model.ApplicationModel;
|
import org.apache.dubbo.rpc.model.ApplicationModel;
|
||||||
|
import org.apache.dubbo.common.constants.LoggerCodeConstants;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -55,8 +56,8 @@ public class ProtocolPortsMetadataCustomizer implements ServiceInstanceCustomize
|
||||||
Integer oldPort = protocols.get(protocol);
|
Integer oldPort = protocols.get(protocol);
|
||||||
int newPort = url.getPort();
|
int newPort = url.getPort();
|
||||||
if (oldPort != null) {
|
if (oldPort != null) {
|
||||||
LOGGER.warn("same protocol " + "[" + protocol + "]" + " listen on different ports " + "[" + oldPort + "," + newPort + "]" + " will override with each other" +
|
LOGGER.warn(LoggerCodeConstants.PROTOCOL_INCORRECT_PARAMETER_VALUES, "the protocol is listening multiple ports", "", "Same protocol " + "[" + protocol + "]" + " listens on different ports " + "[" + oldPort + "," + newPort + "]" + " will override with each other" +
|
||||||
".Override port [" + oldPort + "] with port [" + newPort + "]");
|
". The port [" + oldPort + "] is overridden with port [" + newPort + "].");
|
||||||
}
|
}
|
||||||
protocols.put(protocol, newPort);
|
protocols.put(protocol, newPort);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_INCORRECT_PARAMETER_VALUES;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
|
|
||||||
public class DefaultMigrationAddressComparator implements MigrationAddressComparator {
|
public class DefaultMigrationAddressComparator implements MigrationAddressComparator {
|
||||||
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(DefaultMigrationAddressComparator.class);
|
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(DefaultMigrationAddressComparator.class);
|
||||||
|
|
@ -75,7 +75,7 @@ public class DefaultMigrationAddressComparator implements MigrationAddressCompar
|
||||||
try {
|
try {
|
||||||
threshold = Float.parseFloat(rawThreshold);
|
threshold = Float.parseFloat(rawThreshold);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", "Invalid migration threshold " + rawThreshold);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", "Invalid migration threshold " + rawThreshold);
|
||||||
threshold = DEFAULT_THREAD;
|
threshold = DEFAULT_THREAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_THREAD_INTERRUPTED_EXCEPTION;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_THREAD_INTERRUPTED_EXCEPTION;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_INCORRECT_PARAMETER_VALUES;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_EMPTY_ADDRESS;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_EMPTY_ADDRESS;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_UNEXPECTED_EXCEPTION;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_UNEXPECTED_EXCEPTION;
|
||||||
import static org.apache.dubbo.common.constants.RegistryConstants.INIT;
|
import static org.apache.dubbo.common.constants.RegistryConstants.INIT;
|
||||||
|
|
@ -135,7 +135,7 @@ public class MigrationRuleListener implements RegistryProtocolListener, Configur
|
||||||
try {
|
try {
|
||||||
delay = Integer.parseInt(delayStr);
|
delay = Integer.parseInt(delayStr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.warn(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", "Invalid migration delay param " + delayStr);
|
logger.warn(COMMON_PROPERTY_TYPE_MISMATCH, "", "", "Invalid migration delay param " + delayStr);
|
||||||
}
|
}
|
||||||
return delay;
|
return delay;
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ public class MigrationRuleListener implements RegistryProtocolListener, Configur
|
||||||
if (StringUtils.isEmpty(rawRule)) {
|
if (StringUtils.isEmpty(rawRule)) {
|
||||||
// fail back to startup status
|
// fail back to startup status
|
||||||
rawRule = INIT;
|
rawRule = INIT;
|
||||||
//logger.warn(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", "Received empty migration rule, will ignore.");
|
//logger.warn(COMMON_PROPERTY_TYPE_MISMATCH, "", "", "Received empty migration rule, will ignore.");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
ruleQueue.put(rawRule);
|
ruleQueue.put(rawRule);
|
||||||
|
|
@ -226,7 +226,7 @@ public class MigrationRuleListener implements RegistryProtocolListener, Configur
|
||||||
try {
|
try {
|
||||||
tmpRule = MigrationRule.parse(rawRule);
|
tmpRule = MigrationRule.parse(rawRule);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", "Failed to parse migration rule...", e);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", "Failed to parse migration rule...", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tmpRule;
|
return tmpRule;
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ import static org.apache.dubbo.common.constants.CommonConstants.CHECK_KEY;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
|
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
|
import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_SEPARATOR_ENCODED;
|
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_SEPARATOR_ENCODED;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_MISSPELLING;
|
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_ADDRESS_INVALID;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_ADDRESS_INVALID;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_EMPTY_ADDRESS;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_EMPTY_ADDRESS;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_FAILED_CLEAR_CACHED_URLS;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_FAILED_CLEAR_CACHED_URLS;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_FAILED_URL_EVICTING;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_FAILED_URL_EVICTING;
|
||||||
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_NO_PARAMETERS_URL;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_NO_PARAMETERS_URL;
|
||||||
import static org.apache.dubbo.common.constants.RegistryConstants.CATEGORY_KEY;
|
import static org.apache.dubbo.common.constants.RegistryConstants.CATEGORY_KEY;
|
||||||
import static org.apache.dubbo.common.constants.RegistryConstants.DEFAULT_ENABLE_EMPTY_PROTECTION;
|
import static org.apache.dubbo.common.constants.RegistryConstants.DEFAULT_ENABLE_EMPTY_PROTECTION;
|
||||||
|
|
@ -115,7 +115,7 @@ public abstract class CacheableFailbackRegistry extends FailbackRegistry {
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// 0-2 Property type mismatch.
|
// 0-2 Property type mismatch.
|
||||||
|
|
||||||
logger.warn(COMMON_PROPERTY_MISSPELLING, "typo in property value", "This property requires an integer value.",
|
logger.warn(COMMON_PROPERTY_TYPE_MISMATCH, "typo in property value", "This property requires an integer value.",
|
||||||
"Invalid registry properties configuration key " + key + ", value " + str);
|
"Invalid registry properties configuration key " + key + ", value " + str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.METHODS_KEY;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
|
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_DESTROY_INVOKER;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_DESTROY_INVOKER;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_LOAD_MODEL;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_LOAD_MODEL;
|
||||||
import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_INCORRECT_PARAMETER_VALUES;
|
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
|
||||||
import static org.apache.dubbo.rpc.Constants.IS_SERVER_KEY;
|
import static org.apache.dubbo.rpc.Constants.IS_SERVER_KEY;
|
||||||
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.CALLBACK_SERVICE_KEY;
|
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.CALLBACK_SERVICE_KEY;
|
||||||
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.CALLBACK_SERVICE_PROXY_KEY;
|
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.CALLBACK_SERVICE_PROXY_KEY;
|
||||||
|
|
@ -286,7 +286,7 @@ public class CallbackServiceCodec {
|
||||||
}
|
}
|
||||||
channel.setAttribute(countkey, count);
|
channel.setAttribute(countkey, count);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", e.getMessage(), e);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -300,7 +300,7 @@ public class CallbackServiceCodec {
|
||||||
}
|
}
|
||||||
channel.setAttribute(countkey, count);
|
channel.setAttribute(countkey, count);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(PROTOCOL_INCORRECT_PARAMETER_VALUES, "", "", e.getMessage(), e);
|
logger.error(COMMON_PROPERTY_TYPE_MISMATCH, "", "", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue