重點介紹配置相關儲存。
主要是服務對應的配置問題;主機對應的配置問題;使用者修改的配置問題.
集群配置表,包含各種服務元件的相關配置
41 version1 1 core-site 2
2 {} 1489658977060
script
create
table clusterconfig (
config_id bigint not
null,
version_tag varchar(100) not
null,
version bigint not
null,
type_name varchar(100) not
null,
cluster_id bigint not
null,
stack_id bigint not
null,
selected smallint
notnull
default
0, config_data longtext not
null,
config_attributes longtext,
create_timestamp bigint not
null,
selected_timestamp bigint not
null
default
0, constraint pk_clusterconfig primary
key (config_id),
constraint fk_clusterconfig_cluster_id foreign
key (cluster_id) references clusters (cluster_id),
constraint fk_clusterconfig_stack_id foreign
key (stack_id) references stack(stack_id),
constraint uq_config_type_tag unique (cluster_id, type_name, version_tag),
constraint uq_config_type_version unique (cluster_id, type_name, version));
重點說明
create
table serviceconfig (
service_config_id bigint not
null,
cluster_id bigint not
null,
service_name varchar(255) not
null,
version bigint not
null,
create_timestamp bigint not
null,
stack_id bigint not
null,
user_name varchar(255) not
null
default
'_db',
group_id bigint,
note longtext,
constraint pk_serviceconfig primary
key (service_config_id),
constraint fk_serviceconfig_stack_id foreign
key (stack_id) references stack(stack_id),
constraint uq_scv_service_version unique (cluster_id, service_name, version));
關聯service配置表與cluster配置表
關聯servic配置表與主機表
配置組,用於儲存使用者自定義配置.
2
2 tianbaochao yarn new
configuration
group created on fri mar 17
2017
1489716220882 yarn
create
table configgroup (
group_id bigint,
cluster_id bigint not
null,
group_name varchar(255) not
null,
tag varchar(1024) not
null,
description varchar(1024),
create_timestamp bigint not
null,
service_name varchar(255),
constraint pk_configgroup primary
key (group_id),
constraint fk_configgroup_cluster_id foreign
key (cluster_id) references clusters (cluster_id));
配置組和主機對映關係
create
config_group_id bigint not
null,
host_id bigint not
null,
key (config_group_id, host_id),
constraint fk_cghm_cgid foreign
key (config_group_id) references configgroup (group_id),
constraint fk_cghm_host_id foreign
key (host_id) references hosts (host_id));
配置組與集群配置對映關係
資料
2
2 yarn-site version1493012679312 _db 1493012680084
script
create
config_group_id bigint not
null,
cluster_id bigint not
null,
config_type varchar(100) not
null,
version_tag varchar(100) not
null,
user_name varchar(100) default
'_db',
create_timestamp bigint not
null,
key (config_group_id, cluster_id, config_type),
constraint fk_cgccm_gid foreign
key (config_group_id) references configgroup (group_id),
constraint fk_confg foreign
key (cluster_id, config_type, version_tag) references clusterconfig (cluster_id, type_name, version_tag));
create
create_timestamp bigint not
null,
host_id bigint not
null,
cluster_id bigint not
null,
type_name varchar(255) not
null,
selected integer
notnull
default
0, service_name varchar(255),
version_tag varchar(255) not
null,
user_name varchar(255) not
null
default
'_db',
key (create_timestamp, host_id, cluster_id, type_name),
key (cluster_id) references clusters (cluster_id),
key (host_id) references hosts (host_id));
sonar資料庫相關配置
首先,在mysql資料庫中新建乙個資料庫,我命名為sonar,然後,在sonar的安裝目錄下找到conf sonar.properties檔案,在其mysql5.x節點下輸入以下資訊 sonar.jdbc.url jdbc mysql ip 3306 sonar?useunicode true ch...
Mysql資料庫死鎖分析相關概念
mysql死鎖問題分析 mysql insert鎖機制 insert鎖機制 這是全網找到的比較好的兩篇部落格。innodb有三種行鎖的演算法 1,record lock 單個行記錄上的鎖。2,gap lock 間隙鎖,鎖定乙個範圍,但不包括記錄本身。gap鎖的目的,是為了防止同一事務的兩次當前讀,出...
資料庫相關
1.操作類 godb public goosundb open throws sqlexception public void close public cursor search int mark mark mark,null,null,null,col date desc if cursor n...