diff --git a/README.md b/README.md index ba7f1e2a2d..f45c216fbb 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,19 @@ After execute, you can perform a task locally. Standalone mode depend on the Flink Standalone environment and does not depend on the Hadoop environment. #### Steps +##### 1. add jars of chunjun +1) Find directory of jars: + if you build this project using maven, the directory name is 'chunjun-dist' ; + if you download tar.gz file from release page, after decompression, the directory name would be like 'chunjun-assembly-1.12-SNAPSHOT-chunjun-dist'. + +2) Copy jars to directory of Flink lib, command example: +```shell +cp -r chunjun-dist $FLINK_HOME/lib +``` +Notice: this operation should be executed in all machines of Flink cluster, otherwise some jobs will fail because of ClassNotFoundException. -##### 1. Start Flink Standalone Cluster + +##### 2. Start Flink Standalone Cluster ```shell sh $FLINK_HOME/bin/start-cluster.sh @@ -121,7 +132,7 @@ sh $FLINK_HOME/bin/start-cluster.sh After the startup is successful, the default port of Flink Web is 8081, which you can configure in the file of 'flink-conf.yaml'. We can access the 8081 port of the current machine to enter the flink web of standalone cluster. -##### 2. Submit task +##### 3. Submit task Go to the directory of 'chunjun-dist' and execute the command below: diff --git a/README_CH.md b/README_CH.md index 5952de613a..8e1e644a51 100644 --- a/README_CH.md +++ b/README_CH.md @@ -135,7 +135,18 @@ Standalone模式依赖Flink Standalone环境,不依赖Hadoop环境。 #### 提交步骤 -##### 1. 启动Flink Standalone环境 +##### 1. 添加chunjun依赖包 +1) 根据实际情况找到依赖文件: + 通过maven编译的方式构建项目时,依赖文件目录为'chunjun-dist'; + 通过官网下载压缩包解压使用时,依赖文件目录为解压后的目录,例如'chunjun-assembly-1.12-SNAPSHOT-chunjun-dist' + +2) 将依赖文件复制到Flink lib目录下,例如 +```shell +cp -r chunjun-dist $FLINK_HOME/lib +``` +注意: 这个复制操作需要在所有Flink cluster机器上执行,否则部分任务会出现类找不到的错误。 + +##### 2. 启动Flink Standalone环境 ```shell sh $FLINK_HOME/bin/start-cluster.sh @@ -143,7 +154,7 @@ sh $FLINK_HOME/bin/start-cluster.sh 启动成功后默认端口为8081,我们可以访问当前机器的8081端口进入standalone的flink web ui -##### 2. 提交任务 +##### 3. 提交任务 进入到本地chunjun-dist目录,执行命令