mirror of
https://github.com/actiontech/dble.git
synced 2026-01-24 13:58:29 -06:00
system config clean up
This commit is contained in:
@@ -150,7 +150,6 @@ public class MycatServer {
|
||||
|
||||
private final MycatConfig config;
|
||||
private final ScheduledExecutorService scheduler;
|
||||
private final SQLRecorder sqlRecorder;
|
||||
private final AtomicBoolean isOnline;
|
||||
private final long startupTime;
|
||||
private NIOProcessor[] processors;
|
||||
@@ -170,9 +169,6 @@ public class MycatServer {
|
||||
//定时线程池,单线程线程池
|
||||
scheduler = Executors.newSingleThreadScheduledExecutor();
|
||||
|
||||
//SQL记录器
|
||||
this.sqlRecorder = new SQLRecorder(config.getSystem().getSqlRecordCount());
|
||||
|
||||
/**
|
||||
* 是否在线,MyCat manager中有命令控制
|
||||
* | offline | Change MyCat status to OFF |
|
||||
@@ -743,9 +739,6 @@ public class MycatServer {
|
||||
return connector;
|
||||
}
|
||||
|
||||
public SQLRecorder getSqlRecorder() {
|
||||
return sqlRecorder;
|
||||
}
|
||||
|
||||
public long getStartupTime() {
|
||||
return startupTime;
|
||||
|
||||
@@ -80,16 +80,12 @@ public class MycatPrivileges implements FrontendPrivileges {
|
||||
@Override
|
||||
public String getPassword(String user) {
|
||||
MycatConfig conf = MycatServer.getInstance().getConfig();
|
||||
if (user != null && user.equals(conf.getSystem().getClusterHeartbeatUser())) {
|
||||
return conf.getSystem().getClusterHeartbeatPass();
|
||||
} else {
|
||||
UserConfig uc = conf.getUsers().get(user);
|
||||
if (uc != null) {
|
||||
return uc.getPassword();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,8 +64,6 @@ public final class SystemConfig {
|
||||
private static final long DEFAULT_XA_LOG_CLEAN_PERIOD = 1 * 1000L;
|
||||
private static final long DEFAULT_DATANODE_IDLE_CHECK_PERIOD = 5 * 60 * 1000L;
|
||||
private static final long DEFAULT_DATANODE_HEARTBEAT_PERIOD = 10 * 1000L;
|
||||
private static final String DEFAULT_CLUSTER_HEARTBEAT_USER = "_HEARTBEAT_USER_";
|
||||
private static final String DEFAULT_CLUSTER_HEARTBEAT_PASS = "_HEARTBEAT_PASS_";
|
||||
private static final int DEFAULT_SQL_RECORD_COUNT = 10;
|
||||
private static final boolean DEFAULT_USE_ZK_SWITCH = true;
|
||||
private static final boolean DEFAULT_LOWER_CASE = true;
|
||||
@@ -108,8 +106,6 @@ public final class SystemConfig {
|
||||
private long xaLogCleanPeriod;
|
||||
private long dataNodeIdleCheckPeriod;
|
||||
private long dataNodeHeartbeatPeriod;
|
||||
private String clusterHeartbeatUser;
|
||||
private String clusterHeartbeatPass;
|
||||
private int txIsolation;
|
||||
private int sqlRecordCount;
|
||||
private int recordTxn = 0;
|
||||
@@ -216,8 +212,6 @@ public final class SystemConfig {
|
||||
this.xaLogCleanPeriod = DEFAULT_XA_LOG_CLEAN_PERIOD;
|
||||
this.dataNodeIdleCheckPeriod = DEFAULT_DATANODE_IDLE_CHECK_PERIOD;
|
||||
this.dataNodeHeartbeatPeriod = DEFAULT_DATANODE_HEARTBEAT_PERIOD;
|
||||
this.clusterHeartbeatUser = DEFAULT_CLUSTER_HEARTBEAT_USER;
|
||||
this.clusterHeartbeatPass = DEFAULT_CLUSTER_HEARTBEAT_PASS;
|
||||
this.txIsolation = Isolations.REPEATED_READ;
|
||||
this.sqlRecordCount = DEFAULT_SQL_RECORD_COUNT;
|
||||
this.glableTableCheckPeriod = DEFAULT_GLOBAL_TABLE_CHECK_PERIOD;
|
||||
@@ -583,14 +577,6 @@ public final class SystemConfig {
|
||||
this.dataNodeHeartbeatPeriod = dataNodeHeartbeatPeriod;
|
||||
}
|
||||
|
||||
public String getClusterHeartbeatUser() {
|
||||
return clusterHeartbeatUser;
|
||||
}
|
||||
|
||||
public void setClusterHeartbeatUser(String clusterHeartbeatUser) {
|
||||
this.clusterHeartbeatUser = clusterHeartbeatUser;
|
||||
}
|
||||
|
||||
public long getSqlExecuteTimeout() {
|
||||
return sqlExecuteTimeout;
|
||||
}
|
||||
@@ -599,13 +585,6 @@ public final class SystemConfig {
|
||||
this.sqlExecuteTimeout = sqlExecuteTimeout;
|
||||
}
|
||||
|
||||
public String getClusterHeartbeatPass() {
|
||||
return clusterHeartbeatPass;
|
||||
}
|
||||
|
||||
public void setClusterHeartbeatPass(String clusterHeartbeatPass) {
|
||||
this.clusterHeartbeatPass = clusterHeartbeatPass;
|
||||
}
|
||||
|
||||
public int getFrontsocketsorcvbuf() {
|
||||
return frontSocketSoRcvbuf;
|
||||
@@ -803,8 +782,6 @@ public final class SystemConfig {
|
||||
+ ", xaLogCleanPeriod=" + xaLogCleanPeriod
|
||||
+ ", transactionLogBaseDir=" + transactionLogBaseDir
|
||||
+ ", transactionLogBaseName=" + transactionLogBaseName
|
||||
+ ", clusterHeartbeatUser=" + clusterHeartbeatUser
|
||||
+ ", clusterHeartbeatPass=" + clusterHeartbeatPass
|
||||
+ ", txIsolation=" + txIsolation
|
||||
+ ", sqlRecordCount=" + sqlRecordCount
|
||||
+ ", bufferPoolPageSize=" + bufferPoolPageSize
|
||||
|
||||
@@ -56,7 +56,6 @@ public class MyCatMemory {
|
||||
LOGGER.info("useStreamOutput = " + system.getUseStreamOutput());
|
||||
LOGGER.info("systemReserveMemorySize = " + system.getSystemReserveMemorySize());
|
||||
LOGGER.info("totalNetWorkBufferSize = " + JavaUtils.bytesToString2(totalNetWorkBufferSize));
|
||||
LOGGER.info("dataNodeSortedTempDir = " + system.getDataNodeSortedTempDir());
|
||||
|
||||
this.conf = new MycatPropertyConf();
|
||||
numCores = Runtime.getRuntime().availableProcessors();
|
||||
|
||||
Reference in New Issue
Block a user