Skip to content

Commit

Permalink
remove config
Browse files Browse the repository at this point in the history
  • Loading branch information
wwr committed Oct 16, 2020
1 parent 4b44b36 commit 8baba9e
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 112 deletions.
35 changes: 0 additions & 35 deletions cachecloud-open-client/cachecloud-open-client-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,6 @@
</dependency>
</dependencies>

<developers>
<developer>
<name>leifu</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>yongfeigao</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>haibogu</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>yijunzhang</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>

<build>
<resources>
<resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public class ConstUtils {
/**
* 报警相关
*/
public static String DEFAULT_EMAILS = "xx@sohu.com,[email protected]";
public static String DEFAULT_EMAILS = "xx@xx.com,[email protected]";
public static String EMAILS = DEFAULT_EMAILS;

public static String DEFAULT_PHONES = "13812345678,13787654321";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class MasterSlaveOffsetAlertStrategy extends AlertConfigStrategy {
/**
* 格式:
* connected_slaves:2
* slave0:ip=10.10.76.151,port=6380,state=online,offset=33119690469561,lag=1
* slave1:ip=10.10.76.160,port=6380,state=online,offset=33119690513578,lag=0
* slave0:ip=127.0.0.1,port=6380,state=online,offset=33119690469561,lag=1
* slave1:ip=127.0.0.1,port=6380,state=online,offset=33119690513578,lag=0
* master_repl_offset:33119653194425
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void testSaveMachine() throws Exception {

MachineInfo machineInfo = new MachineInfo();
machineInfo.setCpu(16);
machineInfo.setIp("10.10.53.181");
machineInfo.setIp("127.0.0.1");
machineInfo.setMem(96);
machineInfo.setModifyTime(new Date());
machineInfo.setRealIp("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public void testImport() {

// 实例信息
String appInstanceInfo =
"10.10.53.159:7000:512\n" +
"10.10.53.159:7001:512\n" +
"10.10.53.159:26379:mymaster\n" +
"10.10.53.159:26380:mymaster\n" +
"10.10.53.159:26381:mymaster";
"127.0.0.1:7000:512\n" +
"127.0.0.1:7001:512\n" +
"127.0.0.1:26379:mymaster\n" +
"127.0.0.1:26380:mymaster\n" +
"127.0.0.1:26381:mymaster";
boolean result = importAppCenter.importAppAndInstance(appDesc, appInstanceInfo);
logger.info("result: {}", result);
}
Expand Down Expand Up @@ -87,7 +87,7 @@ public void testCheckWrongFormatAppInstanceInfo2() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu2");
// 实例信息
String appInstanceInfo = "\n10.10.53.159:6379:1024";
String appInstanceInfo = "\n127.0.0.1:6379:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -101,7 +101,7 @@ public void testCheckWrongFormatAppInstanceInfo3() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu3");
// 实例信息
String appInstanceInfo = "10.10.53.159:6379";
String appInstanceInfo = "127.0.0.1:6379";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -115,7 +115,7 @@ public void testCheckWrongFormatAppInstanceInfo4() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu4");
// 实例信息
String appInstanceInfo = "10.10.10.10:6379:1024";
String appInstanceInfo = "127.0.0.1:6379:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -129,7 +129,7 @@ public void testCheckWrongFormatAppInstanceInfo5() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu5");
// 实例信息
String appInstanceInfo = "10.10.53.162:ab:1024";
String appInstanceInfo = "127.0.0.1:ab:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -143,7 +143,7 @@ public void testCheckExistInstanceInfo() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu6");
// 实例信息
String appInstanceInfo = "10.10.53.162:6379:1024";
String appInstanceInfo = "127.0.0.1:6379:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -157,7 +157,7 @@ public void testCheckNotRunInstance() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu7");
// 实例信息
String appInstanceInfo = "10.10.53.162:6399:1024";
String appInstanceInfo = "127.0.0.1:6399:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -171,7 +171,7 @@ public void testCheckWrongMaxMemory() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu8");
// 实例信息
String appInstanceInfo = "10.10.53.159:6379:aa";
String appInstanceInfo = "127.0.0.1:6379:aa";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -184,7 +184,7 @@ public void testCheckDataNode() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu9");
// 实例信息
String appInstanceInfo = "10.10.53.159:6379:1024";
String appInstanceInfo = "127.0.0.1:6379:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -198,7 +198,7 @@ public void testCheckSentinelNodeMasterName() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu10");
// 实例信息
String appInstanceInfo = "10.10.53.159:26379:1024";
String appInstanceInfo = "127.0.0.1:26379:1024";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -212,7 +212,7 @@ public void testCheckSentinelNode() {
AppDesc appDesc = new AppDesc();
appDesc.setName("carlosfu11");
// 实例信息
String appInstanceInfo = "10.10.53.159:26379:mymaster";
String appInstanceInfo = "127.0.0.1:26379:mymaster";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -227,11 +227,11 @@ public void testCheckSentinelAllNodes() {
appDesc.setName("carlosfu12");
// 实例信息
String appInstanceInfo =
"10.10.53.159:7000:512\n" +
"10.10.53.159:7001:512\n" +
"10.10.53.159:26379:mymaster\n" +
"10.10.53.159:26380:mymaster\n" +
"10.10.53.159:26381:mymaster";
"127.0.0.1:7000:512\n" +
"127.0.0.1:7001:512\n" +
"127.0.0.1:26379:mymaster\n" +
"127.0.0.1:26380:mymaster\n" +
"127.0.0.1:26381:mymaster";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand All @@ -243,12 +243,12 @@ public void testCheckClusterNodes() {
appDesc.setName("carlosfu13");
// 实例信息
String appInstanceInfo =
"10.10.53.159:8000:512\n" +
"10.10.53.159:8001:512\n" +
"10.10.53.159:8002:512\n" +
"10.10.53.159:8003:512\n" +
"10.10.53.159:8004:512\n" +
"10.10.53.159:8005:512\n";
"127.0.0.1:8000:512\n" +
"127.0.0.1:8001:512\n" +
"127.0.0.1:8002:512\n" +
"127.0.0.1:8003:512\n" +
"127.0.0.1:8004:512\n" +
"127.0.0.1:8005:512\n";
ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
logger.info("importAppResult: {}", importAppResult);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AppClientReportDataSizeDaoTest extends BaseTest {
@Test
public void testSave() {
AppClientDataSizeStat stat = new AppClientDataSizeStat();
stat.setClientIp("10.7.40.201");
stat.setClientIp("127.0.0.1");
stat.setReportTime(new Date());
stat.setCollectTime(20150120135000L);
stat.setCreateTime(new Date());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ public class AppDataMigrateStatusDaoTest extends BaseTest {
public void testSave() {
AppDataMigrateStatus appDataMigrateStatus = new AppDataMigrateStatus();
appDataMigrateStatus.setEndTime(new Date());
appDataMigrateStatus.setMigrateMachineIp("10.10.53.159");
appDataMigrateStatus.setMigrateMachineIp("127.0.0.1");
appDataMigrateStatus.setMigrateMachinePort(8888);
appDataMigrateStatus.setStartTime(new Date());
appDataMigrateStatus.setStatus(1);
appDataMigrateStatus.setUserId(10244);
appDataMigrateStatus.setSourceAppId(10023);
appDataMigrateStatus.setSourceMigrateType(1);
appDataMigrateStatus.setSourceServers("10.10.53.159:6379");
appDataMigrateStatus.setSourceServers("127.0.0.1:6379");
appDataMigrateStatus.setTargetAppId(0);
appDataMigrateStatus.setTargetMigrateType(2);
appDataMigrateStatus.setTargetServers("10.10.52.136:6385");
appDataMigrateStatus.setTargetServers("127.0.0.1:6385");
appDataMigrateStatus.setLogPath("/opt/redis-migrate-tool/rmt-20160609144601.log");
appDataMigrateStatus.setConfigPath("/opt/redis-migrate-tool/rmt-20160609144601.conf");
appDataMigrateStatusDao.save(appDataMigrateStatus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,4 @@
public class AppUserDaoTest extends BaseTest{
@Resource
private AppUserDao appUserDao;

@Test
public void testAppDao() {
AppUser appUser = AppUser.buildFrom(null, "11", "fff", "[email protected]", "13820794024", -1);
appUserDao.save(appUser);
logger.info("{}", appUser);
}



}
30 changes: 0 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,36 +205,6 @@
</dependencies>
</dependencyManagement>

<developers>

<developer>
<name>yijunzhang</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>

<developer>
<name>leifu</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>

<developer>
<name>lingguo</name>
<email>[email protected]</email>
<organization>sohu-tv</organization>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>

<build>
<pluginManagement>
<plugins>
Expand Down
6 changes: 3 additions & 3 deletions script/cachecloud.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- MySQL dump 10.13 Distrib 5.5.16, for Linux (x86_64)
--
-- Host: 10.10.19.167 Database: cache-cloud
-- Host: 127.0.0.1 Database: cache-cloud
-- ------------------------------------------------------
-- Server version 5.5.34-32.0-log

Expand Down Expand Up @@ -866,7 +866,7 @@ insert into system_config(config_key,config_value,info,status,order_id) values('
insert into system_config(config_key,config_value,info,status,order_id) values('machine.mem.alert.ratio','80.0','机器内存报警阀值',1,10);
insert into system_config(config_key,config_value,info,status,order_id) values('machine.load.alert.ratio','8.0','机器负载报警阀值',1,11);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.documentUrl','http://cachecloud.github.io','文档地址',1,12);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.owner.email','xx@sohu.com,[email protected]','邮件报警(逗号隔开)',1,13);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.owner.email','xx@xx.com,[email protected]','邮件报警(逗号隔开)',1,13);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.owner.phone','13812345678,13787654321','手机号报警(逗号隔开)',1,14);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.mavenWareHouse','http://your_maven_house','maven仓库地址(客户端)',1,15);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.contact','user1:([email protected], user1:135xxxxxxxx)<br/>user2: ([email protected], user2:138xxxxxxxx)','值班联系人信息',1,16);
Expand Down Expand Up @@ -911,7 +911,7 @@ CREATE TABLE `app_data_migrate_status` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='迁移状态';

insert into app_user(name,ch_name,email,mobile,type) values('admin','admin','admin@sohu-inc.com','13500000000',0);
insert into app_user(name,ch_name,email,mobile,type) values('admin','admin','admin@xxx.com','13500000000',0);

DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
Expand Down

0 comments on commit 8baba9e

Please sign in to comment.