You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Anguia (Jira)" <ji...@apache.org> on 2021/02/22 08:09:00 UTC
[jira] [Created] (KYLIN-4909) kylin metrics prefix bug in
system-cube.sh
Anguia created KYLIN-4909:
-----------------------------
Summary: kylin metrics prefix bug in system-cube.sh
Key: KYLIN-4909
URL: https://issues.apache.org/jira/browse/KYLIN-4909
Project: Kylin
Issue Type: Bug
Components: Tools, Build and Test
Affects Versions: v3.1.1
Reporter: Anguia
I find a bug at system-cube.sh at the location, it is KYLIN by default, rather than getting kylin-metrics-prefix from kylin.properties :
{code:java}
Part 1
SC_NAME_1="KYLIN_HIVE_METRICS_QUERY_${KYLIN_ENV}"
SC_NAME_2="KYLIN_HIVE_METRICS_QUERY_CUBE_${KYLIN_ENV}"
SC_NAME_3="KYLIN_HIVE_METRICS_QUERY_RPC_${KYLIN_ENV}"
SC_NAME_4="KYLIN_HIVE_METRICS_JOB_${KYLIN_ENV}"
SC_NAME_5="KYLIN_HIVE_METRICS_JOB_EXCEPTION_${KYLIN_ENV}"
....
Part 2
# Get Database, default is KYLIN
system_database="KYLIN"
# 'create database' failed will not exit when donot have permission to create database;
sed -i -e 's/CREATE DATABASE /-- CREATE DATABASE /g' ${OUTPUT_FORDER}/create_hive_tables_for_system_cubes.sql
{code}
The bug have fixed at github [KYLIN-4855 kylin metrics prefix bug fix|[https://github.com/apache/kylin/pull/1533]|https://github.com/apache/kylin/pull/1533],]
But it is not enough, Part 2 does not fix this bug so that the database cannot be found.
I temporarily solved the problem by following
{code:java}
# get database ####### add
system_datebase=`grep "^kylin.metrics.prefix=" $KYLIN_HOME/conf/kylin.properties | cut -d "=" -f 2`
system_database=`echo ${system_datebase:-"KYLIN"} | tr '[a-z]' '[A-Z]'`
Part 1
SC_NAME_1="${system_database}_HIVE_METRICS_QUERY_${KYLIN_ENV}"
SC_NAME_2="${system_database}_HIVE_METRICS_QUERY_CUBE_${KYLIN_ENV}"
SC_NAME_3="${system_database}_HIVE_METRICS_QUERY_RPC_${KYLIN_ENV}"
SC_NAME_4="${system_database}_HIVE_METRICS_JOB_${KYLIN_ENV}"
SC_NAME_5="${system_database}_HIVE_METRICS_JOB_EXCEPTION_${KYLIN_ENV}"
....
Part 2
# Get Database, default is KYLIN
#system_database="KYLIN" ######### modify
# 'create database' failed will not exit when donot have permission to create database;
sed -i -e 's/CREATE DATABASE /-- CREATE DATABASE /g' ${OUTPUT_FORDER}/create_hive_tables_for_system_cubes.sql
thanks
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)