From 21412eaa06541d8d8cec9b71349638e80237a1cf Mon Sep 17 00:00:00 2001 From: shaomengwang Date: Fri, 11 Jun 2021 23:43:42 +0800 Subject: [PATCH] Update docs. --- README.en-US.md | 56 ++++++++++++++++++++++++++++++++---------------- README.md | 57 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 78 insertions(+), 35 deletions(-) diff --git a/README.en-US.md b/README.en-US.md index ba6ccdd90..28e531f5a 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -32,16 +32,16 @@ Welcome everyone to join the Alink open source user group to communicate. #### About package names and versions: - PyAlink provides different Python packages for Flink versions that Alink supports: - package `pyalink` always maintains Alink Python API against the latest Flink version, which is 1.12, - while `pyalink-flink-***` support old-version Flink, which are `pyalink-flink-1.11`, `pyalink-flink-1.10` and `pyalink-flink-1.9` for now. - - The version of python packages always follows Alink Java version, like `1.3.1`. + package `pyalink` always maintains Alink Python API against the latest Flink version, which is 1.13, + while `pyalink-flink-***` support old-version Flink, which are `pyalink-flink-1.12`, `pyalink-flink-1.11`, `pyalink-flink-1.10` and `pyalink-flink-1.9` for now. + - The version of python packages always follows Alink Java version, like `1.4.0`. #### Installation steps: -1. Make sure the version of python3 on your computer is 3.6 or 3.7. +1. Make sure the version of python3 on your computer is 3.6, 3.7 or 3.8. 2. Make sure Java 8 is installed on your computer. 3. Use pip to install: - `pip install pyalink`, `pip install pyalink-flink-1.11`, `pip install pyalink-flink-1.10` or `pip install pyalink-flink-1.9`. + `pip install pyalink`, `pip install pyalink-flink-1.12`, `pip install pyalink-flink-1.11`, `pip install pyalink-flink-1.10` or `pip install pyalink-flink-1.9`. #### Potential issues: @@ -50,10 +50,11 @@ Welcome everyone to join the Alink open source user group to communicate. If `pyalink` or `pyalink-flink-***` was/were installed, please use `pip uninstall pyalink` or `pip uninstall pyalink-flink-***` to remove them. 2. If `pip install` is slow of failed, refer to [this article](https://segmentfault.com/a/1190000006111096) to change the pip source, or use the following download links: - - Flink 1.12:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink-1.3.2-py3-none-any.whl) (MD5: 80aa54edad5c3a6ca513bbf2b3ec2ebb) - - Flink 1.11:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.11-1.3.2-py3-none-any.whl) (MD5: e832f73c9503de12a02c1824c8963b87) - - Flink 1.10:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.10-1.3.2-py3-none-any.whl) (MD5: 145e513dae8caa85f6a32c3ad45b3c33) - - Flink 1.9: [Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.9-1.3.2-py3-none-any.whl) (MD5: 6ff04cbad4e6d6e0a2137d1d76a19a45) + - Flink 1.13:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink-1.4.0-py3-none-any.whl) (MD5: 94751cc1e31f174b446142455293fb30) + - Flink 1.12:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.12-1.4.0-py3-none-any.whl) (MD5: 4cbafe08b24b3467d9096f8a8a07321f) + - Flink 1.11:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.11-1.4.0-py3-none-any.whl) (MD5: 1810f6769bd2d2d77358f4e51948a937) + - Flink 1.10:[Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.10-1.4.0-py3-none-any.whl) (MD5: 79ceea2788ad2159ae23ad3e9e83a261) + - Flink 1.9: [Link](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.9-1.4.0-py3-none-any.whl) (MD5: fc143df37d15d6bd3b0733fef8969ef1) 3. If multiple version of Python exist, you may need to use a special version of `pip`, like `pip3`; If Anaconda is used, the command should be run in Anaconda prompt. @@ -153,12 +154,31 @@ Pipeline pipeline = new Pipeline().add(va).add(kMeans); pipeline.fit(data).transform(data).print(); ``` +### With Flink-1.13 +```xml + + com.alibaba.alink + alink_core_flink-1.13_2.11 + 1.4.0 + + + org.apache.flink + flink-streaming-scala_2.11 + 1.13.0 + + + org.apache.flink + flink-table-planner_2.11 + 1.13.0 + +``` + ### With Flink-1.12 ```xml com.alibaba.alink alink_core_flink-1.12_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -177,7 +197,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.11_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -196,7 +216,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.10_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -216,7 +236,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.9_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -236,8 +256,8 @@ Get started to run Alink Algorithm with a Flink Cluster 1. Prepare a Flink Cluster: ```shell - wget https://archive.apache.org/dist/flink/flink-1.12.1/flink-1.12.1-bin-scala_2.11.tgz - tar -xf flink-1.12.1-bin-scala_2.11.tgz && cd flink-1.12.1 + wget https://archive.apache.org/dist/flink/flink-1.13.0/flink-1.13.0-bin-scala_2.11.tgz + tar -xf flink-1.13.0-bin-scala_2.11.tgz && cd flink-1.13.0 ./bin/start-cluster.sh ``` @@ -250,9 +270,9 @@ Get started to run Alink Algorithm with a Flink Cluster 3. Run Java examples: ```shell - ./bin/flink run -p 1 -c com.alibaba.alink.ALSExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar - # ./bin/flink run -p 1 -c com.alibaba.alink.GBDTExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar - # ./bin/flink run -p 1 -c com.alibaba.alink.KMeansExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar + ./bin/flink run -p 1 -c com.alibaba.alink.ALSExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar + # ./bin/flink run -p 1 -c com.alibaba.alink.GBDTExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar + # ./bin/flink run -p 1 -c com.alibaba.alink.KMeansExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar ``` Deployment diff --git a/README.md b/README.md index e8d1d0f5b..11efda77d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ +- Alink文档:https://www.yuque.com/pinshu/alink_doc +- Alink使用指南:https://www.yuque.com/pinshu/alink_guide +- Alink插件下载器:https://www.yuque.com/pinshu/alink_guide/czg4cx + #### 开源算法列表
@@ -31,24 +35,25 @@ #### 包名和版本说明: - PyAlink 根据 Alink 所支持的 Flink 版本提供不同的 Python 包: -其中,`pyalink` 包对应为 Alink 所支持的最新 Flink 版本,当前为 1.12,而 `pyalink-flink-***` 为旧版本的 Flink 版本,当前提供 `pyalink-flink-1.11`, `pyalink-flink-1.10` 和 `pyalink-flink-1.9`。 - - Python 包的版本号与 Alink 的版本号一致,例如`1.3.1`。 +其中,`pyalink` 包对应为 Alink 所支持的最新 Flink 版本,当前为 1.13,而 `pyalink-flink-***` 为旧版本的 Flink 版本,当前提供 `pyalink-flink-1.12`, `pyalink-flink-1.11`, `pyalink-flink-1.10` 和 `pyalink-flink-1.9`。 + - Python 包的版本号与 Alink 的版本号一致,例如`1.4.0`。 ####安装步骤: -1. 确保使用环境中有Python3,版本限于 3.6 和 3.7。 +1. 确保使用环境中有Python3,版本限于 3.6,3.7 和 3.8。 2. 确保使用环境中安装有 Java 8。 3. 使用 pip 命令进行安装: - `pip install pyalink`、`pip install pyalink-flink-1.11`、`pip install pyalink-flink-1.10` 或者 `pip install pyalink-flink-1.9`。 + `pip install pyalink`、`pip install pyalink-flink-1.12`、`pip install pyalink-flink-1.11`、`pip install pyalink-flink-1.10` 或者 `pip install pyalink-flink-1.9`。 #### 安装注意事项: 1. `pyalink` 和 `pyalink-flink-***` 不能同时安装,也不能与旧版本同时安装。 如果之前安装过 `pyalink` 或者 `pyalink-flink-***`,请使用`pip uninstall pyalink` 或者 `pip uninstall pyalink-flink-***` 卸载之前的版本。 2. 出现`pip`安装缓慢或不成功的情况,可以参考[这篇文章](https://segmentfault.com/a/1190000006111096)修改pip源,或者直接使用下面的链接下载 whl 包,然后使用 `pip` 安装: - - Flink 1.12:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink-1.3.2-py3-none-any.whl) (MD5: 80aa54edad5c3a6ca513bbf2b3ec2ebb) - - Flink 1.11:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.11-1.3.2-py3-none-any.whl) (MD5: e832f73c9503de12a02c1824c8963b87) - - Flink 1.10:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.10-1.3.2-py3-none-any.whl) (MD5: 145e513dae8caa85f6a32c3ad45b3c33) - - Flink 1.9: [链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.3.2/pyalink_flink_1.9-1.3.2-py3-none-any.whl) (MD5: 6ff04cbad4e6d6e0a2137d1d76a19a45) + - Flink 1.13:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink-1.4.0-py3-none-any.whl) (MD5: 94751cc1e31f174b446142455293fb30) + - Flink 1.12:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.12-1.4.0-py3-none-any.whl) (MD5: 4cbafe08b24b3467d9096f8a8a07321f) + - Flink 1.11:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.11-1.4.0-py3-none-any.whl) (MD5: 1810f6769bd2d2d77358f4e51948a937) + - Flink 1.10:[链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.10-1.4.0-py3-none-any.whl) (MD5: 79ceea2788ad2159ae23ad3e9e83a261) + - Flink 1.9: [链接](https://alink-release.oss-cn-beijing.aliyuncs.com/v1.4.0/pyalink_flink_1.9-1.4.0-py3-none-any.whl) (MD5: fc143df37d15d6bd3b0733fef8969ef1) 3. 如果有多个版本的 Python,可能需要使用特定版本的 `pip`,比如 `pip3`;如果使用 Anaconda,则需要在 Anaconda 命令行中进行安装。 #### 下载安装文件系统或 Catalog 依赖 jar 包: @@ -138,13 +143,31 @@ Pipeline pipeline = new Pipeline().add(va).add(kMeans); pipeline.fit(data).transform(data).print(); ``` +### Flink-1.13 的 Maven 依赖 +```xml + + com.alibaba.alink + alink_core_flink-1.13_2.11 + 1.4.0 + + + org.apache.flink + flink-streaming-scala_2.11 + 1.13.0 + + + org.apache.flink + flink-table-planner_2.11 + 1.13.0 + +``` ### Flink-1.12 的 Maven 依赖 ```xml com.alibaba.alink alink_core_flink-1.12_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -163,7 +186,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.11_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -182,7 +205,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.10_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -202,7 +225,7 @@ pipeline.fit(data).transform(data).print(); com.alibaba.alink alink_core_flink-1.9_2.11 - 1.3.2 + 1.4.0 org.apache.flink @@ -223,8 +246,8 @@ pipeline.fit(data).transform(data).print(); 1. 准备Flink集群 ```shell - wget https://archive.apache.org/dist/flink/flink-1.12.1/flink-1.12.1-bin-scala_2.11.tgz - tar -xf flink-1.12.1-bin-scala_2.11.tgz && cd flink-1.12.1 + wget https://archive.apache.org/dist/flink/flink-1.13.0/flink-1.13.0-bin-scala_2.11.tgz + tar -xf flink-1.13.0-bin-scala_2.11.tgz && cd flink-1.13.0 ./bin/start-cluster.sh ``` @@ -237,9 +260,9 @@ pipeline.fit(data).transform(data).print(); 3. 运行Java示例 ```shell - ./bin/flink run -p 1 -c com.alibaba.alink.ALSExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar - # ./bin/flink run -p 1 -c com.alibaba.alink.GBDTExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar - # ./bin/flink run -p 1 -c com.alibaba.alink.KMeansExample [path_to_Alink]/examples/target/alink_examples-1.1-SNAPSHOT.jar + ./bin/flink run -p 1 -c com.alibaba.alink.ALSExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar + # ./bin/flink run -p 1 -c com.alibaba.alink.GBDTExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar + # ./bin/flink run -p 1 -c com.alibaba.alink.KMeansExample [path_to_Alink]/examples/target/alink_examples-1.4-SNAPSHOT.jar ``` ## 部署