fe.conf文件里面找到edit_log_port进行修改
很可能不是一个集群
不应该啊,访问的web页面的ip,跟 我修改的配置的ip是一模一样的
麻烦3个fe的日志都发下,fe启动不起来端口肯定是设置不成功的,页面自然也不会刷新。
看下第二台的be 10719是否启动了?
这个怎么看的,用命令行能看吗?现在web页面都进不去了
我自己看日志,我怀疑是fe启动的时候mysql数据库没连接上导致
启动fe的时候一直报错 wait catalog to be ready. FE type: UNKNOWN. is ready: false,是不是表示要清楚 meta里面的文件?
一共几台be几台fe?集群是哪个版本?show frontends;看下结果
一共2台fe和3台be,版本2.0.1,
查询sql如下:
–申请容量数
WITH tb AS (
SELECT
a.ps_org_no as ps_org_no,
a.scop_type scop_type,
a.cons_sort_code AS cons_sort_code,
a.contract_cap AS contract_cap,
b.state AS state,
CASE
WHEN a.scop_type = '01' THEN a.stat_cycle
WHEN a.scop_type = '02' THEN b.stat_cycle
END AS stat_cycle
FROM
(
select
'01' scop_type,
--申请规模
ps_org_no,
app_no,
cast(contract_cap as int) contract_cap,
case
when cons_sort_code like '01%' then '01'
when cons_sort_code like '02%' then '02'
when cons_sort_code like '03%' then '03'
end as cons_sort_code,
date_format(handle_time, '%Y%m') as stat_cycle
from
s_app
where
(
cons_sort_code like '01%'
or cons_sort_code like '02%'
or cons_sort_code like '03%'
)
and handle_time >= '2021-01-01 00:00:00'
and date_format(handle_time, '%Y%m%d') <= curdate() + 0
union
select
'02' scop_type,
--完成规模
ps_org_no,
app_no,
cast(contract_cap as int) contract_cap,
case
when cons_sort_code like '01%' then '01'
when cons_sort_code like '02% ' then '02'
when cons_sort_code like '03% ' then '03'
end as cons_sort_code,
date_format(handle_time, '%Y%m') as stat_cycle
from
arc_s_app
where
(
cons_sort_code like '01%'
or cons_sort_code like '02%'
or cons_sort_code like '03%'
)
) a
join (
select
item_key,
state,
date_format(end_date, '%Y%m') as stat_cycle
from
indywf_instances_cur
where
pro_name in (
'101',
'109',
'102',
'110',
'104',
'111'
)
and item_type = '01'
and state in ('COMPLETE', 'ACTIVE')
) b on b.item_key = a.app_no
)
SELECT
a.ps_org_no as ORG_NO,
a.scop_type DIM_VAL_CODE1,
a.cons_sort_code AS DIM_VAL_CODE2,
ifnull(SUM(a.contract_cap), 0) as DATA_VALUE
FROM
tb a
where
a.stat_cycle >= '202201'
and a.scop_type = '01' --申请规模
and a.state in ('COMPLETE', 'ACTIVE') --获取的是当月的申请规模的归档 与 在途
group by
a.ps_org_no,
a.scop_type,
a.cons_sort_code
union
SELECT
a.ps_org_no as ORG_NO,
a.scop_type DIM_VAL_CODE1,
a.cons_sort_code AS DIM_VAL_CODE2,
ifnull(SUM(a.contract_cap), 0) as DATA_VALUE
FROM
tb a
where
a.stat_cycle >= '202201'
and a.stat_cycle <= date_format(curdate(), '%Y%m')
and a.scop_type = '02' --完成规模
and a.state = 'COMPLETE'
group by
a.ps_org_no,
a.scop_type,
a.cons_sort_code
union
SELECT
a.ps_org_no as ORG_NO,
a.scop_type DIM_VAL_CODE1,
a.cons_sort_code AS DIM_VAL_CODE2,
ifnull(SUM(a.contract_cap), 0) as DATA_VALUE
FROM
tb a
where
a.stat_cycle <= date_format(add_months(curdate(), -1), '%Y%m')
and a.scop_type = '01'
and a.state in ('COMPLETE','ACTIVE') --上月的申请规模与归档规模
AND a.stat_cycle >= date_format(
date_format(add_months(curdate(), -1), '%Y-01-01'),
'%Y%m'
)
group by
a.ps_org_no,
a.scop_type,
a.cons_sort_code
union
SELECT
a.ps_org_no as ORG_NO,
a.scop_type DIM_VAL_CODE1,
a.cons_sort_code AS DIM_VAL_CODE2,
ifnull(SUM(a.contract_cap), 0) as DATA_VALUE
FROM
tb a
where
a.stat_cycle <= date_format(add_months(curdate(), -1), '%Y%m')
and a.scop_type = '02'
and a.state = 'COMPLETE'
AND a.stat_cycle >= date_format(date_format(add_months(curdate(), -1), '%Y-01-01'),'%Y%m')
group by
a.ps_org_no,
a.scop_type,
a.cons_sort_code
一共3张表,s_app,ar_s_app,indywf_instances_cur,每张表1亿的数据量,
exec_mem_limit 设置为 8589934592,
最后查询又报错 query_timeout
这是fe.warn.log日志里面的截图
可以调一下query查询超时的参数。先将sql跑出来之后再通过profile分析瓶颈从而改进
我该怎么分析profile,刚刚查询的profile太大了,帖子最多32000字,装不下。
是发错了,真正的profile有32w多字,帖子装不下,帖子最多装32000字,我该怎么优化profile,可以告诉我下优化思路,我自己去尝试下