Revert "render download pages from json files (#177)"
This reverts commit 7b11f489e1ec2c4bc9f64ad1f51d25085f38873d.
diff --git a/download.json b/download.json
deleted file mode 100644
index 216d1ee..0000000
--- a/download.json
+++ /dev/null
@@ -1,335 +0,0 @@
-{
- "latestVersion": "1.2.0",
- "versions": [
- "1.2.0",
- "1.1.4"
- ],
- "cpus": [
- {
- "label": "X64 ( avx2 )",
- "value": "intel-avx2"
- },
- {
- "label": "X64 ( no avx2 )",
- "value": "intel-noavx2"
- },
- {
- "label": "ARM64",
- "value": "arm"
- }
- ],
- "downloadLinks": [
- {
- "id": "1.2.0-intel-avx2",
- "items": [
- {
- "label": "apache-doris-fe-1.2.0-bin.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-be-1.2.0-bin-x86_64.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.sha512"
- }
- }
- ]
- },
- {
- "id": "1.2.0-intel-noavx2",
- "items": [
- {
- "label": "apache-doris-fe-1.2.0-bin.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.sha512"
- }
- }
- ]
- },
- {
- "id": "1.2.0-arm",
- "items": [
- {
- "label": "apache-doris-fe-1.2.0-bin-arm.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-be-1.2.0-bin-arm.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz.sha512"
- }
- },
- {
- "label": "apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz",
- "links": {
- "source": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz",
- "signature": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz.asc",
- "sha512": "doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz.sha512"
- }
- }
- ]
- },
- {
- "id": "1.1.4-intel-avx2",
- "items": [
- {
- "label": "apache-doris-fe-1.1.4-bin.tar.gz",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512"
- }
- },
- {
- "label": "apache-doris-be-1.1.4-bin-x86_64.tar.gz",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz.sha512"
- }
- }
- ]
- },
- {
- "id": "1.1.4-intel-noavx2",
- "items": [
- {
- "label": "apache-doris-fe-1.1.4-bin.tar.gz",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512"
- }
- },
- {
- "label": "apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz.sha512"
- }
- }
- ]
- },
- {
- "id": "1.1.4-arm",
- "items": [
- {
- "label": "apache-doris-fe-1.1.4-bin.tar.gz",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512"
- }
- },
- {
- "label": "apache-doris-1.1.4-bin-arm.tar.gz ",
- "links": {
- "source": "doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz",
- "signature": "doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz.asc",
- "sha512": "doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz.sha512"
- }
- }
- ]
- }
- ],
- "downloadNotices": [
- {
- "version": [
- "1.2.0"
- ],
- "notice": {
- "zh": "由于 Apache 服务器文件大小限制,1.2版本的二进制程序被分为三个包,其中新增的apache-doris-java-udf-jar-with-dependencies 用于支持 JDBC 外表和 JAVA UDF ,下载后需要将其中放到<code>be/lib</code>目录下。详细升级注意事项请参考<a href='docs/dev/releasenotes/release-1.2.0'>1.2.0 Release Note</a>以及<a href='docs/dev/install/install-deploy'>安装部署</a>以及<a href='docs/dev/admin-manual/cluster-management/upgrade'>集群升级</a>手册。",
- "en": "Due to file size limitations, the binary for version 1.2.0 is divided into three packages. The `apache-doris-java-udf-jar-with-dependencies` package is used to support the new JDBC expansion table and JAVA UDF. After downloading, you need to put the`java-udf-jar-with-dependencies.jar` in the <code>be/lib</code>directory to start BE, otherwise it will not start successfully."
- }
- },
- {
- "version": [
- "1.2.0"
- ],
- "notice": {
- "zh": "1.2.0 版本暂不支持使用 JDK11 运行,会在后续版本修复。",
- "en": "Version 1.2.0 does not support running with JDK11, and it will be fixed in a later version."
- }
- },
- {
- "version": [
- "1.2.0",
- "1.1.4"
- ],
- "notice": {
- "zh": "如果 CPU 不支持 avx2 指令集,请选择 noavx2 版本,您可以通过 <code>cat /proc/cpuinfo</code> 查看 CPU 是否支持。avx2 指令将会提升 Bloom Filter 等数据结构的计算效率。",
- "en": "If the CPU does not support the avx2 instruction set, select the no avx2 version. You can check whether it is supported by <code>cat /proc/cpuinfo</code>. The avx2 instruction will improve the computational efficiency of data structures such as bloom filter."
- }
- }
- ],
- "allReleases": [
- {
- "version": "1.2.0",
- "date": "2022-12-07",
- "note": "/docs/dev/releasenotes/release-1.2.0",
- "download": "doris/1.2/1.2.0-rc04/"
- },
- {
- "version": "1.1.4",
- "date": "2022-11-11",
- "note": "/docs/dev/releasenotes/release-1.1.4",
- "download": "doris/1.1/1.1.4-rc01/"
- },
- {
- "version": "1.1.3",
- "date": "2022-10-17",
- "note": "/docs/dev/releasenotes/release-1.1.3",
- "download": "doris/1.1/1.1.3-rc02/"
- },
- {
- "version": "1.1.2",
- "date": "2022-09-13",
- "note": "/docs/dev/releasenotes/release-1.1.2",
- "download": "doris/1.1/1.1.2-rc05/"
- },
- {
- "version": "1.1.1",
- "date": "2022-07-29",
- "note": "/docs/dev/releasenotes/release-1.1.1",
- "download": "doris/1.1/1.1.1-rc03/"
- },
- {
- "version": "1.1.0",
- "date": "2022-07-14",
- "note": "/docs/dev/releasenotes/release-1.1.0",
- "download": "doris/1.1/1.1.0-rc05/"
- },
- {
- "version": "0.15.0",
- "date": "2021-11-29",
- "note": "https://github.com/apache/doris/issues/6806",
- "download": "doris/0.15.0-incubating/"
- },
- {
- "version": "0.14.0",
- "date": "2021-05-26",
- "note": "https://github.com/apache/doris/issues/5374",
- "download": "doris/0.14.0-incubating/"
- },
- {
- "version": "0.13.0",
- "date": "2020-10-24",
- "note": "https://github.com/apache/doris/issues/4370",
- "download": "doris/0.13.0-incubating/"
- }
- ],
- "flinkConnectors": [
- {
- "version": "1.3.0",
- "date": "2022-12-07",
- "flink": "1.16",
- "scala": "2.12, 2.11",
- "doris": "1.0+",
- "download": "doris/flink-connector/1.3.0/",
- "github": "https://github.com/apache/doris-flink-connector"
- },
- {
- "version": "1.2.1",
- "date": "2022-12-07",
- "flink": "1.15",
- "scala": "2.12, 2.11",
- "doris": "1.0+",
- "download": "doris/flink-connector/1.2.1/",
- "github": "https://github.com/apache/doris-flink-connector"
- },
- {
- "version": "1.1.1",
- "date": "2021-12-07",
- "flink": "1.14",
- "scala": "2.12, 2.11",
- "doris": "1.0+",
- "download": "doris/flink-connector/1.1.1/",
- "github": "https://github.com/apache/doris-flink-connector"
- },
- {
- "version": "1.2.0",
- "date": "2022-08-15",
- "flink": "1.15",
- "scala": "2.12, 2.11",
- "doris": "1.0+",
- "download": "doris/flink-connector/1.2.0/",
- "github": "https://github.com/apache/doris-flink-connector"
- },
- {
- "version": "1.1.0",
- "date": "2022-07-11",
- "flink": "1.14",
- "scala": "2.12, 2.11",
- "doris": "0.15+",
- "download": "doris/flink-connector/1.1.0/",
- "github": "https://github.com/apache/doris-flink-connector"
- },
- {
- "version": "1.0.3",
- "date": "2021-03-18",
- "flink": "1.14, 1.13, 1.12, 1.11",
- "scala": "2.12, 2.11",
- "doris": "0.15+",
- "download": "doris/flink-connector/1.0.3/",
- "github": "https://github.com/apache/doris-flink-connector"
- }
- ],
- "sparkConnectors": [
- {
- "version": "1.1.0",
- "date": "2022-07-11",
- "spark": "3.2, 3.1, 2.3",
- "scala": "2.12, 2.11",
- "doris": "0.15+",
- "download": "doris/spark-connector/1.1.0/",
- "github": "https://github.com/apache/doris-spark-connector"
- },
- {
- "version": "1.0.1",
- "date": "2021-03-18",
- "spark": "3.1, 2.3",
- "scala": "2.12, 2.11",
- "doris": "0.15+",
- "download": "doris/spark-connector/1.0.1/",
- "github": "https://github.com/apache/doris-spark-connector"
- }
- ]
-}
\ No newline at end of file
diff --git a/src/constant/download.data.ts b/src/constant/download.data.ts
index dbcdaa6..5da29f3 100644
--- a/src/constant/download.data.ts
+++ b/src/constant/download.data.ts
@@ -11,17 +11,317 @@
items: item[];
}
-export const APACHE_LINK = 'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=';
-export const CHINA_MIRROR_LINK = 'https://mirrors.tuna.tsinghua.edu.cn/apache/';
+const APACHE_LINK = 'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=';
+const CHINA_MIRROR_LINK = 'https://mirrors.tuna.tsinghua.edu.cn/apache/';
-export const FLINK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
-export const CHINA_FLINK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
+const FLINK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
+const CHINA_FLINK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
-export const SPARK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
-export const CHINA_SPARK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
+const SPARK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
+const CHINA_SPARK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
-export const ALL_RELEASE_LINK = 'https://archive.apache.org/dist/';
-export const CHINA_ALL_RELEASE_MIRROR_LINK = 'https://mirrors.tuna.tsinghua.edu.cn/apache/';
+const ALL_RELEASE_LINK = 'https://archive.apache.org/dist/';
+const CHINA_ALL_RELEASE_MIRROR_LINK = 'https://mirrors.tuna.tsinghua.edu.cn/apache/';
+
+export function getAllDownloadLinks(locale: string) {
+ const sources = locale.toLocaleUpperCase() === 'EN' ? APACHE_LINK : CHINA_MIRROR_LINK;
+ return [
+ {
+ id: '1.2.0-intel-avx2-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.2.0-bin.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-be-1.2.0-bin-x86_64.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.sha512`,
+ },
+ },
+ ],
+ },
+ {
+ id: '1.2.0-intel-noavx2-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.2.0-bin.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-x86_64.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-x86_64-noavx2.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-x86_64.tar.xz.sha512`,
+ },
+ },
+ ],
+ },
+ {
+ id: '1.2.0-arm-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.2.0-bin-arm.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-fe-1.2.0-bin-arm.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-be-1.2.0-bin-arm.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-be-1.2.0-bin-arm.tar.xz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz',
+ links: {
+ source: `${sources}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz`,
+ signature: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz.asc`,
+ sha512: `${APACHE_LINK}doris/1.2/1.2.0-rc04/apache-doris-java-udf-jar-with-dependencies-1.2.0-bin-arm.tar.xz.sha512`,
+ },
+ },
+ ],
+ },
+
+ {
+ id: '1.1.4-intel-avx2-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.1.4-bin.tar.gz',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-be-1.1.4-bin-x86_64.tar.gz',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64.tar.gz.sha512`,
+ },
+ },
+ ],
+ },
+ {
+ id: '1.1.4-intel-noavx2-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.1.4-bin.tar.gz',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-be-1.1.4-bin-x86_64-noavx2.tar.gz.sha512`,
+ },
+ },
+ ],
+ },
+ {
+ id: '1.1.4-arm-jdk8',
+ items: [
+ {
+ label: 'apache-doris-fe-1.1.4-bin.tar.gz',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-fe-1.1.4-bin.tar.gz.sha512`,
+ },
+ },
+ {
+ label: 'apache-doris-1.1.4-bin-arm.tar.gz ',
+ links: {
+ source: `${sources}doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz`,
+ signature: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz.asc`,
+ sha512: `${APACHE_LINK}doris/1.1/1.1.4-rc01/apache-doris-1.1.4-bin-arm.tar.gz.sha512`,
+ },
+ },
+ ],
+ },
+ ];
+}
+
+export function getAllFlinkConnectorDownloadLinks(locale: string) {
+ const sources = locale.toLocaleUpperCase() === 'EN' ? FLINK_CONNECTOR_LINK : CHINA_FLINK_CONNECTOR_MIRROR_LINK;
+ return [
+ {
+ version: '1.3.0',
+ date: '2022-12-07',
+ flink: '1.16',
+ scala: '2.12, 2.11',
+ doris: '1.0+',
+ download: `${sources}doris/flink-connector/1.3.0/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ {
+ version: '1.2.1',
+ date: '2022-12-07',
+ flink: '1.15',
+ scala: '2.12, 2.11',
+ doris: '1.0+',
+ download: `${sources}doris/flink-connector/1.2.1/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ {
+ version: '1.1.1',
+ date: '2021-12-07',
+ flink: '1.14',
+ scala: '2.12, 2.11',
+ doris: '1.0+',
+ download: `${sources}doris/flink-connector/1.1.1/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ {
+ version: '1.2.0',
+ date: '2022-08-15',
+ flink: '1.15',
+ scala: '2.12, 2.11',
+ doris: '1.0+',
+ download: `${sources}doris/flink-connector/1.2.0/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ {
+ version: '1.1.0',
+ date: '2022-07-11',
+ flink: '1.14',
+ scala: '2.12, 2.11',
+ doris: '0.15+',
+ download: `${sources}doris/flink-connector/1.1.0/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ {
+ version: '1.0.3',
+ date: '2021-03-18',
+ flink: '1.14, 1.13, 1.12, 1.11',
+ scala: '2.12, 2.11',
+ doris: '0.15+',
+ download: `${sources}doris/flink-connector/1.0.3/`,
+ github: 'https://github.com/apache/doris-flink-connector',
+ },
+ ];
+}
+export function getAllSparkConnectorDownloadLinks(locale: string) {
+ const sources = locale.toLocaleUpperCase() === 'EN' ? SPARK_CONNECTOR_LINK : CHINA_SPARK_CONNECTOR_MIRROR_LINK;
+ return [
+ {
+ version: '1.1.0',
+ date: '2022-07-11',
+ spark: '3.2, 3.1, 2.3',
+ scala: '2.12, 2.11',
+ doris: '0.15+',
+ download: `${sources}doris/spark-connector/1.1.0/`,
+ github: 'https://github.com/apache/doris-spark-connector',
+ },
+ {
+ version: '1.0.1',
+ date: '2021-03-18',
+ spark: '3.1, 2.3',
+ scala: '2.12, 2.11',
+ doris: '0.15+',
+ download: `${sources}doris/spark-connector/1.0.1/`,
+ github: 'https://github.com/apache/doris-spark-connector',
+ },
+ ];
+}
+
+export function getAllRelease(locale: string) {
+ const sources = locale.toLocaleUpperCase() === 'EN' ? ALL_RELEASE_LINK : CHINA_ALL_RELEASE_MIRROR_LINK;
+ return [
+ {
+ version: '1.2.0 ( latest )',
+ date: '2022-12-07',
+ note: '/docs/dev/releasenotes/release-1.2.0',
+ download: `${sources}doris/1.2/1.2.0-rc04/`,
+ },
+ {
+ version: '1.1.4',
+ date: '2022-11-11',
+ note: '/docs/dev/releasenotes/release-1.1.4',
+ download: `${sources}doris/1.1/1.1.4-rc01/`,
+ },
+ {
+ version: '1.1.3',
+ date: '2022-10-17',
+ note: '/docs/dev/releasenotes/release-1.1.3',
+ download: `${sources}doris/1.1/1.1.3-rc02/`,
+ },
+ {
+ version: '1.1.2',
+ date: '2022-09-13',
+ note: '/docs/dev/releasenotes/release-1.1.2',
+ download: `${sources}doris/1.1/1.1.2-rc05/`,
+ },
+ {
+ version: '1.1.1',
+ date: '2022-07-29',
+ note: '/docs/dev/releasenotes/release-1.1.1',
+ download: `${sources}doris/1.1/1.1.1-rc03/`,
+ },
+ {
+ version: '1.1.0',
+ date: '2022-07-14',
+ note: '/docs/dev/releasenotes/release-1.1.0',
+ download: `${sources}doris/1.1/1.1.0-rc05/`,
+ },
+ {
+ version: '0.15.0',
+ date: '2021-11-29',
+ note: 'https://github.com/apache/doris/issues/6806',
+ download: `${sources}doris/0.15.0-incubating/`,
+ },
+ {
+ version: '0.14.0',
+ date: '2021-05-26',
+ note: 'https://github.com/apache/doris/issues/5374',
+ download: `${sources}doris/0.14.0-incubating/`,
+ },
+ {
+ version: '0.13.0',
+ date: '2020-10-24',
+ note: 'https://github.com/apache/doris/issues/4370',
+ download: `${sources}doris/0.13.0-incubating/`,
+ },
+ ];
+}
export enum VersionEnum {
Latest = '1.2.0',
diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx
index 9ba2647..69d1835 100644
--- a/src/pages/download/index.tsx
+++ b/src/pages/download/index.tsx
@@ -9,30 +9,44 @@
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import './index.scss';
import {
+ CPUEnum,
DownloadLinkProps,
- ALL_RELEASE_LINK,
- CHINA_ALL_RELEASE_MIRROR_LINK,
- FLINK_CONNECTOR_LINK,
- CHINA_FLINK_CONNECTOR_MIRROR_LINK,
- SPARK_CONNECTOR_LINK,
- CHINA_SPARK_CONNECTOR_MIRROR_LINK,
+ JDKEnum,
+ VersionEnum,
+ getAllDownloadLinks,
+ getAllFlinkConnectorDownloadLinks,
+ getAllSparkConnectorDownloadLinks,
+ getAllRelease,
} from '@site/src/constant/download.data';
-import data from '../../../download.json';
+
+const BINARY_VERSION = [
+ { label: `${VersionEnum.Latest} ( latest )`, value: VersionEnum.Latest },
+ { label: VersionEnum.Prev, value: VersionEnum.Prev },
+];
+const CPU = [
+ { label: 'X64 ( avx2 )', value: CPUEnum.IntelAvx2 },
+ { label: 'X64 ( no avx2 )', value: CPUEnum.IntelNoAvx2 },
+ { label: 'ARM64', value: CPUEnum.ARM },
+];
+const JDK = [
+ { label: 'JDK 8', value: JDKEnum.JDK8 },
+ { label: 'JDK 11', value: JDKEnum.JDK11 },
+];
export default function Download(): JSX.Element {
const {
- i18n: { currentLocale },
+ siteConfig,
+ i18n: { currentLocale, locales, localeConfigs },
} = useDocusaurusContext();
- const [version, setVersion] = useState<string>(data.versions[0]);
- const [cpu, setCPU] = useState<string>('');
+ const [version, setVersion] = useState<string>(VersionEnum.Latest);
+ const [cpu, setCPU] = useState<string>(CPUEnum.IntelAvx2);
+ const [jdk, setJDK] = useState<string>(JDKEnum.JDK8);
const [current, setCurrent] = useState<DownloadLinkProps>();
- const sources = currentLocale.toLocaleUpperCase() === 'EN' ? ALL_RELEASE_LINK : CHINA_ALL_RELEASE_MIRROR_LINK;
- const flinkOrigin =
- currentLocale.toLocaleUpperCase() === 'EN' ? FLINK_CONNECTOR_LINK : CHINA_FLINK_CONNECTOR_MIRROR_LINK;
- const sparkOrigin =
- currentLocale.toLocaleUpperCase() === 'EN' ? SPARK_CONNECTOR_LINK : CHINA_SPARK_CONNECTOR_MIRROR_LINK;
+ const FLINK_CONNECTOR = getAllFlinkConnectorDownloadLinks(currentLocale);
+ const SPARK_CONNECTOR = getAllSparkConnectorDownloadLinks(currentLocale);
+ const ALL_RELEASE = getAllRelease(currentLocale);
const changeVersion = (val: string) => {
setVersion(val);
@@ -40,23 +54,26 @@
const changeCPU = (val: string) => {
setCPU(val);
};
+ const changeJDK = (val: string) => {
+ // if (version === VersionEnum.Latest && val !== JDKEnum.JDK8) return;
+ if (val !== JDKEnum.JDK8) return;
+ setJDK(val);
+ };
const getDownloadLinks = () => {
- const text = `${version}-${cpu}`;
- const linkObj = data.downloadLinks.find(item => item.id === text);
+ const text = `${version}-${cpu}-${jdk}`;
+ const linkObj = getAllDownloadLinks(currentLocale).find(item => item.id === text);
setCurrent(linkObj);
};
useEffect(() => {
- if (version && cpu) {
- getDownloadLinks();
- }
- }, [version, cpu]);
+ getDownloadLinks();
+ }, [version, cpu, jdk]);
useEffect(() => {
- setCPU(data.cpus[0].value);
+ setCPU(CPUEnum.IntelAvx2);
+ setJDK(JDKEnum.JDK8);
}, [version]);
-
return (
<Layout
title={translate({ id: 'download.title', message: 'Download' })}
@@ -83,16 +100,15 @@
</Translate>
</label>
<div className="tabs-radio">
- {data.versions?.map(item => (
+ {BINARY_VERSION.map(item => (
<div
className={clsx('radio', {
- checked: version === item,
+ checked: version === item.value,
})}
- key={item}
- onClick={() => changeVersion(item)}
+ key={item.value}
+ onClick={() => changeVersion(item.value)}
>
- {item}
- {data.lastVersion === item ? ' ( latest )' : ''}
+ {item.label}
</div>
))}
</div>
@@ -104,7 +120,7 @@
</Translate>
</label>
<div className="tabs-radio">
- {data.cpus?.map(item => (
+ {CPU.map(item => (
<div
className={clsx('radio', {
checked: cpu === item.value,
@@ -117,6 +133,28 @@
))}
</div>
</div>
+ {/* <div className="download-type">
+ <label>
+ <Translate id="download.jdk.version" description="JDK Version">
+ JDK Version
+ </Translate>
+ </label>
+ <div className="tabs-radio">
+ {JDK.map(item => (
+ <div
+ className={clsx('radio', {
+ checked: jdk === item.value,
+ // disabled: version === VersionEnum.Latest && item.value !== JDKEnum.JDK8,
+ disabled: item.value !== JDKEnum.JDK8,
+ })}
+ key={item.value}
+ onClick={() => changeJDK(item.value)}
+ >
+ {item.label}
+ </div>
+ ))}
+ </div>
+ </div> */}
<div className="download-type">
<label>
<Translate id="download.download.link" description="Download">
@@ -137,28 +175,70 @@
</div>
</div>
</div>
- {data.downloadNotices?.length > 0 ? (
- <div className="tips">
- <div className="title">
- <Translate id="Notice">Notice</Translate>
- {currentLocale === 'zh-CN' ? ':' : ':'}
- </div>
- <ul>
- {data.downloadNotices?.map(
- (item, index) =>
- item.version.includes(version) && (
- <li
- key={index}
- dangerouslySetInnerHTML={{
- __html:
- currentLocale === 'zh-CN' ? item.notice.zh : item.notice.en,
- }}
- ></li>
- ),
- )}
- </ul>
+ <div className="tips">
+ <div className="title">
+ <Translate id="Notice">Notice</Translate>
+ {currentLocale === 'zh-CN' ? ':' : ':'}
</div>
- ) : null}
+ <ul>
+ {version === VersionEnum.Latest ? (
+ <>
+ {currentLocale === 'zh-CN' ? (
+ <li>
+ 由于 Apache 服务器文件大小限制,1.2
+ 版本的二进制程序被分为三个包,其中新增的
+ apache-doris-java-udf-jar-with-dependencies 用于支持 JDBC 外表和 JAVA
+ UDF ,下载后需要将其中放到
+ <code>be/lib</code>
+ 目录下。详细升级注意事项请参考
+ <Link to="/docs/dev/releasenotes/release-1.2.0">
+ 1.2.0 Release Note
+ </Link>
+ 以及
+ <Link to="/docs/dev/install/install-deploy">
+ <Translate id="Installation and deployment">
+ Installation and deployment
+ </Translate>
+ </Link>
+ 以及
+ <Link to="/docs/dev/admin-manual/cluster-management/upgrade">
+ <Translate id="Cluster Upgrade">Cluster Upgrade</Translate>
+ </Link>
+ 手册。
+ </li>
+ ) : (
+ <li>
+ Due to file size limitations, the binary for version 1.2.0 is divided
+ into three packages. The `apache-doris-java-udf-jar-with-dependencies`
+ package is used to support the new JDBC expansion table and JAVA UDF.
+ After downloading, you need to put the
+ `java-udf-jar-with-dependencies.jar` in the <code>be/lib</code>
+ directory to start BE, otherwise it will not start successfully.
+ </li>
+ )}
+ <li>
+ <Translate id="download.quick.download.notice">
+ Version 1.2.0 does not support running with JDK11, and it will be fixed
+ in a later version.
+ </Translate>
+ </li>
+ </>
+ ) : (
+ ''
+ )}
+ <li>
+ <Translate id="download.quick.download.intr.prefix">
+ If the CPU does not support the avx2 instruction set, select the no avx2
+ version. You can check whether it is supported by
+ </Translate>
+ <code>cat /proc/cpuinfo</code>
+ <Translate id="download.quick.download.intr.suffix">
+ . The avx2 instruction will improve the computational efficiency of data
+ structures such as bloom filter.
+ </Translate>
+ </li>
+ </ul>
+ </div>
</div>
</PageColumn>
</section>
@@ -192,15 +272,12 @@
</tr>
</thead>
<tbody>
- {data.allReleases?.map((item, index) => (
+ {ALL_RELEASE.map((item, index) => (
<tr key={index}>
- <td>
- {item.version}
- {data.lastVersion === item.version ? ' ( latest )' : ''}
- </td>
+ <td>{item.version}</td>
<td>{item.date}</td>
<td>
- <Link to={sources + item.download}>
+ <Link to={item.download}>
<Translate id="download.source.binary">Source / Binary</Translate>
</Link>
</td>
@@ -248,7 +325,7 @@
</tr>
</thead>
<tbody>
- {data.flinkConnectors?.map((item, index) => (
+ {FLINK_CONNECTOR.map((item, index) => (
<tr key={index}>
<td>{item.version}</td>
<td>{item.date}</td>
@@ -256,7 +333,7 @@
<td>{item.scala}</td>
<td>{item.doris}</td>
<td>
- <Link to={flinkOrigin + item.download}>
+ <Link to={item.download}>
<Translate id="download">Download</Translate>
</Link>
<Link to={item.github}>GitHub</Link>
@@ -324,7 +401,7 @@
</tr>
</thead>
<tbody>
- {data.sparkConnectors?.map((item, index) => (
+ {SPARK_CONNECTOR.map((item, index) => (
<tr key={index}>
<td>{item.version}</td>
<td>{item.date}</td>
@@ -332,7 +409,7 @@
<td>{item.scala}</td>
<td>{item.doris}</td>
<td>
- <Link to={sparkOrigin + item.download}>
+ <Link to={item.download}>
<Translate id="download">Download</Translate>
</Link>
<Link to={item.github}>GitHub</Link>
diff --git a/tsconfig.json b/tsconfig.json
index 64b07e0..a8cb11c 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,7 +3,6 @@
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"jsx": "react",
- "baseUrl": ".",
- "resolveJsonModule": true,
+ "baseUrl": "."
}
}