Skip to content

Commit

Permalink
refactor(): rollback meaningless change
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawven committed Oct 12, 2024
1 parent 5e310b7 commit bf01947
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
22 changes: 11 additions & 11 deletions apollo-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@
<artifactId>mockserver-netty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.noconnor</groupId>
<artifactId>junitperf</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.noconnor</groupId>
<artifactId>junitperf</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end of test -->
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,4 @@ public interface ConfigManager {
* @return the config file instance for the namespace
*/
ConfigFile getConfigFile(String namespace, ConfigFileFormat configFileFormat);


}
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@
*/
public class DefaultConfigManager implements ConfigManager {

protected Map<String, Config> m_configs = Maps.newConcurrentMap();
protected Map<String, Object> m_configLocks = Maps.newConcurrentMap();
protected Map<String, ConfigFile> m_configFiles = Maps.newConcurrentMap();
protected Map<String, Object> m_configFileLocks = Maps.newConcurrentMap();
private Map<String, Config> m_configs = Maps.newConcurrentMap();
private Map<String, Object> m_configLocks = Maps.newConcurrentMap();
private Map<String, ConfigFile> m_configFiles = Maps.newConcurrentMap();
private Map<String, Object> m_configFileLocks = Maps.newConcurrentMap();
private ConfigFactoryManager m_factoryManager;

public DefaultConfigManager() {
m_factoryManager = ApolloInjector.getInstance(ConfigFactoryManager.class);

}

@Override
Expand All @@ -61,16 +60,15 @@ public Config getConfig(String namespace) {
}
}
}
if(!ConfigSourceType.NONE.equals(config.getSourceType())) {
Tracer.logMetricsForCount(APOLLO_CLIENT_NAMESPACE_USAGE+":"+namespace);
if (!ConfigSourceType.NONE.equals(config.getSourceType())) {
Tracer.logMetricsForCount(APOLLO_CLIENT_NAMESPACE_USAGE + ":" + namespace);
}

return config;
}

@Override
public ConfigFile getConfigFile(String namespace,
ConfigFileFormat configFileFormat) {
public ConfigFile getConfigFile(String namespace, ConfigFileFormat configFileFormat) {
String namespaceFileName = String.format("%s.%s", namespace, configFileFormat.getValue());
ConfigFile configFile = m_configFiles.get(namespaceFileName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
import com.google.inject.Singleton;
import java.util.List;

;

/**
* Guice injector
* @author Jason Song([email protected])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void doLongPollingRefresh(String appId, String cluster, String dataCente
transaction.setStatus(ex);
long sleepTimeInSecond = m_longPollFailSchedulePolicyInSecond.fail();
if (ex.getCause() instanceof SocketTimeoutException) {
Tracer.logEvent(APOLLO_CLIENT_NAMESPACE_TIMEOUT,assembleNamespaces());
Tracer.logEvent(APOLLO_CLIENT_NAMESPACE_TIMEOUT, assembleNamespaces());
}
logger.warn(
"Long polling failed, will retry in {} seconds. appId: {}, cluster: {}, namespaces: {}, long polling url: {}, reason: {}",
Expand Down

0 comments on commit bf01947

Please sign in to comment.