Skip to content

Commit c366bcc

Browse files
authored
Merge pull request #21 from Tencent/dev_1.0
merge dev_1.0 to master
2 parents 38fd119 + 9256210 commit c366bcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+9188
-3988
lines changed

docs-en/install-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ change directory to `src/thirdParty`, issue commands: `chmod +x thirdparty.sh; .
77

88
## Compilation
99

10-
Issue command: `make release` in `src/` directory, then go to directory of each service, issue the following commands:
10+
Issue command: `make release;make` in `src/` directory, then go to directory of each service, issue the following commands:
1111
```
12-
make; make tar
12+
make tar
1313
```
1414
to generate a Tars release package for each service.
1515

docs-en/server_config_example-en.md

Lines changed: 102 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This document describes and examples the configuration of each module of DCache.
33
# ConfigServer Configuration
44

55
```
6-
# database infomation
6+
# database infomation of db_dcache_relation
77
<Main>
88
<DB>
99
dbhost=
@@ -283,7 +283,7 @@ This document describes and examples the configuration of each module of DCache.
283283
ProxyMaxSilentTime=1800
284284
# interval for clearing Proxies
285285
ClearProxyInterval=1800
286-
# 轮询迁移数据库的时间
286+
# interval for polling unstart transfer task in db
287287
TransferInterval=3
288288
# number of threads used for polling
289289
TimerThreadSize=20
@@ -305,7 +305,9 @@ This document describes and examples the configuration of each module of DCache.
305305
MaxTransferThreadEachGroup=8
306306
</Transfer>
307307
<Switch>
308-
# 自动切换超时的检测间隔(秒)
308+
# whether to enable auto switch
309+
enable = N
310+
# interval for checking whether need to switch (seconds)
309311
SwitchCheckInterval= 10
310312
# timeout for automatic switching (seconds)
311313
SwitchTimeOut=60
@@ -345,17 +347,20 @@ This document describes and examples the configuration of each module of DCache.
345347
```
346348
<Main>
347349
<DB>
348-
Sql=CREATE TABLE `${TABLE}` (`stattime` timestamp NOT NULL default CURRENT_TIMESTAMP,`f_date` date NOT NULL default '1970-01-01',`f_tflag` varchar(8) NOT NULL default '',`app_name` varchar(20) default NULL,`module_name` varchar(50) default NULL,`group_name` varchar(100) default NULL,`idc_area` varchar(10) default NULL,`server_status` varchar(10) default NULL,`master_name` varchar(128) NOT NULL default '',`master_ip` varchar(16) default NULL,`set_name` varchar(15) NOT NULL default '',`set_area` varchar(15) NOT NULL default '',`set_id` varchar(15) NOT NULL default '',`value1` varchar(255) default NULL,`value2` varchar(255) default NULL,`value3` varchar(255) default NULL,`value4` varchar(255) default NULL,`value5` varchar(255) default NULL,`value6` varchar(255) default NULL,`value7` varchar(255) default NULL,`value8` varchar(255) default NULL,`value9` varchar(255) default NULL,`value10` varchar(255) default NULL,`value11` varchar(255) default NULL,`value12` varchar(255) default NULL,`value13` varchar(255) default NULL,`value14` varchar(255) default NULL,`value15` varchar(255) default NULL,`value16` varchar(255) default NULL,`value17` varchar(255) default NULL,`value18` varchar(255) default NULL,`value19` varchar(255) default NULL,`value20` varchar(255) default NULL,`value21` varchar(255) default NULL,`value22` varchar(255) default NULL,`value23` varchar(255) default NULL,`value24` varchar(255) default NULL,`value25` varchar(255) default NULL,`value26` varchar(255) default NULL,`value27` varchar(255) default NULL,`value28` varchar(255) default NULL,`value29` varchar(255) default NULL,`value30` varchar(255) default NULL,`value31` varchar(255) default NULL,`value32` varchar(255) default NULL,`value33` varchar(255) default NULL,`value34` varchar(255) default NULL,`value35` varchar(255) default NULL,KEY(`f_date`,`f_tflag`,`master_name`,`master_ip`),KEY `IDX_MASTER_NAME` (`master_name`),KEY `IDX_MASTER_IP` (`master_ip`),KEY `IDX_TIME` (`stattime`),KEY `IDX_F_DATE` (`f_date`))ENGINE\=MyISAM
349-
TbNamePre=t_property_realtime
350-
AppName=dcache_idc5min_147
350+
#maximum properties to monitoring
351+
PropertyFieldNum=48
352+
TbNamePre=t_property_realtime
353+
AppName=dcache_idc5min_147
354+
#database to stroe monitoring data
351355
<property>
352356
dbhost=
353-
dbname=taf_property_147
357+
dbname=db_dcache_property
354358
dbuser=
355359
dbpass=
356360
dbport=
357361
charset=gbk
358362
</property>
363+
#database of db_dcache_relation
359364
<relation>
360365
charset=gbk
361366
dbname=db_dcache_relation
@@ -366,47 +371,62 @@ This document describes and examples the configuration of each module of DCache.
366371
</relation>
367372
</DB>
368373
<HashMap>
369-
InsertInterval=1
374+
#interval to dump memory data to database(minutes)
375+
InsertInterval=5
370376
</HashMap>
371377
<NameMap>
372-
BakCenterError = property1
373-
BinLogErr = property2
374-
BinLogSyn = property3
375-
CacheError = property4
376-
Chunks/OnceElement = property5
377-
BackUpObjAdapter.connectRate = property6
378-
BackUpObjAdapter.queue = property7
379-
BinLogObjAdapter.connectRate = property8
380-
BinLogObjAdapter.queue = property9
381-
CacheObjAdapter.connectRate = property10
382-
CacheObjAdapter.queue = property11
383-
RouterClientObjAdapter.connectRate = property12
384-
RouterClientObjAdapter.queue = property13
385-
WCacheObjAdapter.connectRate = property14
386-
WCacheObjAdapter.queue = property15
387-
asyncqueue = property16
388-
memsize = property17
389-
DataMemUsedRatio = property18
390-
DbError = property19
391-
DbException = property20
392-
DirtyNum = property21
393-
DirtyRatio = property22
394-
ElementCount = property23
395-
Exception = property24
396-
HitCount = property25
397-
MemSize = property26
398-
getBatchCount = property27
399-
setBatchCount = property28
400-
MKMemUsedRatio = property29
401-
eraseCount = property30
402-
eraseCountUnexpire = property31
403-
asyncqueue0 = property32
404-
Jmem0DataUsedRatio = property33
405-
Jmem1DataUsedRatio = property34
406-
ColdDataRatio = property35
407-
expireCount = property36
408-
OnlyKeyCount = property37
409-
BigChunk = property38
378+
# value1 to value20 for obj and tars server fixed property
379+
CacheObjAdapter.queue = value1
380+
WCacheObjAdapter.queue = value2
381+
BinLogObjAdapter.queue = value3
382+
RouterClientObjAdapter.queue = value4
383+
ControlAckObjAdapter.queue = value5
384+
BackUpObjAdapter.queue = value6
385+
sendrspqueue = value7
386+
asyncqueue = value8
387+
memsize = value9
388+
reservedPro10 = value10
389+
reservedPro11 = value11
390+
reservedPro12 = value12
391+
reservedPro13 = value13
392+
reservedPro14 = value14
393+
reservedPro15 = value15
394+
reservedPro16 = value16
395+
reservedPro17 = value17
396+
reservedPro18 = value18
397+
reservedPro19 = value19
398+
reservedPro20 = value20
399+
400+
# value21 for dcache property
401+
CacheMemSize_MB = value21
402+
DataMemUsage = value22
403+
CacheHitRatio = value23
404+
405+
TotalCountOfRecords = value24
406+
ProportionOfDirtyRecords = value25
407+
CountOfDirtyRecords = value26
408+
CountOfOnlyKey = value27
409+
410+
M/S_ReplicationErr = value28
411+
M/S_ReplicationLatency = value29
412+
CacheError = value30
413+
ProgramException = value31
414+
415+
ReadRecordCount = value32
416+
WriteRecordCount = value33
417+
evictedRecordCount = value34
418+
evictedCountOfUnexpiredRecord = value35
419+
expiredRecordCount = value36
420+
421+
ChunkUsedPerRecord = value37
422+
MaxMemUsageOfJmem = value38
423+
ProportionOfColdData = value39
424+
425+
DbError = value40
426+
DbException = value41
427+
BackupError = value42
428+
429+
MKV_MainkeyMemUsage = value43
410430
</NameMap>
411431
</Main>
412432
@@ -434,3 +454,39 @@ This document describes and examples the configuration of each module of DCache.
434454
RouterObj = DCache.RouterServer.RouterObj
435455
</Main>
436456
```
457+
458+
# OptServer Configuration
459+
460+
```
461+
<Main>
462+
# admin registry obj
463+
AdminRegObj = tars.tarsAdminRegistry.AdminRegObj
464+
<DB>
465+
<tars>
466+
charset = utf8
467+
dbname = db_tars
468+
dbhost =
469+
dbport =
470+
dbuser =
471+
dbpass =
472+
</tars>
473+
<relation>
474+
charset = utf8
475+
dbname = db_dcache_relation
476+
dbhost =
477+
dbport =
478+
dbuser =
479+
dbpass =
480+
</relation>
481+
</DB>
482+
<Release>
483+
ThreadCount = 5
484+
</Release>
485+
<Uninstall>
486+
Timeout = 20
487+
BakPath = /data/dcacheuninstall/
488+
ThreadCount = 2
489+
</Uninstall>
490+
</Main>
491+
```
492+

docs/images/KV_service_conf.png

17.8 KB
Loading

docs/images/create_KV_module.png

4.08 KB
Loading
-49.6 KB
Binary file not shown.

docs/images/install_dcache_app.png

1.22 KB
Loading

docs/images/tars_add_tmplate.png

31.3 KB
Loading

docs/install.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717

1818
## <a id = "1"></a> 1. 依赖环境
19-
DCache是基于[Tars](https://github.com/TarsCloud/Tars)框架开发,所以编译之前请先安装Tars开发环境和管理平台,安装步骤请参考[Tars的install文档](https://github.com/TarsCloud/Tars/blob/master/Install.zh.md)。安装完Tars管理平台后,在浏览器中访问管理平台主页,如下图:
19+
DCache是基于[Tars](https://github.com/TarsCloud/Tars)框架(版本v1.6.0以上)开发,所以编译之前请先安装Tars开发环境和管理平台,安装步骤请参考[Tars的install文档](https://github.com/TarsCloud/Tars/blob/master/Install.zh.md)。安装完Tars管理平台后,在浏览器中访问管理平台主页,如下图:
2020

2121
![Tars管理平台主页](images/tars_mainPage.png)
2222

@@ -29,7 +29,7 @@ DCache是基于[Tars](https://github.com/TarsCloud/Tars)框架开发,所以编
2929

3030
### 2.2 编译
3131

32-
`src/`目录下执行:`make release`,然后再分别进入以下目录:
32+
`src/`目录下执行:`make release;make`,然后再分别进入以下目录:
3333

3434
- src/OptServer/
3535
- src/ConfigServer/
@@ -41,10 +41,30 @@ DCache是基于[Tars](https://github.com/TarsCloud/Tars)框架开发,所以编
4141

4242
执行:
4343
```
44-
make; make tar
44+
make tar
4545
```
4646
即可生成各服务的发布包。
4747

48+
### 2.3 创建模板
49+
50+
在Tars的Web平台创建DCache.Cache模板,后续部署DCache模块时会用到该模板。
51+
52+
![创建模板](images/tars_add_tmplate.png)
53+
54+
新增模板DCache.Cache,父模板选择tars.default,模板内容填入:
55+
56+
```xml
57+
<tars>
58+
<application>
59+
<client>
60+
property=DCache.PropertyServer.PropertyObj
61+
</client>
62+
</application>
63+
</tars>
64+
```
65+
66+
67+
4868

4969
## <a id = "3"></a> 3. 公共服务部署
5070
在正式安装DCache应用前需要部署和安装公共服务:OptServer、ConfigServer和PropertyServer。
@@ -88,7 +108,7 @@ make; make tar
88108

89109
![添加配置文件内容](images/add_opt_conf.png)
90110

91-
其中文件名称填“DCacheOptServer.conf”,文件内容的填写请参考[DCache服务配置说明](optserver.md)
111+
其中文件名称填“DCacheOptServer.conf”,文件内容的填写请参考[DCache服务配置说明](server_config_example.md)
92112

93113
**step5:** 重启OptServer。
94114

@@ -124,7 +144,7 @@ make; make tar
124144
该步骤参考安装OptServer的**step5**即可。
125145

126146

127-
147+
128148
### <a id = "3.3"></a> 3.3 安装PropertyServer
129149

130150
安装PropertyServer的步骤和安装OptServer的步骤类似,除了不需要创建数据库外。
@@ -149,7 +169,7 @@ make; make tar
149169

150170
## <a id = "4"></a> 4. DCache管理平台安装
151171

152-
DCache管理界面是以模块的形式加载到Tars管理平台,最终会和Tars管理平台使用同一个地址,具体的模块安装步骤请参考[DCache管理平台安装](https://github.com/TarsCloud/TarsWeb/tree/dcache-alpha)
172+
DCache管理界面是以模块的形式加载到Tars管理平台,最终会和Tars管理平台使用同一个地址,具体的模块安装步骤请参考[DCache管理平台安装](https://github.com/TarsCloud/TarsWeb)
153173

154174
## <a id = "5"></a> 5. 创建一个DCache应用
155175

@@ -191,7 +211,7 @@ Cache发布包的上传和Proxy发布包上传步骤类似,只不过Cache有
191211

192212
![安装DCache应用](images/install_dcache_app.png)
193213

194-
根据上图,依次点击“DCache”和“运维管理”,其中“应用”和“管理员”必填,可自定义,然后点击“创建应用”,得到下图:
214+
根据上图,依次点击“服务创建”,自定义“应用”名称,然后点击“创建应用”,得到下图:
195215

196216
![创建proxy和router服务](images/create_proxy&router.png)
197217

@@ -218,11 +238,19 @@ Cache发布包的上传和Proxy发布包上传步骤类似,只不过Cache有
218238

219239
**注意:** <font color=red>共享内存key必须是唯一的,不能在服务部署机器上已存在,否则会造成服务拉起失败,可使用**ipcs**命令确认。</font>
220240

221-
必要信息填写完毕,点击“下一步”进入“安装发布”步骤,如下图:
241+
Cache服务的模板默认会选择DCache.Cache,如果模板DCache.Cache不存在,可创建该模板或者选择其他可用的模板,模板中必须配置property,这样才能查看服务的特性监控数据。
222242

223-
![安装发布](images/install_and_release_kv.png)
243+
```xml
244+
<tars>
245+
<application>
246+
<client>
247+
property=DCache.PropertyServer.PropertyObj
248+
</client>
249+
</application>
250+
</tars>
251+
```
224252

225-
再次确认信息填写无误,点击“安装发布”,等待服务发布完成。刷新管理平台主页,左侧目录树出现此模块信息,如下图:
253+
必要信息填写完毕,点击“下一步”进入“安装发布”步骤,等待服务发布完成。刷新管理平台主页,左侧目录树出现此模块信息,如下图:
226254

227255
![安装成功](images/install_kv_succ.png)
228256

@@ -231,8 +259,8 @@ Cache发布包的上传和Proxy发布包上传步骤类似,只不过Cache有
231259
步骤和[部署和发布KVCache](#5.3)类似,参考即可。
232260

233261
### <a id = "5.5"></a> 5.5 Cache配置管理
234-
235-
262+
263+
236264
![Cache配置管理](images/cache_config.png)
237265

238266
按照上图箭头依次点击,可添加配置项。
@@ -242,4 +270,5 @@ Cache发布包的上传和Proxy发布包上传步骤类似,只不过Cache有
242270

243271
![模块配置管理](images/add_conf_for_module.png)
244272

245-
按照上图箭头依次点击,可在该页面上修改和添加配置。该页面的配置管理分两种类型:针对模块所有节点的配置管理和针对模块特定节点的配置管理。
273+
按照上图箭头依次点击,可在该页面上修改和添加配置。该页面的配置管理分两种类型:针对模块所有节点的配置管理和针对模块特定节点的配置管理。如果节点配置和模块配置有重叠的配置项,那么节点配置将覆盖模块配置。
274+
**注意:** <font color=red>修改配置后,需要重启服务才能生效。</font>

0 commit comments

Comments
 (0)