diff --git a/.gitignore b/.gitignore index 72fc0c9b64..0a8837eb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ be/output be/build output -docs/build +docs/.temp +docs/.vuepress/dist +docs/node_modules gensrc/build fe/target thirdparty/src diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..cf4b04f9bf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,58 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +language: node_js +# nodejs版本 +node_js: + - '8' + +# Travis-CI Caching +cache: + directories: + - docs/node_modules + + +# S: Build Lifecycle +install: + - cd docs && npm install + +before_script: + - export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST + - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi) + - echo $BRANCH + - sed -i 's/base:.*,/base:\"\/'$BRANCH'\/\",/g' .vuepress/config.js + - sed -i 's/docsBranch:.*,/docsBranch:\"'$BRANCH'\",/g' .vuepress/config.js + - rm -rf site-repo + +script: + - npm run build + +after_script: + - if [ "$TRAVIS_EVENT_TYPE" != "push" ]; then exit 0; fi + - git config user.name "${GIT_NAME}" + - git config user.email "${GIT_EMAIL}" + - git clone https://${SITE_REPO} site-repo + - cd site-repo + - mkdir -p ${BRANCH} && rm -rf ${BRANCH}/* + - cp -r ../.vuepress/dist/* ./${BRANCH}/ + - git checkout ${SITE_BRANCH} + - git add . + - git commit -am "Auto Build" + - git push --force --quiet "https://${SITE_PUSH_TOKEN}@${SITE_REPO}" ${SITE_BRANCH}:${SITE_BRANCH} + +branches: + only: + - master + - /^branch-.*$/ diff --git a/LICENSE.txt b/LICENSE.txt index 571e94b6c8..1dabf41b65 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -630,3 +630,27 @@ be/src/util/condition_variable* : BSD-style license Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +-------------------------------------------------------------------------------- + +docs/.vuepress/* The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/.markdownlint.yml b/docs/.markdownlint.yml new file mode 100644 index 0000000000..f01d39144f --- /dev/null +++ b/docs/.markdownlint.yml @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + "default": true, + "MD013": false, +} diff --git a/docs/.markdownlintignore b/docs/.markdownlintignore new file mode 100644 index 0000000000..1aea57f9f2 --- /dev/null +++ b/docs/.markdownlintignore @@ -0,0 +1,2 @@ +node_modules +.vuepress diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js new file mode 100644 index 0000000000..d8f76a99f6 --- /dev/null +++ b/docs/.vuepress/config.js @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function convertSidebar(list, path) { + if (list.length > 0) { + list.forEach((element, i) => { + if (element.children) { + convertSidebar(element.children, path + element.directoryPath) + delete element.directoryPath + } else { + list[i] = path + element + } + }); + } + return list +} + +module.exports = { + base: '', + locales: { + '/en/': { + lang: 'en', + title: 'Apache Doris', + description: 'Apache Doris' + }, + '/zh-CN/': { + lang: 'zh-CN', + title: 'Apache Doris', + description: 'Apache Doris' + } + }, + head: [ + ['meta', { name: 'theme-color', content: '#3eaf7c' }], + ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], + ['meta', { name: 'msapplication-TileColor', content: '#000000' }] + ], + title: 'Apache Doris', + description: 'Apache Doris', + themeConfig: { + title: 'Doris', + logo: '/images/doris-logo-only.png', + search: true, + smoothScroll: true, + searchMaxSuggestions: 10, + nextLinks: true, + prevLinks: true, + repo: 'apache/incubator-doris', + repoLabel: 'GitHub', + lastUpdated: 'Last Updated', + editLinks: true, + docsDir: 'docs', + docsBranch: '', + locales: { + '/en/': { + selectText: 'Languages', + label: 'English', + ariaLabel: 'Languages', + editLinkText: 'Edit this page on GitHub', + algolia: {}, + nav: [ + { + text: 'Home', link: '/en/' + }, + { + text: 'Docs', link: '/en/installing/compilation' + }, + { + text: 'Download', link: '/en/downloads/downloads' + }, + { + text: 'Apache', link: 'https://www.apache.org/', target: '_blank' + } + ], + sidebar: convertSidebar(require('./sidebar/en.js'), '/en/') + }, + '/zh-CN/': { + selectText: '选择语言', + label: '简体中文', + editLinkText: '在 GitHub 上编辑此页', + nav: [ + { + text: '主页', link: '/zh-CN/' + }, + { + text: '文档', link: '/zh-CN/installing/compilation' + }, + { + text: '下载', link: '/zh-CN/downloads/downloads' + }, + { + text: 'Apache', link: 'https://www.apache.org/', target: '_blank' + } + ], + algolia: {}, + sidebar: { + '/zh-CN/': convertSidebar(require('./sidebar/zh-CN.js'), '/zh-CN/') + } + } + } + }, + plugins: [ + 'reading-progress', 'plugin-back-to-top', 'plugin-medium-zoom' + ] +}; diff --git a/docs/.vuepress/public/favicon.ico b/docs/.vuepress/public/favicon.ico new file mode 100644 index 0000000000..c79ff458a2 Binary files /dev/null and b/docs/.vuepress/public/favicon.ico differ diff --git a/docs/resources/images/apache-asf-compressed.png b/docs/.vuepress/public/images/apache-asf-compressed.png similarity index 100% rename from docs/resources/images/apache-asf-compressed.png rename to docs/.vuepress/public/images/apache-asf-compressed.png diff --git a/docs/resources/images/apache-incubator-logo.png b/docs/.vuepress/public/images/apache-incubator-logo.png similarity index 100% rename from docs/resources/images/apache-incubator-logo.png rename to docs/.vuepress/public/images/apache-incubator-logo.png diff --git a/docs/resources/images/apache-incubator.png b/docs/.vuepress/public/images/apache-incubator.png similarity index 100% rename from docs/resources/images/apache-incubator.png rename to docs/.vuepress/public/images/apache-incubator.png diff --git a/docs/resources/images/apache_incubator_logo.png b/docs/.vuepress/public/images/apache_incubator_logo.png similarity index 100% rename from docs/resources/images/apache_incubator_logo.png rename to docs/.vuepress/public/images/apache_incubator_logo.png diff --git a/docs/resources/images/architecture.png b/docs/.vuepress/public/images/architecture.png similarity index 100% rename from docs/resources/images/architecture.png rename to docs/.vuepress/public/images/architecture.png diff --git a/docs/resources/images/asf_logo_wide_small.png b/docs/.vuepress/public/images/asf_logo_wide_small.png similarity index 100% rename from docs/resources/images/asf_logo_wide_small.png rename to docs/.vuepress/public/images/asf_logo_wide_small.png diff --git a/docs/resources/images/backend_state.png b/docs/.vuepress/public/images/backend_state.png similarity index 100% rename from docs/resources/images/backend_state.png rename to docs/.vuepress/public/images/backend_state.png diff --git a/docs/resources/images/cluster_link_and_migrate_db.png b/docs/.vuepress/public/images/cluster_link_and_migrate_db.png similarity index 100% rename from docs/resources/images/cluster_link_and_migrate_db.png rename to docs/.vuepress/public/images/cluster_link_and_migrate_db.png diff --git a/docs/resources/images/cluster_namaspace.png b/docs/.vuepress/public/images/cluster_namaspace.png similarity index 100% rename from docs/resources/images/cluster_namaspace.png rename to docs/.vuepress/public/images/cluster_namaspace.png diff --git a/docs/resources/images/cpu-flame-demo.svg b/docs/.vuepress/public/images/cpu-flame-demo.svg similarity index 100% rename from docs/resources/images/cpu-flame-demo.svg rename to docs/.vuepress/public/images/cpu-flame-demo.svg diff --git a/docs/resources/images/cpu-pprof-demo.png b/docs/.vuepress/public/images/cpu-pprof-demo.png similarity index 100% rename from docs/resources/images/cpu-pprof-demo.png rename to docs/.vuepress/public/images/cpu-pprof-demo.png diff --git a/docs/resources/images/cpu-pprof-demo.svg b/docs/.vuepress/public/images/cpu-pprof-demo.svg similarity index 100% rename from docs/resources/images/cpu-pprof-demo.svg rename to docs/.vuepress/public/images/cpu-pprof-demo.svg diff --git a/docs/resources/images/create-pr.png b/docs/.vuepress/public/images/create-pr.png similarity index 100% rename from docs/resources/images/create-pr.png rename to docs/.vuepress/public/images/create-pr.png diff --git a/docs/resources/images/create-pr2.png b/docs/.vuepress/public/images/create-pr2.png similarity index 100% rename from docs/resources/images/create-pr2.png rename to docs/.vuepress/public/images/create-pr2.png diff --git a/docs/resources/images/create-pr3.png b/docs/.vuepress/public/images/create-pr3.png similarity index 100% rename from docs/resources/images/create-pr3.png rename to docs/.vuepress/public/images/create-pr3.png diff --git a/docs/resources/images/dashboard_navibar.png b/docs/.vuepress/public/images/dashboard_navibar.png similarity index 100% rename from docs/resources/images/dashboard_navibar.png rename to docs/.vuepress/public/images/dashboard_navibar.png diff --git a/docs/resources/images/dashboard_overview.png b/docs/.vuepress/public/images/dashboard_overview.png similarity index 100% rename from docs/resources/images/dashboard_overview.png rename to docs/.vuepress/public/images/dashboard_overview.png diff --git a/docs/resources/images/dashboard_panel.png b/docs/.vuepress/public/images/dashboard_panel.png similarity index 100% rename from docs/resources/images/dashboard_panel.png rename to docs/.vuepress/public/images/dashboard_panel.png diff --git a/docs/resources/images/dashboard_row.png b/docs/.vuepress/public/images/dashboard_row.png similarity index 100% rename from docs/resources/images/dashboard_row.png rename to docs/.vuepress/public/images/dashboard_row.png diff --git a/docs/resources/images/doris-logo-1.png b/docs/.vuepress/public/images/doris-logo-1.png similarity index 100% rename from docs/resources/images/doris-logo-1.png rename to docs/.vuepress/public/images/doris-logo-1.png diff --git a/docs/resources/images/doris-logo-2.png b/docs/.vuepress/public/images/doris-logo-2.png similarity index 100% rename from docs/resources/images/doris-logo-2.png rename to docs/.vuepress/public/images/doris-logo-2.png diff --git a/docs/.vuepress/public/images/doris-logo-only.png b/docs/.vuepress/public/images/doris-logo-only.png new file mode 100644 index 0000000000..1c0fa86c1c Binary files /dev/null and b/docs/.vuepress/public/images/doris-logo-only.png differ diff --git a/docs/.vuepress/public/images/doris-logo.png b/docs/.vuepress/public/images/doris-logo.png new file mode 100644 index 0000000000..b5660e641d Binary files /dev/null and b/docs/.vuepress/public/images/doris-logo.png differ diff --git a/docs/resources/images/egg-logo.png b/docs/.vuepress/public/images/egg-logo.png similarity index 100% rename from docs/resources/images/egg-logo.png rename to docs/.vuepress/public/images/egg-logo.png diff --git a/docs/resources/images/egg-logo2.png b/docs/.vuepress/public/images/egg-logo2.png similarity index 100% rename from docs/resources/images/egg-logo2.png rename to docs/.vuepress/public/images/egg-logo2.png diff --git a/docs/resources/images/export_plan_tree_1.png b/docs/.vuepress/public/images/export_plan_tree_1.png similarity index 100% rename from docs/resources/images/export_plan_tree_1.png rename to docs/.vuepress/public/images/export_plan_tree_1.png diff --git a/docs/resources/images/export_plan_tree_2.png b/docs/.vuepress/public/images/export_plan_tree_2.png similarity index 100% rename from docs/resources/images/export_plan_tree_2.png rename to docs/.vuepress/public/images/export_plan_tree_2.png diff --git a/docs/resources/images/export_status_change.png b/docs/.vuepress/public/images/export_status_change.png similarity index 100% rename from docs/resources/images/export_status_change.png rename to docs/.vuepress/public/images/export_status_change.png diff --git a/docs/resources/images/fe_page_index.png b/docs/.vuepress/public/images/fe_page_index.png similarity index 100% rename from docs/resources/images/fe_page_index.png rename to docs/.vuepress/public/images/fe_page_index.png diff --git a/docs/resources/images/fe_page_logs.png b/docs/.vuepress/public/images/fe_page_logs.png similarity index 100% rename from docs/resources/images/fe_page_logs.png rename to docs/.vuepress/public/images/fe_page_logs.png diff --git a/docs/resources/images/fe_page_queries.png b/docs/.vuepress/public/images/fe_page_queries.png similarity index 100% rename from docs/resources/images/fe_page_queries.png rename to docs/.vuepress/public/images/fe_page_queries.png diff --git a/docs/resources/images/fe_page_sessions.png b/docs/.vuepress/public/images/fe_page_sessions.png similarity index 100% rename from docs/resources/images/fe_page_sessions.png rename to docs/.vuepress/public/images/fe_page_sessions.png diff --git a/docs/resources/images/fe_page_system.png b/docs/.vuepress/public/images/fe_page_system.png similarity index 100% rename from docs/resources/images/fe_page_system.png rename to docs/.vuepress/public/images/fe_page_system.png diff --git a/docs/resources/images/fe_page_system_access.png b/docs/.vuepress/public/images/fe_page_system_access.png similarity index 100% rename from docs/resources/images/fe_page_system_access.png rename to docs/.vuepress/public/images/fe_page_system_access.png diff --git a/docs/resources/images/fe_page_system_backends.png b/docs/.vuepress/public/images/fe_page_system_backends.png similarity index 100% rename from docs/resources/images/fe_page_system_backends.png rename to docs/.vuepress/public/images/fe_page_system_backends.png diff --git a/docs/resources/images/fe_page_system_brokers.png b/docs/.vuepress/public/images/fe_page_system_brokers.png similarity index 100% rename from docs/resources/images/fe_page_system_brokers.png rename to docs/.vuepress/public/images/fe_page_system_brokers.png diff --git a/docs/resources/images/fe_page_system_dbs.png b/docs/.vuepress/public/images/fe_page_system_dbs.png similarity index 100% rename from docs/resources/images/fe_page_system_dbs.png rename to docs/.vuepress/public/images/fe_page_system_dbs.png diff --git a/docs/resources/images/fe_page_system_error_hub.png b/docs/.vuepress/public/images/fe_page_system_error_hub.png similarity index 100% rename from docs/resources/images/fe_page_system_error_hub.png rename to docs/.vuepress/public/images/fe_page_system_error_hub.png diff --git a/docs/resources/images/fe_page_system_frontends.png b/docs/.vuepress/public/images/fe_page_system_frontends.png similarity index 100% rename from docs/resources/images/fe_page_system_frontends.png rename to docs/.vuepress/public/images/fe_page_system_frontends.png diff --git a/docs/resources/images/fe_page_system_jobs.png b/docs/.vuepress/public/images/fe_page_system_jobs.png similarity index 100% rename from docs/resources/images/fe_page_system_jobs.png rename to docs/.vuepress/public/images/fe_page_system_jobs.png diff --git a/docs/resources/images/fe_page_system_statistic.png b/docs/.vuepress/public/images/fe_page_system_statistic.png similarity index 100% rename from docs/resources/images/fe_page_system_statistic.png rename to docs/.vuepress/public/images/fe_page_system_statistic.png diff --git a/docs/resources/images/fe_page_system_tasks.png b/docs/.vuepress/public/images/fe_page_system_tasks.png similarity index 100% rename from docs/resources/images/fe_page_system_tasks.png rename to docs/.vuepress/public/images/fe_page_system_tasks.png diff --git a/docs/resources/images/fork-repo.png b/docs/.vuepress/public/images/fork-repo.png similarity index 100% rename from docs/resources/images/fork-repo.png rename to docs/.vuepress/public/images/fork-repo.png diff --git a/docs/resources/images/graduation-timeline.png b/docs/.vuepress/public/images/graduation-timeline.png similarity index 100% rename from docs/resources/images/graduation-timeline.png rename to docs/.vuepress/public/images/graduation-timeline.png diff --git a/docs/resources/images/howtoincubateaproject-thumb.png b/docs/.vuepress/public/images/howtoincubateaproject-thumb.png similarity index 100% rename from docs/resources/images/howtoincubateaproject-thumb.png rename to docs/.vuepress/public/images/howtoincubateaproject-thumb.png diff --git a/docs/resources/images/howtoincubateaproject.png b/docs/.vuepress/public/images/howtoincubateaproject.png similarity index 100% rename from docs/resources/images/howtoincubateaproject.png rename to docs/.vuepress/public/images/howtoincubateaproject.png diff --git a/docs/resources/images/incbuator_feather_egg_logo_crop.png b/docs/.vuepress/public/images/incbuator_feather_egg_logo_crop.png similarity index 100% rename from docs/resources/images/incbuator_feather_egg_logo_crop.png rename to docs/.vuepress/public/images/incbuator_feather_egg_logo_crop.png diff --git a/docs/resources/images/incubation-process.png b/docs/.vuepress/public/images/incubation-process.png similarity index 100% rename from docs/resources/images/incubation-process.png rename to docs/.vuepress/public/images/incubation-process.png diff --git a/docs/resources/images/incubator_ring_logo.png b/docs/.vuepress/public/images/incubator_ring_logo.png similarity index 100% rename from docs/resources/images/incubator_ring_logo.png rename to docs/.vuepress/public/images/incubator_ring_logo.png diff --git a/docs/resources/images/log_replication.jpg b/docs/.vuepress/public/images/log_replication.jpg similarity index 100% rename from docs/resources/images/log_replication.jpg rename to docs/.vuepress/public/images/log_replication.jpg diff --git a/docs/resources/images/login-gitter1.png b/docs/.vuepress/public/images/login-gitter1.png similarity index 100% rename from docs/resources/images/login-gitter1.png rename to docs/.vuepress/public/images/login-gitter1.png diff --git a/docs/resources/images/login-gitter2.PNG b/docs/.vuepress/public/images/login-gitter2.PNG similarity index 100% rename from docs/resources/images/login-gitter2.PNG rename to docs/.vuepress/public/images/login-gitter2.PNG diff --git a/docs/resources/images/metadata_contents.png b/docs/.vuepress/public/images/metadata_contents.png similarity index 100% rename from docs/resources/images/metadata_contents.png rename to docs/.vuepress/public/images/metadata_contents.png diff --git a/docs/resources/images/metadata_stream.png b/docs/.vuepress/public/images/metadata_stream.png similarity index 100% rename from docs/resources/images/metadata_stream.png rename to docs/.vuepress/public/images/metadata_stream.png diff --git a/docs/resources/images/monitor_arch.png b/docs/.vuepress/public/images/monitor_arch.png similarity index 100% rename from docs/resources/images/monitor_arch.png rename to docs/.vuepress/public/images/monitor_arch.png diff --git a/docs/resources/images/multi_tenant_arch.png b/docs/.vuepress/public/images/multi_tenant_arch.png similarity index 100% rename from docs/resources/images/multi_tenant_arch.png rename to docs/.vuepress/public/images/multi_tenant_arch.png diff --git a/docs/resources/images/new-pr.png b/docs/.vuepress/public/images/new-pr.png similarity index 100% rename from docs/resources/images/new-pr.png rename to docs/.vuepress/public/images/new-pr.png diff --git a/docs/resources/images/palo_architecture.jpg b/docs/.vuepress/public/images/palo_architecture.jpg similarity index 100% rename from docs/resources/images/palo_architecture.jpg rename to docs/.vuepress/public/images/palo_architecture.jpg diff --git a/docs/resources/images/palo_meta.png b/docs/.vuepress/public/images/palo_meta.png similarity index 100% rename from docs/resources/images/palo_meta.png rename to docs/.vuepress/public/images/palo_meta.png diff --git a/docs/resources/images/perf-report-demo.png b/docs/.vuepress/public/images/perf-report-demo.png similarity index 100% rename from docs/resources/images/perf-report-demo.png rename to docs/.vuepress/public/images/perf-report-demo.png diff --git a/docs/resources/images/replica_recover.png b/docs/.vuepress/public/images/replica_recover.png similarity index 100% rename from docs/resources/images/replica_recover.png rename to docs/.vuepress/public/images/replica_recover.png diff --git a/docs/resources/images/segment_v2.png b/docs/.vuepress/public/images/segment_v2.png similarity index 100% rename from docs/resources/images/segment_v2.png rename to docs/.vuepress/public/images/segment_v2.png diff --git a/docs/resources/images/spark_doris_connector.jpg b/docs/.vuepress/public/images/spark_doris_connector.jpg similarity index 100% rename from docs/resources/images/spark_doris_connector.jpg rename to docs/.vuepress/public/images/spark_doris_connector.jpg diff --git a/docs/resources/images/subscribe-mail-list-step1.png b/docs/.vuepress/public/images/subscribe-mail-list-step1.png similarity index 100% rename from docs/resources/images/subscribe-mail-list-step1.png rename to docs/.vuepress/public/images/subscribe-mail-list-step1.png diff --git a/docs/resources/images/subscribe-mail-list-step2.png b/docs/.vuepress/public/images/subscribe-mail-list-step2.png similarity index 100% rename from docs/resources/images/subscribe-mail-list-step2.png rename to docs/.vuepress/public/images/subscribe-mail-list-step2.png diff --git a/docs/resources/images/subscribe-mail-list-step3.png b/docs/.vuepress/public/images/subscribe-mail-list-step3.png similarity index 100% rename from docs/resources/images/subscribe-mail-list-step3.png rename to docs/.vuepress/public/images/subscribe-mail-list-step3.png diff --git a/docs/resources/images/subscribe-mail-list-step4.png b/docs/.vuepress/public/images/subscribe-mail-list-step4.png similarity index 100% rename from docs/resources/images/subscribe-mail-list-step4.png rename to docs/.vuepress/public/images/subscribe-mail-list-step4.png diff --git a/docs/resources/images/user_authority.png b/docs/.vuepress/public/images/user_authority.png similarity index 100% rename from docs/resources/images/user_authority.png rename to docs/.vuepress/public/images/user_authority.png diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js new file mode 100644 index 0000000000..5c24f34952 --- /dev/null +++ b/docs/.vuepress/sidebar/en.js @@ -0,0 +1,442 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module.exports = [ + { + title: "Downloads", + directoryPath: "downloads/", + children: ["downloads"], + sidebarDepth: 1, + }, + { + title: "Compilation and Deployment", + directoryPath: "installing/", + children: ["compilation", "install-deploy", "upgrade"], + }, + { + title: "Getting Started", + directoryPath: "getting-started/", + children: [ + "basic-usage", + "advance-usage", + "best-practice", + "data-partition", + "data-model-rollup", + "hit-the-rollup", + ], + }, + { + title: "Administrator Guide", + directoryPath: "administrator-guide/", + children: [ + { + title: "Load Data", + directoryPath: "load-data/", + children: [ + "load-manual", + "broker-load-manual", + "stream-load-manual", + "routine-load-manual", + "insert-into-manual", + "delete-manual", + ], + sidebarDepth: 2, + }, + { + title: "Schema Change", + directoryPath: "alter-table/", + children: [ + "alter-table-bitmap-index", + "alter-table-rollup", + "alter-table-schema-change", + "alter-table-temp-partition", + ], + sidebarDepth: 2, + }, + { + title: "HTTP API", + directoryPath: "http-actions/", + children: [ + "cancel-label", + "compaction-action", + "fe-get-log-file", + "get-label-state", + "restore-tablet", + ], + sidebarDepth: 1, + }, + { + title: "Maintainence Operation", + directoryPath: "operation/", + children: [ + "metadata-operation", + "monitor-alert", + "multi-tenant", + "tablet-meta-tool", + "tablet-repair-and-balance", + ], + sidebarDepth: 2, + }, + { + title: "Configuration", + directoryPath: "config/", + children: ["fe_config"], + sidebarDepth: 1, + }, + "backup-restore", + "broker", + "colocation-join", + "dynamic-partition", + "export_manual", + "privilege", + "small-file-mgr", + "sql-mode", + "time-zone", + "variables", + ], + sidebarDepth: 1, + }, + { + title: "Extending Ability", + directoryPath: "extending-doris/", + children: [ + "audit-plugin", + "doris-on-es", + "plugin-development-manual", + "user-defined-function", + ], + }, + { + title: "Design Documents", + directoryPath: "internal/", + children: [ + "doris_storage_optimization", + "grouping_sets_design", + "metadata-design", + ], + }, + { + title: "SQL Manual", + directoryPath: "sql-reference/", + children: [ + { + title: "SQL Functions", + directoryPath: "sql-functions/", + children: [ + { + title: "Date Time Functions", + directoryPath: "date-time-functions/", + children: [ + "curdate", + "current_timestamp", + "date_add", + "date_format", + "date_sub", + "datediff", + "day", + "dayname", + "dayofmonth", + "dayofweek", + "dayofyear", + "from_days", + "from_unixtime", + "hour", + "minute", + "month", + "monthname", + "now", + "second", + "str_to_date", + "timediff", + "timestampadd", + "timestampdiff", + "to_days", + "unix_timestamp", + "utc_timestamp", + "workofyear", + "year", + ], + }, + { + title: "Sptial Functions", + directoryPath: "spatial-functions/", + children: [ + "st_astext", + "st_circle", + "st_contains", + "st_distance_sphere", + "st_geometryfromtext", + "st_linefromtext", + "st_point", + "st_polygon", + "st_x", + "st_y", + ], + }, + { + title: "String Functions", + directoryPath: "string-functions/", + children: [ + "ascii", + "concat", + "concat_ws", + "ends_with", + "find_in_set", + "get_json_double", + "get_json_int", + "get_json_string", + "group_concat", + "instr", + "lcase", + "left", + "length", + "locate", + "lower", + "lpad", + "ltrim", + "money_format", + "null_or_empty", + "regexp_extract", + "regexp_replace", + "repeat", + "right", + "split_part", + "starts_with", + "strleft", + "strright", + ], + }, + { + title: "Aggregate Functions", + directoryPath: "aggregate-functions/", + children: [ + "avg", + "bitmap", + "count", + "hll_union_agg", + "max", + "min", + "ndv", + "percentile_approx", + "stddev", + "stddev_samp", + "sum", + "var_samp", + "variance", + ], + }, + { + title: "bitmap functions", + directoryPath: "bitmap-functions/", + children: [ + "bitmap_and", + "bitmap_contains", + "bitmap_empty", + "bitmap_from_string", + "bitmap_has_any", + "bitmap_hash", + "bitmap_or", + "bitmap_to_string", + "to_bitmap", + ], + }, + { + title: "Hash Functions", + directoryPath: "hash-functions/", + children: ["murmur_hash3_32"], + }, + "cast", + ], + }, + { + title: "DDL Statements", + directoryPath: "sql-statements/", + children: [ + { + title: "Account Management", + directoryPath: "Account Management/", + children: [ + "CREATE ROLE", + "CREATE USER", + "DROP ROLE", + "DROP USER", + "GRANT", + "REVOKE", + "SET PASSWORD", + "SET PROPERTY", + "SHOW GRANTS", + "SHOW ROLES", + ], + }, + { + title: "Administration", + directoryPath: "Administration/", + children: [ + "ADMIN CANCEL REPAIR", + "ADMIN CHECK TABLET", + "ADMIN REPAIR", + "ADMIN SET CONFIG", + "ADMIN SET REPLICA STATUS", + "ADMIN SHOW CONFIG", + "ADMIN SHOW REPLICA DISTRIBUTION", + "ADMIN SHOW REPLICA STATUS", + "ALTER CLUSTER", + "ALTER SYSTEM", + "CANCEL DECOMMISSION", + "CREATE CLUSTER", + "CREATE FILE", + "DROP CLUSTER", + "DROP FILE", + "ENTER", + "INSTALL PLUGIN", + "LINK DATABASE", + "MIGRATE DATABASE", + "SHOW BACKENDS", + "SHOW BROKER", + "SHOW FILE", + "SHOW FRONTENDS", + "SHOW FULL COLUMNS", + "SHOW INDEX", + "SHOW MIGRATIONS", + "SHOW PLUGINS", + "SHOW TABLE STATUS", + "UNINTALL PLUGIN", + ], + }, + { + title: "Data Definition", + directoryPath: "Data Definition/", + children: [ + "ALTER DATABASE", + "ALTER TABLE", + "ALTER VIEW", + "BACKUP", + "CANCEL ALTER", + "CANCEL BACKUP", + "CANCEL RESTORE", + "Colocate Join", + "CREATE DATABASE", + "CREATE INDEX", + "CREATE MATERIALIZED VIEW", + "CREATE REPOSITORY", + "CREATE TABLE", + "CREATE VIEW", + "create-function", + "DROP DATABASE", + "DROP INDEX", + "DROP MATERIALIZED VIEW", + "DROP REPOSITORY", + "DROP TABLE", + "DROP VIEW", + "drop-function", + "HLL", + "RECOVER", + "RESTORE", + "show-functions", + "TRUNCATE TABLE", + ], + }, + { + title: "Data Manipulation", + directoryPath: "Data Manipulation/", + children: [ + "BROKER LOAD", + "CANCEL DELETE", + "CANCEL LABEL", + "CANCEL LOAD", + "DELETE", + "EXPORT", + "GET LABEL STATE", + "GROUP BY", + "insert", + "LOAD", + "MINI LOAD", + "MULTI LOAD", + "PAUSE ROUTINE LOAD", + "RESTORE TABLET", + "RESUME ROUTINE LOAD", + "ROUTINE LOAD", + "SHOW ALTER", + "SHOW BACKUP", + "SHOW DATA", + "SHOW DATABASES", + "SHOW DELETE", + "SHOW DYNAMIC PARTITION TABLES", + "SHOW EXPORT", + "SHOW LOAD", + "SHOW PARTITIONS", + "SHOW PROPERTY", + "SHOW REPOSITORIES", + "SHOW RESTORE", + "SHOW ROUTINE LOAD TASK", + "SHOW ROUTINE LOAD", + "SHOW SNAPSHOT", + "SHOW TABLES", + "SHOW TABLET", + "SHOW TRANSACTION", + "STOP ROUTINE LOAD", + "STREAM LOAD", + ], + }, + { + title: "Data Types", + directoryPath: "Data Types/", + children: [ + "BIGINT", + "BOOLEAN", + "CHAR", + "DATE", + "DATETIME", + "DECIMAL", + "DOUBLE", + "FLOAT", + "HLL(HyperLogLog)", + "INT", + "SMALLINT", + "TINYINT", + "VARCHAR", + ], + }, + { + title: "Utility", + directoryPath: "Utility/", + children: ["util_stmt"], + }, + ], + }, + ], + }, + { + title: "Developer Guide", + directoryPath: "developer-guide/", + children: ["debug-tool", "format-code"], + }, + { + title: "Apache Commnity", + directoryPath: "community/", + children: [ + "gitter", + "how-to-contribute", + "members", + "pull-request", + "release-process", + "subscribe-mail-list", + "verify-apache-release", + ], + }, +] diff --git a/docs/.vuepress/sidebar/zh-CN.js b/docs/.vuepress/sidebar/zh-CN.js new file mode 100644 index 0000000000..23c0088b14 --- /dev/null +++ b/docs/.vuepress/sidebar/zh-CN.js @@ -0,0 +1,450 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module.exports = [ + { + title: "下载", + directoryPath: "downloads/", + children: ["downloads"], + sidebarDepth: 1, + }, + { + title: "编译与部署", + directoryPath: "installing/", + children: ["compilation", "install-deploy", "upgrade"], + }, + { + title: "开始使用", + directoryPath: "getting-started/", + children: [ + "basic-usage", + "advance-usage", + "best-practice", + "data-partition", + "data-model-rollup", + "hit-the-rollup", + ], + }, + { + title: "操作手册", + directoryPath: "administrator-guide/", + children: [ + { + title: "数据导入", + directoryPath: "load-data/", + children: [ + "load-manual", + "broker-load-manual", + "stream-load-manual", + "routine-load-manual", + "insert-into-manual", + "delete-manual", + ], + sidebarDepth: 2, + }, + { + title: "表结构变更", + directoryPath: "alter-table/", + children: [ + "alter-table-bitmap-index", + "alter-table-rollup", + "alter-table-schema-change", + "alter-table-temp-partition", + ], + sidebarDepth: 2, + }, + { + title: "物化视图", + directoryPath: "materialized-view/", + children: [], + sidebarDepth: 2, + }, + { + title: "HTTP API", + directoryPath: "http-actions/", + children: [ + "cancel-label", + "compaction-action", + "fe-get-log-file", + "get-label-state", + "restore-tablet", + ], + sidebarDepth: 1, + }, + { + title: "运维操作", + directoryPath: "operation/", + children: [ + "disk-capacity", + "metadata-operation", + "monitor-alert", + "multi-tenant", + "tablet-meta-tool", + "tablet-repair-and-balance", + "tablet-restore-tool", + ], + sidebarDepth: 2, + }, + { + title: "配置文件", + directoryPath: "config/", + children: ["fe_config"], + sidebarDepth: 1, + }, + "backup-restore", + "broker", + "colocation-join", + "dynamic-partition", + "export-manual", + "privilege", + "segment-v2-usage", + "small-file-mgr", + "sql-mode", + "time-zone", + "variables", + ], + sidebarDepth: 1, + }, + { + title: "扩展功能", + directoryPath: "extending-doris/", + children: [ + "audit-plugin", + "doris-on-es", + "plugin-development-manual", + "user-defined-function", + ], + }, + { + title: "设计文档", + directoryPath: "internal/", + children: [ + "doris_storage_optimization", + "grouping_sets_design", + "metadata-design", + "spark_load", + ], + }, + { + title: "SQL 手册", + directoryPath: "sql-reference/", + children: [ + { + title: "SQL 函数", + directoryPath: "sql-functions/", + children: [ + { + title: "日期函数", + directoryPath: "date-time-functions/", + children: [ + "convert_tz", + "curdate", + "current_timestamp", + "curtime", + "date_add", + "date_format", + "date_sub", + "datediff", + "day", + "dayname", + "dayofmonth", + "dayofweek", + "dayofyear", + "from_days", + "from_unixtime", + "hour", + "minute", + "month", + "monthname", + "now", + "second", + "str_to_date", + "timediff", + "timestampadd", + "timestampdiff", + "to_days", + "unix_timestamp", + "utc_timestamp", + "workofyear", + "year", + ], + }, + { + title: "地理位置函数", + directoryPath: "spatial-functions/", + children: [ + "st_astext", + "st_circle", + "st_contains", + "st_distance_sphere", + "st_geometryfromtext", + "st_linefromtext", + "st_point", + "st_polygon", + "st_x", + "st_y", + ], + }, + { + title: "字符串函数", + directoryPath: "string-functions/", + children: [ + "ascii", + "concat", + "concat_ws", + "ends_with", + "find_in_set", + "get_json_double", + "get_json_int", + "get_json_string", + "group_concat", + "instr", + "lcase", + "left", + "length", + "locate", + "lower", + "lpad", + "ltrim", + "money_format", + "null_or_empty", + "regexp_extract", + "regexp_replace", + "repeat", + "right", + "split_part", + "starts_with", + "strleft", + "strright", + ], + }, + { + title: "聚合函数", + directoryPath: "aggregate-functions/", + children: [ + "avg", + "bitmap", + "count", + "hll_union_agg", + "max", + "min", + "ndv", + "percentile_approx", + "stddev", + "stddev_samp", + "sum", + "var_samp", + "variance", + ], + }, + { + title: "bitmap函数", + directoryPath: "bitmap-functions/", + children: [ + "bitmap_and", + "bitmap_contains", + "bitmap_empty", + "bitmap_from_string", + "bitmap_has_any", + "bitmap_hash", + "bitmap_or", + "bitmap_to_string", + "to_bitmap", + ], + }, + { + title: "Hash函数", + directoryPath: "hash-functions/", + children: ["murmur_hash3_32"], + }, + "cast", + ], + }, + { + title: "语法帮助", + directoryPath: "sql-statements/", + children: [ + { + title: "用户账户管理", + directoryPath: "Account Management/", + children: [ + "CREATE ROLE", + "CREATE USER", + "DROP ROLE", + "DROP USER", + "GRANT", + "REVOKE", + "SET PASSWORD", + "SET PROPERTY", + "SHOW GRANTS", + "SHOW ROLES", + ], + }, + { + title: "集群管理", + directoryPath: "Administration/", + children: [ + "ADMIN CANCEL REPAIR", + "ADMIN CHECK TABLET", + "ADMIN REPAIR", + "ADMIN SET CONFIG", + "ADMIN SET REPLICA STATUS", + "ADMIN SHOW CONFIG", + "ADMIN SHOW REPLICA DISTRIBUTION", + "ADMIN SHOW REPLICA STATUS", + "ALTER CLUSTER", + "ALTER SYSTEM", + "CANCEL DECOMMISSION", + "CREATE CLUSTER", + "CREATE FILE", + "DROP CLUSTER", + "DROP FILE", + "ENTER", + "INSTALL PLUGIN", + "LINK DATABASE", + "MIGRATE DATABASE", + "SHOW BACKENDS", + "SHOW BROKER", + "SHOW FILE", + "SHOW FRONTENDS", + "SHOW FULL COLUMNS", + "SHOW INDEX", + "SHOW MIGRATIONS", + "SHOW PLUGINS", + "SHOW TABLE STATUS", + "UNINSTALL PLUGIN", + ], + }, + { + title: "DDL", + directoryPath: "Data Definition/", + children: [ + "ALTER DATABASE", + "ALTER TABLE", + "ALTER VIEW", + "BACKUP", + "CANCEL ALTER", + "CANCEL BACKUP", + "CANCEL RESTORE", + "CREATE DATABASE", + "CREATE INDEX", + "CREATE MATERIALIZED VIEW", + "CREATE REPOSITORY", + "CREATE TABLE", + "CREATE VIEW", + "create-function", + "DROP DATABASE", + "DROP INDEX", + "DROP MATERIALIZED VIEW", + "DROP REPOSITORY", + "DROP TABLE", + "DROP VIEW", + "drop-function", + "HLL", + "RECOVER", + "RESTORE", + "show-functions", + "TRUNCATE TABLE", + ], + }, + { + title: "DML", + directoryPath: "Data Manipulation/", + children: [ + "BROKER LOAD", + "CANCEL LOAD", + "DELETE", + "EXPORT", + "GROUP BY", + "insert", + "LOAD", + "MINI LOAD", + "MULTI LOAD", + "PAUSE ROUTINE LOAD", + "RESUME ROUTINE LOAD", + "ROUTINE LOAD", + "SHOW ALTER", + "SHOW BACKUP", + "SHOW DATA", + "SHOW DATABASES", + "SHOW DELETE", + "SHOW DYNAMIC PARTITION TABLES", + "SHOW EXPORT", + "SHOW LOAD", + "SHOW PARTITIONS", + "SHOW PROPERTY", + "SHOW REPOSITORIES", + "SHOW RESTORE", + "SHOW ROUTINE LOAD", + "SHOW ROUTINE LOAD TASK", + "SHOW SNAPSHOT", + "SHOW TABLES", + "SHOW TABLET", + "SHOW TRANSACTION", + "STOP ROUTINE LOAD", + "STREAM LOAD", + ], + }, + { + title: "数据类型", + directoryPath: "Data Types/", + children: [ + "BIGINT", + "BOOLEAN", + "CHAR", + "DATE", + "DATETIME", + "DECIMAL", + "DOUBLE", + "FLOAT", + "HLL", + "INT", + "LARGEINT", + "SMALLINT", + "TINYINT", + "VARCHAR", + ], + }, + { + title: "辅助命令", + directoryPath: "Utility/", + children: ["DESCRIBE"], + }, + ], + }, + ], + }, + { + title: "开发者手册", + directoryPath: "developer-guide/", + children: ["debug-tool", "format-code"], + }, + { + title: "Apache 社区", + directoryPath: "community/", + children: [ + "gitter", + "how-to-contribute", + "members", + "pull-request", + "release-process", + "subscribe-mail-list", + "verify-apache-release", + ], + }, +]; diff --git a/docs/.vuepress/theme/components/Footer.vue b/docs/.vuepress/theme/components/Footer.vue new file mode 100644 index 0000000000..607e5b1845 --- /dev/null +++ b/docs/.vuepress/theme/components/Footer.vue @@ -0,0 +1,53 @@ + + + + + \ No newline at end of file diff --git a/docs/.vuepress/theme/components/Home.vue b/docs/.vuepress/theme/components/Home.vue new file mode 100644 index 0000000000..32a391e56b --- /dev/null +++ b/docs/.vuepress/theme/components/Home.vue @@ -0,0 +1,38 @@ + + + + \ No newline at end of file diff --git a/docs/.vuepress/theme/components/NavLinks.vue b/docs/.vuepress/theme/components/NavLinks.vue new file mode 100644 index 0000000000..66f1023fe4 --- /dev/null +++ b/docs/.vuepress/theme/components/NavLinks.vue @@ -0,0 +1,56 @@ + + + + diff --git a/docs/.vuepress/theme/index.js b/docs/.vuepress/theme/index.js new file mode 100644 index 0000000000..d882e00623 --- /dev/null +++ b/docs/.vuepress/theme/index.js @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module.exports = { + extend: "@vuepress/theme-default" +}; diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue new file mode 100644 index 0000000000..34b0b570c8 --- /dev/null +++ b/docs/.vuepress/theme/layouts/Layout.vue @@ -0,0 +1,38 @@ + + + + \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 6d971114bc..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# -# This file build all docs -# - -BUILD_DIR = ${CURDIR}/build -HELP_DIR = ${BUILD_DIR}/contents - -all: zip_help -.PHONY: all - -${BUILD_DIR}: - mkdir -p ${BUILD_DIR} -${HELP_DIR}: - mkdir -p ${HELP_DIR} - -# build help zip -HELP_OUTPUT = ${BUILD_DIR}/help-resource.zip -${HELP_OUTPUT}: documentation/cn/sql-reference ${BUILD_DIR} ${HELP_DIR} - cp -r $ + +# Doris Document + +[Vuepress](https://github.com/vuejs/vuepress.git) is used as our document site generator, configurations are in `./docs/.vuepress` folder. + +## Getting Started + +Download and install [nodejs](http://nodejs.cn/download/) + +```bash +npm config set registry https://registry.npm.taobao.org // Only if you are in Mainland China. +cd docs && npm install +npm run dev +``` + +Open your browser and navigate to `localhost:8080/en/` or `localhost:8080/zh-CN/`. + +## Docs' Directories + +```bash + . + ├─ docs/ + │ ├─ .vuepress + │ │ ├─ dist // Built site files. + │ │ ├─ public // Assets + │ │ ├─ sidebar // Side bar configurations. + │ │ │ ├─ en.js + │ │ │ └─ zh-CN.js + │ ├─ theme // Global styles and customizations. + │ └─ config.js // Vuepress configurations. + ├─ zh-CN/ + │ ├─ xxxx.md + │ └─ README.md // Will be rendered as entry page. + └─ en/ + ├─ one.md + └─ README.md // Will be rendered as entry page. +``` + +## Start Writing + +1. Write markdown files in multi languages and put them in separated folders `./en/` and `./zh-CN/`. **But they should be with the same name.** + + ```bash + . + ├─ en/ + │ ├─ one.md + │ └─ two.md + └─ zh-CN/ + │ ├─ one.md + │ └─ two.md + ``` + +2. Frontmatters like below should always be on the top of each file: + + ```markdown + --- + { + "title": "Backup and Recovery", // sidebar title + "language": "en" // writing language + } + --- + ``` + +3. Assets are in `.vuepress/public/`. + + Assuming that there exists a png `.vuepress/public/images/image_x.png`, then it can be used like: + + ```markdown + ![alter text](/images/image_x.png) + ``` + +4. Remember to update the sidebar configurations in `.vuepress/sidebar/` after adding a new file or a folder. + + Assuming that the directories are: + + ```bash + . + ├─ en/ + │ ├─ subfolder + │ │ ├─ one.md + │ │ └─ two.md + │ └─ three.md + └─ zh-CN/ + ├─ subfolder + │ ├─ one.md + │ └─ two.md + └─ three.md + ``` + + Then the sidebar configurations would be like: + + ```javascript + // .vuepress/sidebar/en.js` + module.exports = [ + { + title: "subfolder name", + directoryPath: "subfolder/", + children: ["one", "two"] + }, + "three" + ] + ``` + + ```javascript + // .vuepress/sidebar/zh-CN.js + module.exports = [ + { + title: "文件夹名称", + directoryPath: "subfolder/", + children: ["one", "two"] + }, + "three" + ] + ``` + +5. Run `npm run lint` before starting a PR. + + Surely that there will be lots of error logs if the mardown files are not following the rules, and these logs will all be printed in the console: + +```shell + +en/administrator-guide/alter-table/alter-table-bitmap-index.md:92 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: " ```"] +en/administrator-guide/alter-table/alter-table-rollup.md:45 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-rollup.md:77 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-rollup.md:178 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] +en/administrator-guide/alter-table/alter-table-schema-change.md:50 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:82 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:127 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:144 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:153 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:199 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] +en/administrator-guide/backup-restore.md:45:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1] +en/administrator-guide/backup-restore.md:57:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1] +en/administrator-guide/backup-restore.md:61:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 3; Style: 1/1/1] +npm ERR! code ELIFECYCLE +npm ERR! errno 1 +npm ERR! docs@ lint: `markdownlint '**/*.md' -f` +npm ERR! Exit status 1 +npm ERR! +npm ERR! Failed at the docs@ lint script. + +``` + +## Deployment + +Just start a PR, and all things will be done automatically. + +## What Travis Does + +Once a PR accepted, travis ci will be triggered to build and deploy the whole website within its own branch. Here is what `.travis.yml` does: + +1. Prepare nodejs and vuepress enviorment. + +2. Use current branch's name as the relative url path in `.vuepress/config.js`(which is the `base` property). + +3. Build the documents into a website all by vuepress. + +4. Fetch asf-site repo to local directory, and copy `.vupress/dist/` into `{BRANCH}/`. + +5. Push the new site to asf-site repo with `GitHub Token`(which is preset in Travis console as a variable used in .travis.yml). + +## asf-site repository + +Finally the asf-site repository will be like: + +```bash +. +├─ master/ +│ ├─ en/ +│ │ ├─ subfolder +│ │ │ ├─ one.md +│ │ └─ three.md +│ └─ zh-CN/ +│ ├─ subfolder +│ │ ├─ one.md +│ └─ three.md +├─ incubating-0.11/ +│ ├─ en/ +│ │ ├─ subfolder +│ │ │ ├─ one.md +│ │ └─ three.md +│ └─ zh-CN/ +│ ├─ subfolder +│ │ ├─ one.md +│ └─ three.md +├─ index.html // user entry, and auto redirected to master folder +└─ versions.json // all versions that can be seleted on the website are defined here +``` + +And the `versions.json` is like: + +```json +{ + "en": [ + { + "text": "Versions", // dropdown label + "items": [ + { + "text": "master", // dropdown-item label + "link": "/../master/en/installing/compilation.html", // entry page for this version + "target": "_blank" + }, + { + "text": "branch-0.11", + "link": "/../branch-0.11/en/installing/compilation.html", + "target": "_blank" + } + ] + } + ], + "zh-CN": [ + { + "text": "版本", + "items": [ + { + "text": "master", + "link": "/../master/zh-CN/installing/compilation.html", + "target": "_blank" + }, + { + "text": "branch-0.11", + "link": "/../branch-0.11/zh-CN/installing/compilation.html", + "target": "_blank" + } + ] + } + ] +} +``` diff --git a/docs/documentation/cn/administrator-guide/alter-table/index.rst b/docs/documentation/cn/administrator-guide/alter-table/index.rst deleted file mode 100644 index 208741231d..0000000000 --- a/docs/documentation/cn/administrator-guide/alter-table/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -表结构变更 -============= - -.. toctree:: - :maxdepth: 2 - :glob: - - * diff --git a/docs/documentation/cn/administrator-guide/config/index.rst b/docs/documentation/cn/administrator-guide/config/index.rst deleted file mode 100644 index 15374d5cd3..0000000000 --- a/docs/documentation/cn/administrator-guide/config/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -配置文件 -============= - -.. toctree:: - :maxdepth: 1 - :glob: - - * diff --git a/docs/documentation/cn/administrator-guide/http-actions/index.rst b/docs/documentation/cn/administrator-guide/http-actions/index.rst deleted file mode 100644 index 268e99b5a8..0000000000 --- a/docs/documentation/cn/administrator-guide/http-actions/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -HTTP API -============= - -.. toctree:: - :maxdepth: 1 - :glob: - - * diff --git a/docs/documentation/cn/administrator-guide/index.rst b/docs/documentation/cn/administrator-guide/index.rst deleted file mode 100644 index 21c1bffc60..0000000000 --- a/docs/documentation/cn/administrator-guide/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -============= -操作手册 -============= - -.. toctree:: - :hidden: - - load-data/index - alter-table/index - materialized-view/index - http-actions/index - operation/index - config/index - -.. toctree:: - :maxdepth: 1 - :glob: - - * - diff --git a/docs/documentation/cn/administrator-guide/load-data/index.rst b/docs/documentation/cn/administrator-guide/load-data/index.rst deleted file mode 100644 index b5aad9ff85..0000000000 --- a/docs/documentation/cn/administrator-guide/load-data/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -============= -数据导入 -============= - -.. toctree:: - :maxdepth: 2 - - load-manual.md - broker-load-manual.md - stream-load-manual.md - routine-load-manual.md - insert-into-manual.md - delete-manual.md diff --git a/docs/documentation/cn/administrator-guide/materialized-view/index.rst b/docs/documentation/cn/administrator-guide/materialized-view/index.rst deleted file mode 100644 index 280d7820a1..0000000000 --- a/docs/documentation/cn/administrator-guide/materialized-view/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -物化视图 -============= - -.. toctree:: - :maxdepth: 2 - :glob: - - * diff --git a/docs/documentation/cn/administrator-guide/operation/index.rst b/docs/documentation/cn/administrator-guide/operation/index.rst deleted file mode 100644 index 978ac3d83f..0000000000 --- a/docs/documentation/cn/administrator-guide/operation/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -运维操作 -============= - -.. toctree:: - :maxdepth: 2 - :glob: - - * diff --git a/docs/documentation/cn/community/index.rst b/docs/documentation/cn/community/index.rst deleted file mode 100644 index 26ae323869..0000000000 --- a/docs/documentation/cn/community/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -=========== -Apache 社区 -=========== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/developer-guide/index.rst b/docs/documentation/cn/developer-guide/index.rst deleted file mode 100644 index ba6bb38a48..0000000000 --- a/docs/documentation/cn/developer-guide/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -开发者手册 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/downloads/index.rst b/docs/documentation/cn/downloads/index.rst deleted file mode 100644 index 0a7331c37c..0000000000 --- a/docs/documentation/cn/downloads/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -============= -下载 -============= - -.. toctree:: - :maxdepth: 1 - :glob: - - * - diff --git a/docs/documentation/cn/extending-doris/index.rst b/docs/documentation/cn/extending-doris/index.rst deleted file mode 100644 index 4fda2a01df..0000000000 --- a/docs/documentation/cn/extending-doris/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -=========== -扩展功能 -=========== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/getting-started/index.rst b/docs/documentation/cn/getting-started/index.rst deleted file mode 100644 index dcb7cdb916..0000000000 --- a/docs/documentation/cn/getting-started/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -============= -开始使用 -============= - -.. toctree:: - - basic-usage.md - advance-usage.md - best-practice.md - data-partition.md - data-model-rollup.md - hit-the-rollup.md diff --git a/docs/documentation/cn/index.rst b/docs/documentation/cn/index.rst deleted file mode 100644 index d94ac3d1a5..0000000000 --- a/docs/documentation/cn/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -============= -中文 -============= - -欢迎帮助我们改进文档质量。 -你可以通过点击每个页面右上方的 "Edit on Github" 来直接在 Github 编辑文档,然后生成一个 Pull Request。 - -.. toctree:: - - downloads/index - installing/index - getting-started/index - administrator-guide/index - extending-doris/index - internal/index - sql-reference/index - developer-guide/index - community/index diff --git a/docs/documentation/cn/installing/index.rst b/docs/documentation/cn/installing/index.rst deleted file mode 100644 index 29e0e2f4a1..0000000000 --- a/docs/documentation/cn/installing/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -=========== -编译与部署 -=========== - -.. toctree:: - - compilation.md - install-deploy.md - upgrade.md diff --git a/docs/documentation/cn/internal/index.rst b/docs/documentation/cn/internal/index.rst deleted file mode 100644 index 2d2aee33b2..0000000000 --- a/docs/documentation/cn/internal/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -=========== -设计文档 -=========== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/index.rst b/docs/documentation/cn/sql-reference/index.rst deleted file mode 100644 index c30bebbc01..0000000000 --- a/docs/documentation/cn/sql-reference/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -=========== -SQL 手册 -=========== - -.. toctree:: - :hidden: - - sql-functions/index - sql-statements/index diff --git a/docs/documentation/cn/sql-reference/sql-functions/aggregate-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/aggregate-functions/index.rst deleted file mode 100644 index 10a1dceb92..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/aggregate-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -聚合函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-functions/bitmap-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/bitmap-functions/index.rst deleted file mode 100644 index 0a7ce165b1..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/bitmap-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -bitmap函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/index.rst deleted file mode 100644 index 9841d7ea1d..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -日期函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-functions/hash-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/hash-functions/index.rst deleted file mode 100644 index b0556ff3b2..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/hash-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -Hash函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/index.rst deleted file mode 100644 index 281d1a8bfd..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -=========== -SQL 函数 -=========== - -.. toctree:: - :glob: - - * - -.. toctree:: - :hidden: - - date-time-functions/index - spatial-functions/index - string-functions/index - aggregate-functions/index - bitmap-functions/index - hash-functions/index diff --git a/docs/documentation/cn/sql-reference/sql-functions/spatial-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/spatial-functions/index.rst deleted file mode 100644 index f09712d02b..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/spatial-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -地理位置函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-functions/string-functions/index.rst b/docs/documentation/cn/sql-reference/sql-functions/string-functions/index.rst deleted file mode 100644 index 7d372f8a93..0000000000 --- a/docs/documentation/cn/sql-reference/sql-functions/string-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -字符串函数 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Account Management/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Account Management/index.rst deleted file mode 100644 index bdb0665e65..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Account Management/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -用户账户管理 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Administration/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Administration/index.rst deleted file mode 100644 index 7695bcdccc..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Administration/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -集群管理 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Data Definition/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Data Definition/index.rst deleted file mode 100644 index 574b4b9045..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Data Definition/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -DDL -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Data Manipulation/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Data Manipulation/index.rst deleted file mode 100644 index e8298bdc23..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Data Manipulation/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -DML -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Data Types/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Data Types/index.rst deleted file mode 100644 index 1d5cacebd0..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Data Types/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -数据类型 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/Utility/index.rst b/docs/documentation/cn/sql-reference/sql-statements/Utility/index.rst deleted file mode 100644 index 9abc66d27d..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/Utility/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -辅助命令 -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/cn/sql-reference/sql-statements/index.rst b/docs/documentation/cn/sql-reference/sql-statements/index.rst deleted file mode 100644 index 5bfe1cb21b..0000000000 --- a/docs/documentation/cn/sql-reference/sql-statements/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -============ -语法帮助 -============ - -.. toctree:: - :hidden: - - Account Management/index - Administration/index - Data Definition/index - Data Manipulation/index - Data Types/index - Utility/index diff --git a/docs/documentation/en/administrator-guide/alter-table/index.rst b/docs/documentation/en/administrator-guide/alter-table/index.rst deleted file mode 100644 index f44960b4a3..0000000000 --- a/docs/documentation/en/administrator-guide/alter-table/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -Schema Change -============= - -.. toctree:: - :maxdepth: 2 - :glob: - - * diff --git a/docs/documentation/en/administrator-guide/config/index.rst b/docs/documentation/en/administrator-guide/config/index.rst deleted file mode 100644 index 9681f6000e..0000000000 --- a/docs/documentation/en/administrator-guide/config/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============== -Configuration -============== - -.. toctree:: - :maxdepth: 1 - :glob: - - * diff --git a/docs/documentation/en/administrator-guide/http-actions/index.rst b/docs/documentation/en/administrator-guide/http-actions/index.rst deleted file mode 100644 index 268e99b5a8..0000000000 --- a/docs/documentation/en/administrator-guide/http-actions/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -HTTP API -============= - -.. toctree:: - :maxdepth: 1 - :glob: - - * diff --git a/docs/documentation/en/administrator-guide/index.rst b/docs/documentation/en/administrator-guide/index.rst deleted file mode 100644 index bbb7493e07..0000000000 --- a/docs/documentation/en/administrator-guide/index.rst +++ /dev/null @@ -1,19 +0,0 @@ -======================== -Administrator Guide -======================== - -.. toctree:: - :hidden: - - load-data/index - alter-table/index - http-actions/index - operation/index - config/index - -.. toctree:: - :maxdepth: 1 - :glob: - - * - diff --git a/docs/documentation/en/administrator-guide/load-data/index.rst b/docs/documentation/en/administrator-guide/load-data/index.rst deleted file mode 100644 index eb02840886..0000000000 --- a/docs/documentation/en/administrator-guide/load-data/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -============= -Load Data -============= - -.. toctree:: - :maxdepth: 2 - - load-manual_EN.md - broker-load-manual_EN.md - stream-load-manual_EN.md - routine-load-manual_EN.md - insert-into-manual_EN.md - delete-manual_EN.md diff --git a/docs/documentation/en/administrator-guide/operation/index.rst b/docs/documentation/en/administrator-guide/operation/index.rst deleted file mode 100644 index b961f2bc1a..0000000000 --- a/docs/documentation/en/administrator-guide/operation/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -========================== -Maintainence Operation -========================== - -.. toctree:: - :maxdepth: 2 - :glob: - - * diff --git a/docs/documentation/en/community/index.rst b/docs/documentation/en/community/index.rst deleted file mode 100644 index 5ff10aa469..0000000000 --- a/docs/documentation/en/community/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -=================== -Apache Commnity -=================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/developer-guide/index.rst b/docs/documentation/en/developer-guide/index.rst deleted file mode 100644 index 1eb091a1f3..0000000000 --- a/docs/documentation/en/developer-guide/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -================ -Developer Guide -================ - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/downloads/index.rst b/docs/documentation/en/downloads/index.rst deleted file mode 100644 index 78cc4ec691..0000000000 --- a/docs/documentation/en/downloads/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -============= -Downloads -============= - -.. toctree:: - :maxdepth: 1 - :glob: - - * - diff --git a/docs/documentation/en/extending-doris/index.rst b/docs/documentation/en/extending-doris/index.rst deleted file mode 100644 index 282d125759..0000000000 --- a/docs/documentation/en/extending-doris/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -==================== -Extending Ability -==================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/getting-started/index.rst b/docs/documentation/en/getting-started/index.rst deleted file mode 100644 index c9236f6ab3..0000000000 --- a/docs/documentation/en/getting-started/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -==================== -Getting Started -==================== - -.. toctree:: - - basic-usage_EN.md - advance-usage_EN.md - best-practice_EN.md - data-partition_EN.md - data-model-rollup_EN.md - hit-the-rollup_EN.md diff --git a/docs/documentation/en/index.rst b/docs/documentation/en/index.rst deleted file mode 100644 index 8b6e2fc3a0..0000000000 --- a/docs/documentation/en/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -============= -English -============= - -English version of Doris documents are mainly translated by machine, currently. -So please help us to improve the quality of English documents. -You can simply click "Edit on Github" at right top of a page, and edit the document on Github, then make a pull request directly. - -.. toctree:: - - downloads/index - installing/index - getting-started/index - administrator-guide/index - extending-doris/index - internal/index - sql-reference/index - developer-guide/index - community/index - diff --git a/docs/documentation/en/installing/index.rst b/docs/documentation/en/installing/index.rst deleted file mode 100644 index 6296287f45..0000000000 --- a/docs/documentation/en/installing/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -=============================== -Compilation and Deployment -=============================== - -.. toctree:: - - compilation_EN.md - install-deploy_EN.md - upgrade_EN.md diff --git a/docs/documentation/en/internal/index.rst b/docs/documentation/en/internal/index.rst deleted file mode 100644 index ef52e59aee..0000000000 --- a/docs/documentation/en/internal/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -==================== -Design Documents -==================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/index.rst b/docs/documentation/en/sql-reference/index.rst deleted file mode 100644 index f00ee95615..0000000000 --- a/docs/documentation/en/sql-reference/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -SQL Manual -============= - -.. toctree:: - :hidden: - - sql-functions/index - sql-statements/index diff --git a/docs/documentation/en/sql-reference/sql-functions/aggregate-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/aggregate-functions/index.rst deleted file mode 100644 index 9cab40ca9f..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/aggregate-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -======================== -Aggregate Functions -======================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-functions/bitmap-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/bitmap-functions/index.rst deleted file mode 100644 index 23bf465363..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/bitmap-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -================ -bitmap functions -================ - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-functions/date-time-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/date-time-functions/index.rst deleted file mode 100644 index ed3e2aa867..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/date-time-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -========================= -Date Time Functions -========================= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-functions/hash-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/hash-functions/index.rst deleted file mode 100644 index 5de92cdae4..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/hash-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -======================= -Hash Functions -======================= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/index.rst deleted file mode 100644 index d41a980327..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -================== -SQL Functions -================== - -.. toctree:: - :glob: - - * - -.. toctree:: - :hidden: - - date-time-functions/index - spatial-functions/index - string-functions/index - aggregate-functions/index - bitmap-functions/index - hash-functions/index diff --git a/docs/documentation/en/sql-reference/sql-functions/spatial-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/spatial-functions/index.rst deleted file mode 100644 index f36f6cc29b..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/spatial-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -======================= -Sptial Functions -======================= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-functions/string-functions/index.rst b/docs/documentation/en/sql-reference/sql-functions/string-functions/index.rst deleted file mode 100644 index 411341eaa1..0000000000 --- a/docs/documentation/en/sql-reference/sql-functions/string-functions/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -======================= -String Functions -======================= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Account Management/index.rst b/docs/documentation/en/sql-reference/sql-statements/Account Management/index.rst deleted file mode 100644 index 68c44caa01..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Account Management/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -====================== -Account Management -====================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Administration/index.rst b/docs/documentation/en/sql-reference/sql-statements/Administration/index.rst deleted file mode 100644 index 29a3fe69ad..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Administration/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -================== -Administration -================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Data Definition/index.rst b/docs/documentation/en/sql-reference/sql-statements/Data Definition/index.rst deleted file mode 100644 index 0e100c8758..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Data Definition/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -==================== -Data Definition -==================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Data Manipulation/index.rst b/docs/documentation/en/sql-reference/sql-statements/Data Manipulation/index.rst deleted file mode 100644 index 92dd5a72ca..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Data Manipulation/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -====================== -Data Manipulation -====================== - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Data Types/index.rst b/docs/documentation/en/sql-reference/sql-statements/Data Types/index.rst deleted file mode 100644 index f2ead57ce5..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Data Types/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -Data Types -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/Utility/index.rst b/docs/documentation/en/sql-reference/sql-statements/Utility/index.rst deleted file mode 100644 index d00fb23d05..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/Utility/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -============= -Utility -============= - -.. toctree:: - :glob: - - * diff --git a/docs/documentation/en/sql-reference/sql-statements/index.rst b/docs/documentation/en/sql-reference/sql-statements/index.rst deleted file mode 100644 index b968ec022c..0000000000 --- a/docs/documentation/en/sql-reference/sql-statements/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -================== -DDL Statements -================== - -.. toctree:: - :hidden: - - Account Management/index - Administration/index - Data Definition/index - Data Manipulation/index - Data Types/index - Utility/index diff --git a/docs/en/README.md b/docs/en/README.md new file mode 100644 index 0000000000..96e654cab1 --- /dev/null +++ b/docs/en/README.md @@ -0,0 +1,8 @@ +--- +home: true +heroImage: /images/doris-logo.png +heroText: Apache Doris +tagline: MPP-based interactive SQL data warehousing for reporting and analysis. +actionText: Get Started → +actionLink: /en/installing/compilation +--- \ No newline at end of file diff --git a/docs/documentation/en/administrator-guide/alter-table/alter-table-bitmap-index_EN.md b/docs/en/administrator-guide/alter-table/alter-table-bitmap-index.md similarity index 97% rename from docs/documentation/en/administrator-guide/alter-table/alter-table-bitmap-index_EN.md rename to docs/en/administrator-guide/alter-table/alter-table-bitmap-index.md index 3fea165ee8..25d6b1f895 100644 --- a/docs/documentation/en/administrator-guide/alter-table/alter-table-bitmap-index_EN.md +++ b/docs/en/administrator-guide/alter-table/alter-table-bitmap-index.md @@ -1,3 +1,10 @@ +--- +{ + "title": "Bitmap Index", + "language": "en" +} +--- + +--> # Compaction Action diff --git a/docs/documentation/en/administrator-guide/http-actions/fe-get-log-file_EN.md b/docs/en/administrator-guide/http-actions/fe-get-log-file.md similarity index 96% rename from docs/documentation/en/administrator-guide/http-actions/fe-get-log-file_EN.md rename to docs/en/administrator-guide/http-actions/fe-get-log-file.md index c51aa1ad9a..254e2ec548 100644 --- a/docs/documentation/en/administrator-guide/http-actions/fe-get-log-file_EN.md +++ b/docs/en/administrator-guide/http-actions/fe-get-log-file.md @@ -1,3 +1,10 @@ +--- +{ + "title": "get\\_log\\_file", + "language": "en" +} +--- + +--> # SHOW TRANSACTION ## description diff --git a/docs/documentation/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD_EN.md b/docs/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD.md similarity index 92% rename from docs/documentation/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD_EN.md rename to docs/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD.md index 31105827fc..487aaaed4c 100644 --- a/docs/documentation/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD_EN.md +++ b/docs/en/sql-reference/sql-statements/Data Manipulation/STOP ROUTINE LOAD.md @@ -1,3 +1,10 @@ +--- +{ + "title": "STOP ROUTINE LOAD", + "language": "en" +} +--- + -## Philosophy +# Doris Document -**write once, use everywhere** +[Vuepress](https://github.com/vuejs/vuepress.git) is used as our document site generator, configurations are in `./docs/.vuepress` folder. -Documentations will be written once, and will be converted to other format according to different application scenarios. +## Getting Started -## Implementation +Download and install [nodejs](http://nodejs.cn/download/) +```bash +npm config set registry https://registry.npm.taobao.org // Only if you are in Mainland China. +cd docs && npm install +npm run dev ``` - +---------------+ - | Documentation | - +-------+-------+ - | - +-------+-------+ - | Doc Builder | - +-------+-------+ - | - +--------------------------------+ - | | | -+---+---+ +---+----+ +-----+----+ -| PDF | | HTML | .... | Help Doc | -+-------+ +--------+ +----------+ + +Open your browser and navigate to `localhost:8080/en/` or `localhost:8080/zh-CN/`. + +## Docs' Directories + +```bash + . + ├─ docs/ + │ ├─ .vuepress + │ │ ├─ dist // Built site files. + │ │ ├─ public // Assets + │ │ ├─ sidebar // Side bar configurations. + │ │ │ ├─ en.js + │ │ │ └─ zh-CN.js + │ ├─ theme // Global styles and customizations. + │ └─ config.js // Vuepress configurations. + ├─ zh-CN/ + │ ├─ xxxx.md + │ └─ README.md // Will be rendered as entry page. + └─ en/ + ├─ one.md + └─ README.md // Will be rendered as entry page. +``` + +## Start Writing + +1. Write markdown files in multi languages and put them in separated folders `./en/` and `./zh-CN/`. **But they should be with the same name.** + + ```bash + . + ├─ en/ + │ ├─ one.md + │ └─ two.md + └─ zh-CN/ + │ ├─ one.md + │ └─ two.md + ``` + +2. Frontmatters like below should always be on the top of each file: + + ```markdown + --- + { + "title": "Backup and Recovery", // sidebar title + "language": "en" // writing language + } + --- + ``` + +3. Assets are in `.vuepress/public/`. + + Assuming that there exists a png `.vuepress/public/images/image_x.png`, then it can be used like: + + ```markdown + ![alter text](/images/image_x.png) + ``` + +4. Remember to update the sidebar configurations in `.vuepress/sidebar/` after adding a new file or a folder. + + Assuming that the directories are: + + ```bash + . + ├─ en/ + │ ├─ subfolder + │ │ ├─ one.md + │ │ └─ two.md + │ └─ three.md + └─ zh-CN/ + ├─ subfolder + │ ├─ one.md + │ └─ two.md + └─ three.md + ``` + + Then the sidebar configurations would be like: + + ```javascript + // .vuepress/sidebar/en.js` + module.exports = [ + { + title: "subfolder name", + directoryPath: "subfolder/", + children: ["one", "two"] + }, + "three" + ] + ``` + + ```javascript + // .vuepress/sidebar/zh-CN.js + module.exports = [ + { + title: "文件夹名称", + directoryPath: "subfolder/", + children: ["one", "two"] + }, + "three" + ] + ``` + +5. Run `npm run lint` before starting a PR. + + Surely that there will be lots of error logs if the mardown files are not following the rules, and these logs will all be printed in the console: + +```shell + +en/administrator-guide/alter-table/alter-table-bitmap-index.md:92 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: " ```"] +en/administrator-guide/alter-table/alter-table-rollup.md:45 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-rollup.md:77 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-rollup.md:178 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] +en/administrator-guide/alter-table/alter-table-schema-change.md:50 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:82 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:127 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:144 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:153 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] +en/administrator-guide/alter-table/alter-table-schema-change.md:199 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] +en/administrator-guide/backup-restore.md:45:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1] +en/administrator-guide/backup-restore.md:57:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1] +en/administrator-guide/backup-restore.md:61:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 3; Style: 1/1/1] +npm ERR! code ELIFECYCLE +npm ERR! errno 1 +npm ERR! docs@ lint: `markdownlint '**/*.md' -f` +npm ERR! Exit status 1 +npm ERR! +npm ERR! Failed at the docs@ lint script. ``` -> Documentation:Text contents which is written by human. And this is the only place for documentation. -> Doc Builder: Tools that convert documentations to other format, such as PDF, HTML. There could be many tools, and we can use different tools to convert documentation to different formats. +## Deployment -## Organization +Just start a PR, and all things will be done automatically. -> `docs/documentation`: Root directory for documentation. And for different languages, there is a root directory for it. For example, `docs/documentation/cn` is the Chinese documentation's root directory. -> `docs/scripts`: Place of `Doc Builder`. -> `docs/resources`: Resources that are referenced in documentation, such as pictures. -> `docs/website`: A website for documentations built with [Sphinx](http://www.sphinx-doc.org) using a theme provided by [Read-the-Docs](https://readthedocs.org/). +## What Travis Does -## Constraints +Once a PR accepted, travis ci will be triggered to build and deploy the whole website within its own branch. Here is what `.travis.yml` does: -1. All documents are written in Markdown format, and file name is end with ".md". -2. All documents are started with level 1 title `# Title`, and should have only one level 1 title. -3. Names of file and directory are in lowercase letters, and use dashes as separator. -4. Documentation can be constructed as a directory or a single Markdown file, these two formats equal with each other in logical. Relationship is represented by parent-child directory in directory format, and by title level in file format. It is recommended to use directory format to manage a large documentation, because it is easy to maintain. -3. A directory corresponds to a title, and readme.md in this directory is its content. Other documents in this directory is its sub-sections. -4. For manual like section, such as function description, there should be `Description`, `Syntax`, `Examples` section in documents. +1. Prepare nodejs and vuepress enviorment. -## Level Directories +2. Use current branch's name as the relative url path in `.vuepress/config.js`(which is the `base` property). -1. doris-concepts -2. installing -3. getting-started -4. administrator-guide -5. sql-references -6. best-practices -7. internals -8. community +3. Build the documents into a website all by vuepress. -Each directory, or its sub directories should contain a file `index.rst`, for constructing the navibar of the website. For example: +4. Fetch asf-site repo to local directory, and copy `.vupress/dist/` into `{BRANCH}/`. -``` -documentation/ -└── cn - ├── administrator-guide - │   ├── index.rst - │   ├── http-actions - │   │   └── index.rst - │   ├── load-data - │   │   ├── index.rst - │   ├── operation - │   │   ├── index.rst - ├── extending-doris - │   ├── index.rst - └── sql-reference - ├── index.rst - │   ├── date-time-functions - │   │   ├── index.rst +5. Push the new site to asf-site repo with `GitHub Token`(which is preset in Travis console as a variable used in .travis.yml). + +## asf-site repository + +Finally the asf-site repository will be like: + +```bash +. +├─ master/ +│ ├─ en/ +│ │ ├─ subfolder +│ │ │ ├─ one.md +│ │ └─ three.md +│ └─ zh-CN/ +│ ├─ subfolder +│ │ ├─ one.md +│ └─ three.md +├─ incubating-0.11/ +│ ├─ en/ +│ │ ├─ subfolder +│ │ │ ├─ one.md +│ │ └─ three.md +│ └─ zh-CN/ +│ ├─ subfolder +│ │ ├─ one.md +│ └─ three.md +├─ index.html // user entry, and auto redirected to master folder +└─ versions.json // all versions that can be seleted on the website are defined here ``` -## Docs Styles - -There are some styles need to be followed. - -### SQL-Statement - -Docs under `documentation/cn/sql-reference/sql-statements/` must obey the following style +And the `versions.json` is like: +```json +{ + "en": [ + { + "text": "Versions", // dropdown label + "items": [ + { + "text": "master", // dropdown-item label + "link": "/../master/en/installing/compilation.html", // entry page for this version + "target": "_blank" + }, + { + "text": "branch-0.11", + "link": "/../branch-0.11/en/installing/compilation.html", + "target": "_blank" + } + ] + } + ], + "zh-CN": [ + { + "text": "版本", + "items": [ + { + "text": "master", + "link": "/../master/zh-CN/installing/compilation.html", + "target": "_blank" + }, + { + "text": "branch-0.11", + "link": "/../branch-0.11/zh-CN/installing/compilation.html", + "target": "_blank" + } + ] + } + ] +} ``` -# TITLE(capital) - -## description - - The description of this doc. The "## description" must be reserved, with a following empty line. - -## keyword - - The keyword of this doc. Usually, this can be the title of this doc. - The "## keyword" must be reserved, with a following empty line. -``` - diff --git a/docs/resources/palo_export_mind_map.svg b/docs/resources/palo_export_mind_map.svg deleted file mode 100644 index 278973a21b..0000000000 --- a/docs/resources/palo_export_mind_map.svg +++ /dev/null @@ -1 +0,0 @@ -导出导出内容全量1部分指定partition进行导出2任意sql查询结果 3导出目标存储localcloudBaidu HadoopBOSCommunity Hadoop导出后访问方式palo的外部表其它导出后数据格式csv文本压缩文件其它格式其它导出效率失败重试 \ No newline at end of file diff --git a/docs/website/Makefile b/docs/website/Makefile deleted file mode 100644 index 76d13b43b0..0000000000 --- a/docs/website/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/website/README.md b/docs/website/README.md deleted file mode 100644 index 9058cfdf00..0000000000 --- a/docs/website/README.md +++ /dev/null @@ -1,61 +0,0 @@ - - - -# Build the website for Doris documentations - -## Prerequisites - -1. Install PiPy (If not installed) - - ``` - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - python get-pip.py - ``` - -2. Install sphinx and other dependencies - - ``` - pip install sphinx # Sphinx main program - pip install recommonmark # Sphinx markdown extension - pip install sphinx-markdown-tables # Sphinx markdown table render extension - pip install jieba # Sphinx Chinese tokenizer - pip install sphinx_rtd_theme # Sphinx Read-the-Docs theme - ``` - -## Build the website - -``` -sh build_site.sh -``` - -## Start web server - -``` -cd build/html/ -nohup python -m SimpleHTTPServer & -``` - -You can start any web server you like. - -## Browse website - -``` -http://localhost:8000/ -``` diff --git a/docs/website/build_site.sh b/docs/website/build_site.sh deleted file mode 100644 index d9936e9ff7..0000000000 --- a/docs/website/build_site.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -eo pipefail - -CUR=`dirname "$0"` -CUR=`cd "$CUR"; pwd` - -export DORIS_HOME=${CUR}/../../ - -# Check args -usage() { - echo " -Usage: $0 - Optional options: - --cn build Chinese Documentation - --en build English Documentation - " - exit 1 -} - -OPTS=$(getopt \ - -n $0 \ - -o '' \ - -l 'cn' \ - -l 'en' \ - -l 'help' \ - -- "$@") - -if [ $? != 0 ] ; then - usage -fi - -eval set -- "$OPTS" - -BUILD_CN= -BUILD_EN= -HELP=0 -if [ $# == 1 ] ; then - # default - BUILD_CN=1 - BUILD_EN=0 -else - BUILD_CN=0 - BUILD_EN=0 - while true; do - case "$1" in - --cn) BUILD_CN=1 ; shift ;; - --en) BUILD_EN=1 ; shift ;; - --help) HELP=1; shift ;; - --) shift ; break ;; - *) ehco "Internal error" ; exit 1 ;; - esac - done -fi - -if [[ ${HELP} -eq 1 ]]; then - usage - exit -fi - - -rm -rf ${CUR}/source/documentation/ -rm -rf ${CUR}/source/resources/ -mkdir -p ${CUR}/source/documentation -mkdir -p ${CUR}/source/resources -cp -r ${DORIS_HOME}/docs/documentation/* ${CUR}/source/documentation/ -cp -r ${DORIS_HOME}/docs/resources/* ${CUR}/source/resources/ -make clean && make html - diff --git a/docs/website/source/_templates/footer.html b/docs/website/source/_templates/footer.html deleted file mode 100644 index 21beb5cd48..0000000000 --- a/docs/website/source/_templates/footer.html +++ /dev/null @@ -1,28 +0,0 @@ - - -{% extends '!footer.html' %} -{% block extrafooter %} -
-

-

- - Apache Doris(incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. - -

-
-{% endblock %} diff --git a/docs/website/source/conf.py b/docs/website/source/conf.py deleted file mode 100644 index 72c107cd30..0000000000 --- a/docs/website/source/conf.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Configuration file for the Sphinx documentation builder. -# -# This file does only contain a selection of the most common options. For a -# full list see the documentation: -# http://www.sphinx-doc.org/en/master/config - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -#import t3SphinxThemeRtd - -# -- Project information ----------------------------------------------------- - -project = u'Doris Documentations' -copyright = u'2019, Apache Doris(Incubating)' -author = u'Apache Doris(Incubating)' - -# The short X.Y version -version = u'0.11.0' -# The full version, including alpha/beta/rc tags -release = u'0.11.0' - - -# -- General configuration --------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'recommonmark', - 'sphinx_markdown_tables' -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -# source_suffix = '.rst' -source_suffix = { - '.rst': 'restructuredtext', - '.txt': 'markdown', - '.md': 'markdown', -} - -# The master toctree document. -master_doc = 'index' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = None - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" -#html_theme = "t3SphinxThemeRtd" -#html_theme_path = [t3SphinxThemeRtd.get_html_theme_path()] - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', -# 'searchbox.html']``. -# -# html_sidebars = {} - - -# -- Options for HTMLHelp output --------------------------------------------- - -# Output file base name for HTML help builder. -htmlhelp_basename = 'dorisdoc' - - -# -- Options for LaTeX output ------------------------------------------------ - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'doris.tex', u'Doris Documentation', - u'Apache Doris(Incubating)', 'manual'), -] - - -# -- Options for manual page output ------------------------------------------ - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'Doris', u'Doris Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ---------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'Doris', u'Doris Documentation', - author, 'Apache Doris(Incubating)', 'An MPP-based interactive SQL data warehouse for reporting and analysis', - 'Miscellaneous'), -] - - -# -- Options for Epub output ------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - -html_search_language = 'zh' - -html_context = { - # Enable the "Edit in GitHub link within the header of each page. - 'display_github': True, - # Set the following variables to generate the resulting github URL for each page. - # Format Template: https://{{ github_host|default("github.com") }}/{{ github_user }} - #/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }} - 'github_user': 'apache', - 'github_repo': 'incubator-doris', - 'github_version': 'master' , - 'conf_py_path' : '/docs/', -} - -# -- Extension configuration ------------------------------------------------- diff --git a/docs/website/source/index.rst b/docs/website/source/index.rst deleted file mode 100644 index 16bbc299d7..0000000000 --- a/docs/website/source/index.rst +++ /dev/null @@ -1,590 +0,0 @@ -Introduction to Apache Doris (incubating) -========================================= - -Apache Doris is an MPP-based interactive SQL data warehousing for -reporting and analysis. Doris mainly integrates the technology of Google -Mesa and Apache Impala. Unlike other popular SQL-on-Hadoop systems, -Doris is designed to be a simple and single tightly coupled system, not -depending on other systems. Doris not only provides high concurrent low -latency point query performance, but also provides high throughput -queries of ad-hoc analysis. Doris not only provides batch data loading, -but also provides near real-time mini-batch data loading. Doris also -provides high availability, reliability, fault tolerance, and -scalability. The simplicity (of developing, deploying and using) and -meeting many data serving requirements in single system are the main -features of Doris. - -1. Background -------------- - -In Baidu, the largest Chinese search engine, we run a two-tiered data -warehousing system for data processing, reporting and analysis. Similar -to lambda architecture, the whole data warehouse comprises data -processing and data serving. Data processing does the heavy lifting of -big data: cleaning data, merging and transforming it, analyzing it and -preparing it for use by end user queries; data serving is designed to -serve queries against that data for different use cases. Currently data -processing includes batch data processing and stream data processing -technology, like Hadoop, Spark and Storm; Doris is a SQL data warehouse -for serving online and interactive data reporting and analysis querying. - -Prior to Doris, different tools were deployed to solve diverse -requirements in many ways. For example, the advertising platform needs -to provide some detailed statistics associated with each served ad for -every advertiser. The platform must support continuous updates, both new -rows and incremental updates to existing rows within minutes. It must -support latency-sensitive users serving live customer reports with very -low latency requirements and batch ad-hoc multiple dimensions data -analysis requiring very high throughput. In the past,this platform was -built on top of sharded MySQL. But with the growth of data, MySQL cannot -meet the requirements. Then, based on our existing KV system, we -developed our own proprietary distributed statistical database. But, the -simple KV storage was not efficient on scan performance. Because the -system depends on many other systems, it is very complex to operate and -maintain. Using RPC API, more complex querying usually required code -programming, but users wants an MPP SQL engine. In addition to -advertising system, a large number of internal BI Reporting / Analysis, -also used a variety of tools. Some used the combination of SparkSQL / -Impala + HDFS / HBASE. Some used MySQL to store the results that were -prepared by distributed MapReduce computing. Some also bought commercial -databases to use. - -However, when a use case requires the simultaneous availability of -capabilities that cannot all be provided by a single tool, users were -forced to build hybrid architectures that stitch multiple tools -together. Users often choose to ingest and update data in one storage -system, but later reorganize this data to optimize for an analytical -reporting use-case served from another. Our users had been successfully -deploying and maintaining these hybrid architectures, but we believe -that they shouldn’t need to accept their inherent complexity. A storage -system built to provide great performance across a broad range of -workloads provides a more elegant solution to the problems that hybrid -architectures aim to solve. Doris is the solution. Doris is designed to -be a simple and single tightly coupled system, not depending on other -systems. Doris provides high concurrent low latency point query -performance, but also provides high throughput queries of ad-hoc -analysis. Doris provides bulk-batch data loading, but also provides near -real-time mini-batch data loading. Doris also provides high -availability, reliability, fault tolerance, and scalability. - -Generally speaking, Doris is the technology combination of Google Mesa -and Apache Impala. Mesa is a highly scalable analytic data storage -system that stores critical measurement data related to Google’s -Internet advertising business. Mesa is designed to satisfy complex and -challenging set of users’ and systems’ requirements, including near -real-time data ingestion and query ability, as well as high -availability, reliability, fault tolerance, and scalability for large -data and query volumes. Impala is a modern, open-source MPP SQL engine -architected from the ground up for the Hadoop data processing -environment. At present, by virtue of its superior performance and rich -functionality, Impala has been comparable to many commercial MPP -database query engine. Mesa can satisfy the needs of many of our storage -requirements, however Mesa itself does not provide a SQL query engine; -Impala is a very good MPP SQL query engine, but the lack of a perfect -distributed storage engine. So in the end we chose the combination of -these two technologies. - -Learning from Mesa’s data model, we developed a distributed storage -engine. Unlike Mesa, this storage engine does not rely on any -distributed file system. Then we deeply integrate this storage engine -with Impala query engine. Query compiling, query execution coordination -and catalog management of storage engine are integrated to be frontend -daemon; query execution and data storage are integrated to be backend -daemon. With this integration, we implemented a single, full-featured, -high performance state the art of MPP database, as well as maintaining -the simplicity. - -2. System Overview ------------------- - -Doris’ implementation consists of two daemons: frontend (FE) and backend -(BE). The following figures gives the overview of architecture and -usage. - -.. figure:: https://raw.githubusercontent.com/apache/incubator-doris/master/docs/resources/images/palo_architecture.jpg - :alt: Doris Architecture - - Doris Architecture - -Frontend daemon consists of query coordinator and catalog manager. Query -coordinator is responsible for receiving user’s sql queries, compiling -queries and managing queries execution. Catalog manager is responsible -for managing metadata such as databases, tables, partitions, replicas -and etc. Several frontend daemons could be deployed to guarantee -fault-tolerance, and load balancing. - -Backend daemon stores the data and executes the query fragments. Many -backend daemons could also be deployed to provide scalability and -fault-tolerance. - -A typical Doris cluster generally composes of several frontend daemons -and dozens to hundreds of backend daemons. - -Clients can use MySQL-related tools to connect any frontend daemon to -submit SQL query. The frontend receives the query and compiles it into -query plans executable by the backends. Then frontend sends the query -plan fragments to backend. Backends will build a query execution DAG. -Data is fetched and pipelined into the DAG. The final result response is -sent to client via frontend. The distribution of query fragment -execution takes minimizing data movement and maximizing scan locality as -the main goal. Because Doris is designed to provide interactive -analysis, so the average execution time of queries is short. Considering -this, we adopt query re-execution to meet the fault tolerance of query -execution. - -A table is splitted into many tablets. Tablets are managed by backends. -The backend daemon could be configured to use multiple directories. Any -directory’s IO failure doesn’t influence the normal running of backend -daemon. Doris will recover and rebalance the whole cluster automatically -when necessary. - -3. Frontend ------------ - -In-memory catalog, multiple frontends, MySQL networking protocol, -consistency guarantee, and two-level table partitioning are the main -features of Doris’ frontend design. - -3.1 In-Memory Catalog -~~~~~~~~~~~~~~~~~~~~~ - -Traditional data warehouse always uses a RDBMS database to store their -catalog metadata. In order to produce query execution plan, frontend -needs to look up the catalog metadata. This kind of catalog storage may -be enough for low concurrent ad-hoc analysis queries. But for online -high concurrent queries, its performance is very bad,resulting in -increased response latency. For example, Hive metadata query latency is -sometimes up to tens of seconds or even minutes. In order to speedup the -metadata access, we adopt the in-memory catalog storage. - -.. figure:: ./resources/images/log_replication.jpg - :alt: log replication - - log replication - -In-memory catalog storage has three functional modules: real-time memory -data structures, memory checkpoints on local disk and an operation relay -log. When modifying catalog, the mutation operation is written into the -log file firstly. Then, the mutation operation is applied into the -memory data structures. Periodically, a thread does the checkpoint that -dumps memory data structure image into local disk. Checkpoint mechanism -enables the fast startup of frontend and reduces the disk storage -occupancy. Actually, in-memory catalog also simplifies the -implementation of multiple frontends. - -3.2 Multiple Frontends -~~~~~~~~~~~~~~~~~~~~~~ - -Many data warehouses only support single frontend-like node. There are -some systems supporting master and slave deploying. But for online data -serving, high availability is an essential feature. Further, the number -of queries per seconds may be very large, so high scalability is also -needed. In Doris, we provide the feature of multiple frontends using -replicated-state-machine technology. - -Frontends can be configured to three kinds of roles: leader, follower -and observer. Through a voting protocol, follower frontends firstly -elect a leader frontend. All the write requests of metadata are -forwarded to the leader, then the leader writes the operation into the -replicated log file. If the new log entry will be replicated to at least -quorum followers successfully, the leader commits the operation into -memory, and responses the write request. Followers always replay the -replicated logs to apply them into their memory metadata. If the leader -crashes, a new leader will be elected from the leftover followers. -Leader and follower mainly solve the problem of write availability and -partly solve the problem of read scalability. - -Usually one leader frontend and several follower frontends can meet most -applications’ write availability and read scalability requirements. For -very high concurrent reading, continuing to increase the number of -followers is not a good practice. Leader replicates log stream to -followers synchronously, so adding more followers will increases write -latency. Like Zookeeper,we have introduced a new type of frontend node -called observer that helps addressing this problem and further improving -metadata read scalability. Leader replicates log stream to observers -asynchronously. Observers don’t involve leader election. - -The replicated-state-machine is implemented based on BerkeleyDB java -version (BDB-JE). BDB-JE has achieved high availability by implementing -a Paxos-like consensus algorithm. We use BDB-JE to implement Doris’ log -replication and leader election. - -3.3 Consistency Guarantee -~~~~~~~~~~~~~~~~~~~~~~~~~ - -If a client process connects to the leader, it will see up-to-date -metadata, so that strong consistency semantics is guaranteed. If the -client connects to followers or observers, it will see metadata lagging -a little behind of the leader, but the monotonic consistency is -guaranteed. In most Doris’ use cases, monotonic consistency is accepted. - -If the client always connects to the same frontend, monotonic -consistency semantics is obviously guaranteed; however if the client -connects to other frontends due to failover, the semantics may be -violated. Doris provides a SYNC command to guarantee metadata monotonic -consistency semantics during failover. When failover happens, the client -can send a SYNC command to the new connected frontend, who will get the -latest operation log number from the leader. The SYNC command will not -return to client as long as local applied log number is still less than -fetched operation log number. This mechanism can guarantee the metadata -on the connected frontend is newer than the client have seen during its -last connection. - -3.4 MySQL Networking Protocol -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MySQL compatible networking protocol is implemented in Doris’ frontend. -Firstly, SQL interface is preferred for engineers; Secondly, -compatibility with MySQL protocol makes the integrating with current -existing BI software, such as Tableau, easier; Lastly, rich MySQL client -libraries and tools reduce our development costs, but also reduces the -user’s using cost. - -Through the SQL interface, administrator can adjust system -configuration, add and remove frontend nodes or backend nodes, and -create new database for user; user can create tables, load data, and -submit SQL query. - -Online help document and Linux Proc-like mechanism are also supported in -SQL. Users can submit queries to get the help of related SQL statements -or show Doris’ internal running state. - -In frontend, a small response buffer is allocated to every MySQL -connection. The maximum size of this buffer is limited to 1MB. The -buffer is responsible for buffering the query response data. Only if the -response is finished or the buffer size reaches the 1MB,the response -data will begin to be sent to client. Through this small trick, frontend -can re-execution most of queries if errors occurred during query -execution. - -3.5 Two-Level Partitioning -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Like most of the distributed database system, data in Doris is -horizontally partitioned. However, a single-level partitioning rule -(hash partitioning or range partitioning) may not be a good solution to -all scenarios. For example, there have a user-based fact table that -stores rows of the form (date, userid, metric). Choosing only hash -partitioning by column userid may lead to uneven distribution of data, -when one user’s data is very large. If choosing range partitioning -according to column date, it will also lead to uneven distribution of -data due to the likely data explosion in a certain period of time. - -Therefore we support the two-level partitioning rule. The first level is -range partitioning. User can specify a column (usually the time series -column) range of values for the data partition. In one partition, the -user can also specify one or more columns and a number of buckets to do -the hash partitioning. User can combine with different partitioning -rules to better divide the data. Figure 4 gives an example of two-level -partitioning. - -Three benefits are gained by using the two-level partitioning mechanism. -Firstly, old and new data could be separated, and stored on different -storage mediums; Secondly, storage engine of backend can reduce the -consumption of IO and CPU for unnecessary data merging, because the data -in some partitions is no longer be updated; Lastly,every partition’s -buckets number can be different and adjusted according to the change of -data size. - -.. code:: sql - - -- Create partitions using CREATE TABLE -- - CREATE TABLE example_tbl ( - `date` DATE, - userid BIGINT, - metric BIGINT SUM - ) PARTITION BY RANGE (`date`) ( - PARTITION p201601 VALUES LESS THAN ("2016-02-01"), - PARTITION p201602 VALUES LESS THAN ("2016-03-01"), - PARTITION p201603 VALUES LESS THAN ("2016-04-01"), - PARTITION p201604 VALUES LESS THAN ("2016-05-01") - ) DISTRIBUTED BY HASH(userid) BUCKETS 32; - - -- Add partition using ALTER TABLE -- - ALTER TABLE example_tbl ADD PARTITION p201605 VALUES LESS THAN ("2016-06-01"); - -4. Backend ----------- - -4.1 Data Storage Model -~~~~~~~~~~~~~~~~~~~~~~ - -Doris combines Google Mesa’s data model and ORCFile / Parquet storage -technology. - -Data in Mesa is inherently multi-dimensional fact table. These facts in -table typically consist of two types of attributes: dimensional -attributes (which we call keys) and measure attributes (which we call -values). The table schema also specifies the aggregation function F: V -×V → V which is used to aggregate the values corresponding to the same -key. To achieve high update throughput, Mesa loads data in batch. Each -batch of data will be converted to a delta file. Mesa uses MVCC approach -to manage these delta files, and so to enforce update atomicity. Mesa -also supports creating materialized rollups, which contain a column -subset of schema to gain better aggregation effect. - -Mesa’s data model performs well in many interactive data service, but it -also has some drawbacks: 1. Users have difficulty in understanding key -and value space, as well as aggregation function, especially when they -rarely have such aggregation demand in analysis query scenarios. - -2. In order to ensure the aggregation semantic, count operation on a - single column must read all columns in key space, resulting in a - large number of additional read overheads. There is also unable to - push down the predicates on the value column to storage engine, which - also leads to additional read overheads. - -3. Essentially, it is still a key-value model. In order to aggregate the - values corresponding to the same key, all key columns must store in - order. When a table contains hundreds of columns, sorting cost - becomes the bottleneck of ETL process. - -To solve these problems, we introduce ORCFile / Parquet technology -widely used in the open source community, such as MapReduce + ORCFile, -SparkSQL + Parquet, mainly used for ad-hoc analysis of large amounts of -data with low concurrency. These data does not distinguish between key -and value. In addition, compared with the row-oriented database, -column-oriented organization is more efficient when an aggregate needs -to be computed over many rows but only for a small subset of all columns -of data, because reading that smaller subset of data can be faster than -reading all data. And columnar storage is also space-friendly due to the -high compression ratio of each column. Further, column support -block-level storage technology such as min/max index and bloom filter -index. Query executor can filter out a lot of blocks that do not meet -the predicate, to further improve the query performance. However, due to -the underlying storage does not require data order, query time -complexity is linear corresponding to the data volume. - -Like traditional databases, Doris stores structured data represented as -tables. Each table has a well-defined schema consisting of a finite -number of columns. We combine Mesa data model and ORCFile/Parquet -technology to develop a distributed analytical database. User can create -two types of table to meet different needs in interactive query -scenarios. - -In non-aggregation type of table, columns are not distinguished between -dimensions and metrics, but should specify the sort columns in order to -sort all rows. Doris will sort the table data according to the sort -columns without any aggregation. The following figure gives an example -of creating non-aggregation table. - -.. code:: sql - - -- Create non-aggregation table -- - CREATE TABLE example_tbl ( - `date` DATE, - id BIGINT, - country VARCHAR(32), - click BIGINT, - cost BIGINT - ) DUPLICATE KEY(`date`, id, country) - DISTRIBUTED BY HASH(id) BUCKETS 32; - -In aggregation data analysis case, we reference Mesa’s data model, and -distinguish columns between key and value, and specify the value columns -with aggregation method, such as SUM, REPLACE, etc. In the following -figure, we create an aggregation table like the non-aggregation table, -including two SUM aggregation columns (clicks, cost). Different from the -non-aggregation table, data in the table needs to be sorted on all key -columns for delta compaction and value aggregation. - -.. code:: sql - - -- Create aggregation table -- - CREATE TABLE example_tbl ( - `date` DATE, - id BIGINT, - country VARCHAR(32), - click BIGINT SUM, - cost BIGINT SUM - ) DISTRIBUTED BY HASH(id) BUCKETS 32; - -Rollup is a materialized view that contains a column subset of schema in -Doris. A table may contain multiple rollups with columns in different -order. According to sort key index and column covering of the rollups, -Doris can select the best rollup for different query. Because most -rollups only contain a few columns, the size of aggregated data is -typically much smaller and query performance can greatly be improved. -All the rollups in the same table are updated atomically. Because -rollups are materialized, users should make a trade-off between query -latency and storage space when using them. - -To achieve high update throughput, Doris only applies updates in batches -at the smallest frequency of every minute. Each update batch specifies -an increased version number and generates a delta data file, commits the -version when updates of quorum replicas are complete. You can query all -committed data using the committed version, and the uncommitted version -would not be used in query. All update versions are strictly be in -increasing order. If an update contains more than one table, the -versions of these tables are committed atomically. The MVCC mechanism -allows Doris to guarantee multiple table atomic updates and query -consistency. In addition, Doris uses compaction policies to merge delta -files to reduce delta number, also reduce the cost of delta merging -during query for higher performance. - -Doris’ data file is stored by column. The rows are stored in sorted -order by the sort columns in delta data files, and are organized into -row blocks, each block is compressed by type-specific columnar -encodings, such as run-length encoding for integer columns, then stored -into separate streams. In order to improve the performance of queries -that have a specific key, we also store a sparse sort key index file -corresponding to each delta data file. An index entry contains the short -key for the row block, which is a fixed size prefix of the first sort -columns for the row block, and the block id in the data file. Index -files are usually directly loaded into memory, as they are very small. -The algorithm for querying a specific key includes two steps. First, use -a binary search on the sort key index to find blocks that may contain -the specific key, and then perform a binary search on the compressed -blocks in the data files to find the desired key. We also store -block-level min/max index into separate index streams, and queries can -use this to filter undesired blocks. In addition to those basic columnar -features, we also offers an optional block-level bloom filter index for -queries with IN or EQUAL conditions to further filter undesired blocks. -Bloom filter index is stored in a separate stream, and is loaded on -demand. - -4.2 Data Loading -~~~~~~~~~~~~~~~~ - -Doris applies updates in batches. Three types of data loading are -supported: Hadoop-batch loading, loading ,mini-batch loading. - -1. Hadoop-batch loading. When a large amount of data volume needs to be - loaded into Doris, the hadoop-batch loading is recommended to achieve - high loading throughput. The data batches themselves are produced by - an external Hadoop system, typically at a frequency of every few - minutes. Unlike traditional data warehouses that use their own - computing resource to do the heavy data preparation, Doris could use - Hadoop to prepare the data (shuffle, sort and aggregate, etc.). By - using this approach, the most time-consuming computations are handed - over to Hadoop to complete. This will not only improve computational - efficiency, but also reduce the performance pressure of Doris cluster - and ensure the stability of the query service. The stability of the - online data services is the most important point. - -2. Loading. After deploying the fs-brokers, you can use Doris’ query - engine to import data. This type of loading is recommended for - incremental data loading. - -3. Mini-batch loading. When a small amount of data needs to be loaded - into Doris, the mini-batch loading is recommended to achieve low - loading latency. By using http interface, raw data is pushed into a - backend. Then the backend does the data preparing computing and - completes the final loading. Http tools could connect frontend or - backend. If frontend is connected, it will redirect the request - randomly to a backend. - -All the loading work is handled asynchronously. When load request is -submitted, a label needs to be provided. By using the load label, users -can submit show load request to get the loading status or submit cancel -load request to cancel the loading. If the status of loading task is -successful or in progress, its load label is not allowed to reuse again. -The label of failed task is allowed to be reused. - -4.3 Resource Isolation -~~~~~~~~~~~~~~~~~~~~~~ - -1. Multi-tenancy Isolation:Multiple virtual cluster can be created in - one pysical Doris cluster. Every backend node can deploy multiple - backend processes. Every backend process only belongs to one virtual - cluster. Virtual cluster is one tenancy. - -2. User Isolation: There are many users in one virtual cluster. You can - allocate the resource among different users and ensure that all - users’ tasks are executed under limited resource quota. - -3. Priority Isolation: There are three priorities isolation group for - one user. User could control resource allocated to different tasks - submitted by themselves, for example user’s query task and loading - tasks require different resource quota. - -4.4 Multi-Medium Storage -~~~~~~~~~~~~~~~~~~~~~~~~ - -Most machines in modern datacenter are equipped with both SSDs and HDDs. -SSD has good random read capability that is the ideal medium for query -that needs a large number of random read operations. However, SSD’s -capacity is small and is very expensive, we could not deploy it at a -large scale. HDD is cheap and has huge capacity that is suitable to -store large scale data but with high read latency. In OLAP scenario, we -find user usually submit a lot of queries to query the latest data (hot -data) and expect low latency. User occasionally executes query on -historical data (cold data). This kind of query usually needs to scan -large scale of data and is high latency. Multi-Medium Storage allows -users to manage the storage medium of the data to meet different query -scenarios and reduce the latency. For example, user could put latest -data on SSD and historical data which is not used frequently on HDD, -user will get low latency when querying latest data while get high -latency when query historical data which is normal because it needs scan -large scale data. - -In the following figure, user alters partition ‘p201601’ storage_medium -to SSD and storage_cooldown_time to ‘2016-07-01 00:00:00’. The setting -means data in this partition will be put on SSD and it will start to -migrate to HDD after the time of storage_cooldown_time. - -.. code:: sql - - ALTER TABLE example_tbl MODIFY PARTITION p201601 - SET ("storage_medium" = "SSD", "storage_cooldown_time" = "2016-07-01 00:00:00"); - -4.5 Vectorized Query Execution -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Runtime code generation using LLVM is one of the techniques employed -extensively by Impala to improve query execution times. Performance -could gains of 5X or more are typical for representative workloads. - -But, runtime code generation is not suitable for low latency query, -because the generation overhead costs about 100ms. Runtime code -generation is more suitable for large-scale ad-hoc query. To accelerate -the small queries (of course, big queries will also obtain benefits), we -introduced vectorized query execution into Doris. - -Vectorized query execution is a feature that greatly reduces the CPU -usage for typical query operations like scans, filters, aggregates, and -joins. A standard query execution system processes one row at a time. -This involves long code paths and significant metadata interpretation in -the inner loop of execution. Vectorized query execution streamlines -operations by processing a block of many rows at a time. Within the -block, each column is stored as a vector (an array of a primitive data -type). Simple operations like arithmetic and comparisons are done by -quickly iterating through the vectors in a tight loop, with no or very -few function calls or conditional branches inside the loop. These loops -compile in a streamlined way that uses relatively few instructions and -finishes each instruction in fewer clock cycles, on average, by -effectively using the processor pipeline and cache memory. - -The result of benchmark shows 2x~4x speedup in our typical queries. - -5. Backup and Recovery ----------------------- - -Data backup function is provided to enhance data security. The minimum -granularity of backup and recovery is partition. Users can develop -plugins to backup data to any specified remote storage. The backup data -can always be recovered to Doris at all time, to achieve the data -rollback purpose. - -Currently we only support full data backup data rather than incremental -backups for the following reasons: - -1. Remote storage system is beyond the control of the Doris system. We - cannot guarantee whether the data has been changed between two backup - operations. And data verification operations always come at a high - price. - -2. We support data backup on partition granularity. And majority of - applications are time series applications. By dividing data using - time column, it has been able to meet the needs of the vast majority - of incremental backup in chronological order. - -In addition to improving data security, the backup function also -provides a way to export the data. Data can be exported to other -downstream systems for further processing. - -.. toctree:: - :hidden: - - documentation/cn/index - documentation/en/index diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md new file mode 100644 index 0000000000..4910446048 --- /dev/null +++ b/docs/zh-CN/README.md @@ -0,0 +1,8 @@ +--- +home: true +heroImage: /images/doris-logo.png +heroText: Apache Doris +tagline: 基于 MPP 的交互式 SQL 数据仓库,主要用于解决报表和多维分析。 +actionText: 快速上手 → +actionLink: /zh-CN/installing/compilation +--- diff --git a/docs/documentation/cn/administrator-guide/alter-table/alter-table-bitmap-index.md b/docs/zh-CN/administrator-guide/alter-table/alter-table-bitmap-index.md similarity index 97% rename from docs/documentation/cn/administrator-guide/alter-table/alter-table-bitmap-index.md rename to docs/zh-CN/administrator-guide/alter-table/alter-table-bitmap-index.md index a2a1ef0579..0a768a9971 100644 --- a/docs/documentation/cn/administrator-guide/alter-table/alter-table-bitmap-index.md +++ b/docs/zh-CN/administrator-guide/alter-table/alter-table-bitmap-index.md @@ -1,3 +1,10 @@ +--- +{ + "title": "Bitmap 索引", + "language": "zh-CN" +} +--- +