This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch document in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/document by this push: new 4b73e72 Update some document 4b73e72 is described below commit 4b73e727bbc7150ad6a6071f94425e98ea16d443 Author: yaqian.zhang <598593...@qq.com> AuthorDate: Mon Dec 14 20:27:34 2020 +0800 Update some document --- website/_docs/gettingstarted/faq.cn.md | 33 ++-------------------- website/_docs/gettingstarted/faq.md | 45 +----------------------------- website/_docs/install/configuration.cn.md | 4 +++ website/_docs/install/configuration.md | 8 ++++-- website/_docs/tutorial/sql_reference.cn.md | 9 ++++++ website/_docs/tutorial/sql_reference.md | 8 ++++++ website/_includes/header.cn.html | 12 -------- website/_includes/header.html | 12 -------- website/_includes/home_header.cn.html | 12 -------- website/_includes/home_header.html | 12 -------- 10 files changed, 29 insertions(+), 126 deletions(-) diff --git a/website/_docs/gettingstarted/faq.cn.md b/website/_docs/gettingstarted/faq.cn.md index 3fc752c..cba9e12 100644 --- a/website/_docs/gettingstarted/faq.cn.md +++ b/website/_docs/gettingstarted/faq.cn.md @@ -177,15 +177,9 @@ Kylin 使用字典编码方式来编码/解码维度的值;通常一个维度 Kylin 使用字典对每列中的值进行编码,这大大减少了 Cube 的存储大小。 而要构建字典,Kylin 需要为每列获取不同的值。 -### 如何新增用户并修改默认密码 +### 如何新增用户并修改默认用户的密码 -Kylin 的网页安全是通过 Spring 安全框架实现的,而 `kylinSecurity.xml` 是主要的配置文件。 -``` -${KYLIN_HOME}/tomcat/webapps/kylin/WEB-INF/classes/kylinSecurity.xml -``` -预定义用户的密码哈希值可以在配置文件 “sandbox,testing” 中找到;如果要更改默认密码,用户需要生成一个新哈希,然后在此处更新,请参阅以下代码段: [Spring BCryptPasswordEncoder generate different password for same input](https://stackoverflow.com/questions/25844419/spring-bcryptpasswordencoder-generate-different-password-for-same-input) - -我们更推荐集成 LDAP 认证方式和 Kylin 来管理多用户。 +请参考: [How to add new user or change the default password](https://cwiki.apache.org/confluence/display/KYLIN/How+to+add+new+user+or+change+the+default+password) 。 ### 构建 Kylin 代码时遇到 NPM 报错 (中国大陆地区用户请特别注意此问题) @@ -203,29 +197,6 @@ npm config set proxy http://YOUR_PROXY_IP 请参考:[JDBC query result Date column get wrong value](http://apache-kylin.74782.x6.nabble.com/JDBC-query-result-Date-column-get-wrong-value-td5370.html) -### 如何修改 ADMIN 用户的默认密码 - -默认情况下,Kylin 使用简单的、基于配置的用户注册表;默认的系统管理员 ADMIN 的密码为 KYLIN 在 `kylinSecurity.xml` 中进行了硬编码。如果要修改密码,首先需要获取新密码的加密值(使用BCrypt),然后在 `kylinSecurity.xml` 中设置它。以下为密码为 'ABCDE' 的示例: -```sh -cd $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/lib -java -classpath kylin-server-base-2.3.0.jar:spring-beans-4.3.10.RELEASE.jar:spring-core-4.3.10.RELEASE.jar:spring-security-core-4.2.3.RELEASE.jar:commons-codec-1.7.jar:commons-logging-1.1.3.jar org.apache.kylin.rest.security.PasswordPlaceholderConfigurer BCrypt ABCDE -``` -加密后的密码为: -``` -$2a$10$A7.J.GIEOQknHmJhEeXUdOnj2wrdG4jhopBgqShTgDkJDMoKxYHVu -``` -然后将加密后的密码在 `kylinSecurity.xml` 中设置,如下: -``` -vi $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/classes/kylinSecurity.xml -``` -使用新的密码代替旧的密码: -``` -<bean class="org.springframework.security.core.userdetails.User" id="adminUser"> - <constructor-arg value="ADMIN"/> - <constructor-arg value="$2a$10$A7.J.GIEOQknHmJhEeXUdOnj2wrdG4jhopBgqShTgDkJDMoKxYHVu"/> - <constructor-arg ref="adminAuthorities"/> -</bean> -``` 重启 Kylin 来使得配置生效,如果用户有多个 Kylin 服务器作为一个集群,需要在所有的节点都执行相同操作。 ### HDFS 上的工作目录中文件超过了 300G,可以手动删除吗? diff --git a/website/_docs/gettingstarted/faq.md b/website/_docs/gettingstarted/faq.md index dfaf5af..708b973 100644 --- a/website/_docs/gettingstarted/faq.md +++ b/website/_docs/gettingstarted/faq.md @@ -241,14 +241,7 @@ kylin.engine.spark-conf.spark.yarn.queue=YOUR_QUEUE_NAME * The cardinality of dimensions is an important measure of cube complexity. The higher the cardinality, the bigger the cube, and thus the longer to build and the slower to query. Cardinality > 1,000 is worth attention and > 1,000,000 should be avoided at best effort. For optimal cube performance, try reduce high cardinality by categorize values or derive features. #### How to add new user or change the default password? - * Kylin web's security is implemented with Spring security framework, where the kylinSecurity.xml is the main configuration file: - - {% highlight Groff markup %} - ${KYLIN_HOME}/tomcat/webapps/kylin/WEB-INF/classes/kylinSecurity.xml - {% endhighlight %} - - * The password hash for pre-defined test users can be found in the profile "sandbox,testing" part; To change the default password, you need generate a new hash and then update it here, please refer to the code snippet in: [https://stackoverflow.com/questions/25844419/spring-bcryptpasswordencoder-generate-different-password-for-same-input](https://stackoverflow.com/questions/25844419/spring-bcryptpasswordencoder-generate-different-password-for-same-input) - * When you deploy Kylin for more users, switch to LDAP authentication is recommended. + * Please check the document: [How to add new user or change the default password](https://cwiki.apache.org/confluence/display/KYLIN/How+to+add+new+user+or+change+the+default+password). #### Using sub-query for un-supported SQL @@ -294,42 +287,6 @@ group by a.slr_sgmt * Please check the [post in mailing list](http://apache-kylin.74782.x6.nabble.com/JDBC-query-result-Date-column-get-wrong-value-td5370.html) -#### How to update the default password for 'ADMIN'? - * By default, Kylin uses a simple, configuration based user registry; The default administrator 'ADMIN' with password 'KYLIN' is hard-coded in `kylinSecurity.xml`. To modify the password, you need firstly get the new password's encrypted value (with BCrypt), and then set it in `kylinSecurity.xml`. Here is a sample with password 'ABCDE' - -{% highlight Groff markup %} - -cd $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/lib - -java -classpath kylin-server-base-2.3.0.jar:spring-beans-4.3.10.RELEASE.jar:spring-core-4.3.10.RELEASE.jar:spring-security-core-4.2.3.RELEASE.jar:commons-codec-1.7.jar:commons-logging-1.1.3.jar org.apache.kylin.rest.security.PasswordPlaceholderConfigurer BCrypt ABCDE - -BCrypt encrypted password is: -$2a$10$A7.J.GIEOQknHmJhEeXUdOnj2wrdG4jhopBgqShTgDkJDMoKxYHVu - -{% endhighlight %} - - * Then you can set it into `kylinSecurity.xml` - -{% highlight Groff markup %} - -vi ./tomcat/webapps/kylin/WEB-INF/classes/kylinSecurity.xml - -{% endhighlight %} - - * Replace the origin encrypted password with the new one: -{% highlight Groff markup %} - - <bean class="org.springframework.security.core.userdetails.User" id="adminUser"> - <constructor-arg value="ADMIN"/> - <constructor-arg - value="$2a$10$A7.J.GIEOQknHmJhEeXUdOnj2wrdG4jhopBgqShTgDkJDMoKxYHVu"/> - <constructor-arg ref="adminAuthorities"/> - </bean> - -{% endhighlight %} - - * Restart Kylin to take effective. If you have multiple Kylin server as a cluster, do the same on each instance. - #### What kind of data be left in 'kylin.env.hdfs-working-dir' ? We often execute kylin cleanup storage command, but now our working dir folder is about 300 GB size, can we delete old data manually? * The data in 'hdfs-working-dir' ('hdfs:///kylin/kylin_metadata/' by default) includes intermediate files (will be GC) and Cuboid data (won't be GC). The Cuboid data is kept for the further segments' merge, as Kylin couldn't merge from HBase. If you're sure those segments won't be merged, you can move them to other paths or even delete. diff --git a/website/_docs/install/configuration.cn.md b/website/_docs/install/configuration.cn.md index be29b96..6da26d6 100644 --- a/website/_docs/install/configuration.cn.md +++ b/website/_docs/install/configuration.cn.md @@ -61,6 +61,7 @@ permalink: /cn/docs/install/configuration.html - [收集查询指标到 JMX](#jmx-metrics) - [收集查询指标到 dropwizard](#dropwizard-metrics) - [安全配置](#kylin-security) + - [用户名和密码](#user-name-and-password) - [集成 LDAP 实现单点登录](#ldap-sso) - [集成 Apache Ranger](#ranger) - [启用 ZooKeeper ACL](#zookeeper-acl) @@ -752,6 +753,9 @@ Kylin 可以使用三种类型的压缩,分别是 HBase 表压缩,Hive 输 本小节介绍 Kylin 安全有关的配置。 +### 用户名和密码 {#user-name-and-password} +请参考文档:[How to add new user or change the default password](https://cwiki.apache.org/confluence/display/KYLIN/How+to+add+new+user+or+change+the+default+password) + ### 集成 LDAP 实现单点登录 {#ldap-sso} diff --git a/website/_docs/install/configuration.md b/website/_docs/install/configuration.md index 732fc5a..f4aaf0a 100644 --- a/website/_docs/install/configuration.md +++ b/website/_docs/install/configuration.md @@ -60,13 +60,13 @@ permalink: /docs/install/configuration.html - [Collect Query Metrics to JMX](#jmx-metrics) - [Collect Query Metrics to dropwizard](#dropwizard-metrics) - [Security Configuration](#kylin-security) + - [User name and password](#user-name-and-password) - [Integrated LDAP for SSO](#ldap-sso) - [Integrate with Apache Ranger](#ranger) - [Enable ZooKeeper ACL](#zookeeper-acl) - [Distributed query cache with Memcached](#distributed-cache) - ### Configuration Files and Overriding {#kylin-config} This section introduces Kylin's configuration files and how to perform Configuration Overriding. @@ -744,6 +744,10 @@ This section introduces Kylin security-related configuration. +### User name and password {#user-name-and-password} + +Please check the document: [How to add new user or change the default password](https://cwiki.apache.org/confluence/display/KYLIN/How+to+add+new+user+or+change+the+default+password) + ### Integrated LDAP for SSO {#ldap-sso} - `kylin.security.profile`: specifies the way of security authentication, optional values include `ldap`, `testing`, `saml`, it should be set to `ldap` when integrating LDAP for SSO @@ -761,8 +765,6 @@ This section introduces Kylin security-related configuration. - `kylin.server.auth-user-cache.expire-seconds`: specifies LDAP user information cache time, default is 300(s) - `kylin.server.auth-user-cache.max-entries`: specifies maximum number of LDAP users, default is 100 - - ### Integrate with Apache Ranger {#ranger} - `kylin.server.external-acl-provider=org.apache.ranger.authorization.kylin.authorizer.RangerKylinAuthorizer` diff --git a/website/_docs/tutorial/sql_reference.cn.md b/website/_docs/tutorial/sql_reference.cn.md index 2de2210..28c1289 100644 --- a/website/_docs/tutorial/sql_reference.cn.md +++ b/website/_docs/tutorial/sql_reference.cn.md @@ -50,6 +50,15 @@ Apache Kylin 使用 Apache Calcite 做 SQL 解析和优化。作为一款 OLAP [INTERSECT_COUNT](#INTERSECT_COUNT) [INTERSECT_VALUE](#INTERSECT_VALUE) +## Sql 执行计划 +你可以通过在 sql 的前面添加`explain plan for`来获取 sql 的执行计划,比如: + +``` +explain plan for select count(*) from KYLIN_SALES +``` + +前端展示的是一个一行的执行计划的字符串,最好通过结果导出功能将执行计划导出后查看。 + ## 数据类型 [数据类型](#datatype) diff --git a/website/_docs/tutorial/sql_reference.md b/website/_docs/tutorial/sql_reference.md index 824b844..a3617e3 100644 --- a/website/_docs/tutorial/sql_reference.md +++ b/website/_docs/tutorial/sql_reference.md @@ -53,6 +53,14 @@ Apache Kylin relies on Apache Calcite to parse and optimize the SQL statements. [DATA TYPE](#DATATYPE) +## Sql Execution Plan +You can using `explain plan for` to displays execution plan, such as: + +``` +explain plan for select count(*) from KYLIN_SALES +``` + +The front-end displays the string of a one line execution plan. It is better to export the execution plan through the result export to view it. ## QUERY SYNTAX {#QUERYSYNTAX} {% highlight Groff markup %} diff --git a/website/_includes/header.cn.html b/website/_includes/header.cn.html index ccd2fd7..bd585e1 100644 --- a/website/_includes/header.cn.html +++ b/website/_includes/header.cn.html @@ -31,18 +31,6 @@ <span class="icon-bar"></span> </button> <ul class="nav icon-navbar"> - <li class="li-search"> - <div> - <form target="_blank" autocomplete="false" action="https://sematext.com/opensee/big-data"> - <input type="hidden" name="project" value="kylin"> - <div class="form-group search-container"> - <input type="text" autocomplete="false" class="form-control" name="q" placeholder="搜索..."> - <div class="search fa fa-search fa-lg"></div> - </div> - </form> - </div> - <!-- <a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-search fa-lg" title="Search: @ApacheKylin" ></a> --> - </li> <li><a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" ></a></li> <li><a href="https://github.com/apache/kylin" target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/kylin" ></a></li> <li><a href="https://www.facebook.com/kylinio" target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" ></a></li> diff --git a/website/_includes/header.html b/website/_includes/header.html index 280c2b8..557fe12 100644 --- a/website/_includes/header.html +++ b/website/_includes/header.html @@ -34,18 +34,6 @@ <span class="icon-bar"></span> </button> <ul class="nav icon-navbar"> - <li class="li-search"> - <div> - <form target="_blank" autocomplete="false" action="https://sematext.com/opensee/big-data"> - <input type="hidden" name="project" value="kylin"> - <div class="form-group search-container"> - <input type="text" autocomplete="false" class="form-control" name="q" placeholder="Search..."> - <div class="search fa fa-search fa-lg"></div> - </div> - </form> - </div> - <!-- <a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-search fa-lg" title="Search: @ApacheKylin" ></a> --> - </li> <li><a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" ></a></li> <li><a href="https://github.com/apache/kylin" target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/kylin" ></a></li> <li><a href="https://www.facebook.com/kylinio" target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" ></a></li> diff --git a/website/_includes/home_header.cn.html b/website/_includes/home_header.cn.html index ccd6764..315cdcc 100644 --- a/website/_includes/home_header.cn.html +++ b/website/_includes/home_header.cn.html @@ -30,18 +30,6 @@ <span class="icon-bar"></span> </button> <ul class="nav icon-navbar"> - <li class="li-search"> - <div> - <form target="_blank" autocomplete="false" action="https://sematext.com/opensee/big-data"> - <input type="hidden" name="project" value="kylin"> - <div class="form-group search-container"> - <input type="text" autocomplete="false" class="form-control" name="q" placeholder="搜索..."> - <div class="search fa fa-search fa-lg"></div> - </div> - </form> - </div> - <!-- <a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-search fa-lg" title="Search: @ApacheKylin" ></a> --> - </li> <li><a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" ></a></li> <li><a href="https://github.com/apache/kylin" target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/kylin" ></a></li> <li><a href="https://www.facebook.com/kylinio" target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" ></a></li> diff --git a/website/_includes/home_header.html b/website/_includes/home_header.html index 942a899..3025039 100644 --- a/website/_includes/home_header.html +++ b/website/_includes/home_header.html @@ -34,18 +34,6 @@ <span class="icon-bar"></span> </button> <ul class="nav icon-navbar"> - <li class="li-search"> - <div> - <form target="_blank" autocomplete="false" action="https://sematext.com/opensee/big-data"> - <input type="hidden" name="project" value="kylin"> - <div class="form-group search-container"> - <input type="text" autocomplete="false" class="form-control" name="q" placeholder="Search..."> - <div class="search fa fa-search fa-lg"></div> - </div> - </form> - </div> - <!-- <a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-search fa-lg" title="Search: @ApacheKylin" ></a> --> - </li> <li><a href="https://twitter.com/apachekylin" target="_blank" class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" ></a></li> <li><a href="https://github.com/apache/kylin" target="_blank" class="fa fa-github-alt fa-lg" title="Github: apache/kylin" ></a></li> <li><a href="https://www.facebook.com/kylinio" target="_blank" class="fa fa-facebook fa-lg" title="Facebook: kylin.io" ></a></li>