diff --git a/0001-add-npm.hw-repo.patch b/0001-add-npm.hw-repo.patch index 6cf3bdc..cf44b9b 100644 --- a/0001-add-npm.hw-repo.patch +++ b/0001-add-npm.hw-repo.patch @@ -1,32 +1,11 @@ -From a35c34c6591366ddaccc873b800b078fbd9cc9d7 Mon Sep 17 00:00:00 2001 -From: weidong -Date: Thu, 17 Dec 2020 11:44:05 +0800 -Subject: [PATCH] add npm.hw repo - ---- - flink-runtime-web/pom.xml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml -index 0d98526b..fb29809b 100644 ---- a/flink-runtime-web/pom.xml -+++ b/flink-runtime-web/pom.xml -@@ -271,6 +271,7 @@ under the License. +diff -Naur flink-release-1.17.1/flink-runtime-web/pom.xml flink-release-1.17.1-change/flink-runtime-web/pom.xml +--- flink-release-1.17.1/flink-runtime-web/pom.xml 2023-05-19 16:45:46.000000000 +0800 ++++ flink-release-1.17.1-change/flink-runtime-web/pom.xml 2023-09-21 16:19:18.481779886 +0800 +@@ -269,6 +270,7 @@ - ci --cache-max=0 --no-save -+ https://mirrors.huaweicloud.com/repository/npm + ci --cache-max=0 --no-save ${npm.proxy} ++ https://repo.huaweicloud.com/repository/npm true -@@ -283,6 +284,7 @@ under the License. - - - run build -+ https://mirrors.huaweicloud.com/repository/npm - - - --- -2.23.0 - diff --git a/0002-fix-compilation-failure.patch b/0002-fix-compilation-failure.patch index 55010a7..f6d3fb7 100644 --- a/0002-fix-compilation-failure.patch +++ b/0002-fix-compilation-failure.patch @@ -1,28 +1,14 @@ -diff --git a/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml b/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml -index 3843cd5..1064296 100644 ---- a/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml -+++ b/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml -@@ -43,6 +43,11 @@ under the License. +--- flink-release-1.17.1/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml 2023-05-19 16:45:46.000000000 +0800 ++++ flink-release-1.17.1-change/flink-end-to-end-tests/flink-end-to-end-tests-common-kafka/pom.xml 2023-09-26 17:25:33.739542538 +0800 +@@ -43,6 +43,11 @@ flink-end-to-end-tests-common ${project.version} -+ -+ io.confluent -+ kafka-schema-serializer -+ 5.5.2 -+ ++ ++ io.confluent ++ kafka-schema-serializer ++ 7.2.2 ++ org.apache.flink - flink-test-utils-junit -diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml -index d94fca1..a9896f4 100644 ---- a/flink-runtime-web/pom.xml -+++ b/flink-runtime-web/pom.xml -@@ -262,6 +262,7 @@ under the License. - - - v10.9.0 -+ https://mirrors.huaweicloud.com/nodejs/ - - - + flink-connector-kafka diff --git a/0003-Skip-flink-avro-confluent-registry-test.patch b/0003-Skip-flink-avro-confluent-registry-test.patch new file mode 100644 index 0000000..8a8f303 --- /dev/null +++ b/0003-Skip-flink-avro-confluent-registry-test.patch @@ -0,0 +1,11 @@ +diff -Naur flink-release-1.17.1/flink-formats/flink-avro-confluent-registry/pom.xml flink-release-1.17.1-change/flink-formats/flink-avro-confluent-registry/pom.xml +--- flink-release-1.17.1/flink-formats/flink-avro-confluent-registry/pom.xml 2023-05-19 16:45:46.000000000 +0800 ++++ flink-release-1.17.1-change/flink-formats/flink-avro-confluent-registry/pom.xml 2023-09-25 17:26:23.465127239 +0800 +@@ -34,6 +34,7 @@ + + 3.2.3 + 7.2.2 ++ true + + + diff --git a/0003-update-os-maven-plugin-to-support-loongarch64.patch b/0003-update-os-maven-plugin-to-support-loongarch64.patch deleted file mode 100644 index 244aed1..0000000 --- a/0003-update-os-maven-plugin-to-support-loongarch64.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2a34491f2b3763d7cc7835ebfe0bfa2668066872 Mon Sep 17 00:00:00 2001 -From: Wenlong Zhang -Date: Sat, 20 May 2023 11:09:45 +0800 -Subject: [PATCH] update os-maven-plugin to support loongarch64 - ---- - flink-formats/flink-parquet/pom.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/flink-formats/flink-parquet/pom.xml b/flink-formats/flink-parquet/pom.xml -index df4076d7..bac6b680 100644 ---- a/flink-formats/flink-parquet/pom.xml -+++ b/flink-formats/flink-parquet/pom.xml -@@ -209,7 +209,7 @@ under the License. - - kr.motd.maven - os-maven-plugin -- 1.7.0 -+ 1.7.1 - - - --- -2.27.0 - diff --git a/README.md b/README.md index fd1ea4e..96fa9e5 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,10 @@ # flink #### 介绍 -Apache Flink是由Apache软件基金会开发的开源流处理框架,其核心是用Java和Scala编写的分布式流数据处理引擎。Flink是一个面向分布式数据流处理和批量数据处理的开源计算平台,它能够基于同一个Flink运行时,提供支持流处理和批处理两种类型应用的功能。 -Flink以数据并行和流水线方式执行任意流数据程序,Flink的流水线运行时系统可以执行批处理和流处理程序。此外,Flink的运行时本身也支持迭代算法的执行。 -现有的开源计算方案,会把流处理和批处理作为两种不同的应用类型,因为它们所提供的SLA(Service-Level-Aggreement)是完全不相同的:流处理一般需要支持低延迟、Exactly-once保证,而批处理需要支持高吞吐、高效处理。 +Stateful Computations over Data Streams #### 软件架构 软件架构说明 -Flink的架构体系同样也遵行分层架构设计的理念,基本上分为三层,API&Libraries层、Runtine核心层以及物理部署层。 -- API&Libraries层:提供了支撑流计算和批计算的接口,同时在此基础之上抽象出不同的应用类型的组件库。 -- Runtime 核心层:负责对上层不同接口提供基础服务,支持分布式Stream作业的执行、JobGraph到ExecutionGraph 的映射转换、任务调度等,将DataStream和DataSet转成统一的可执行的Task Operator. -- 物理部署层:Flink 支持多种部署模式,本机,集群(Standalone/YARN)、云(GCE/EC2)、Kubenetes。 - -#### ARM支持: - -1. 移植指南:https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/Flink/kunpengflink191_02_0001.html -2. 部署指南:https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/Flink/kunpengflink_04_0001.html -3. 调优指南:https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/Flink/kunpengflinkhdp_05_0002.html #### 安装教程 diff --git a/flink.spec b/flink.spec index 7f38bb9..30ba7a5 100644 --- a/flink.spec +++ b/flink.spec @@ -10,50 +10,41 @@ %global with_tests 0 Name: flink -Version: 1.13.0 -Release: 2 +Version: 1.17.1 +Release: 1 Summary: Stateful Computations over Data Streams License: Apache License v2.0 URL: https://github.com/apache/%{name} -Source0: https://github.com/apache/%{name}/archive/flink-release-%{version}.tar.gz -Source1: settings.xml -Source2: https://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.5.2/kafka-schema-registry-client-5.5.2.jar -Source3: https://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.5.2/kafka-avro-serializer-5.5.2.jar -Source4: https://packages.confluent.io/maven/io/confluent/kafka-schema-serializer/5.5.2/kafka-schema-serializer-5.5.2.jar - +Source0: https://github.com/apache/%{name}/archive/release-%{version}.tar.gz +Source2: https://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/7.2.2/kafka-schema-registry-client-7.2.2.jar +Source3: https://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/7.2.2/kafka-avro-serializer-7.2.2.jar +Source4: https://packages.confluent.io/maven/io/confluent/kafka-schema-serializer/7.2.2/kafka-schema-serializer-7.2.2.jar +Source5: https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/7.2.2-ccs/kafka-clients-7.2.2-ccs.jar +Source6: npm-8.1.2.tar.gz +Source7: node-16.13.2-linux-arm64.tar.gz Patch0: 0001-add-npm.hw-repo.patch Patch1: 0002-fix-compilation-failure.patch -Patch2: 0003-update-os-maven-plugin-to-support-loongarch64.patch -BuildRequires: java-1.8.0-openjdk-devel maven +Patch2: 0003-Skip-flink-avro-confluent-registry-test.patch +BuildRequires: java-1.8.0-openjdk-devel maven npm Requires: java-1.8.0-openjdk %description Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale. - %prep %autosetup -p1 -n %{name}-release-%{version} -mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE2} -mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE3} -mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-serializer -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE4} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE2} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE3} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-serializer -Dversion=7.2.2 -Dpackaging=jar -Dfile=%{SOURCE4} +mvn install:install-file -DgroupId=org.apache.kafka -DartifactId=kafka-clients -Dversion=7.2.2-ccs -Dpackaging=jar -Dfile=%{SOURCE5} +mkdir -p ${HOME}/.m2/repository/com/github/eirslett/npm/8.1.2/ +cp %{SOURCE6} ${HOME}/.m2/repository/com/github/eirslett/npm/8.1.2/ +mkdir -p ${HOME}/.m2/repository/com/github/eirslett/node/16.13.2 +cp %{SOURCE7} ${HOME}/.m2/repository/com/github/eirslett/node/16.13.2 + %build - -maven_cmd="clean package " - -%if 0%{?compile_for_local} - cp %{SOURCE1} ./ - maven_cmd="${maven_cmd} -s settings.xml" -%endif - -%if 0%{?with_debug} - maven_cmd="${maven_cmd} -X " -%endif - -%if 0%{?with_tests:1} - maven_cmd="${maven_cmd} -DskipTests" -%endif - -mvn ${maven_cmd} +npm config set registry https://repo.huaweicloud.com/repository/npm/ +mvn clean install -DskipTests -Dfast %install mkdir -p %{buildroot}/opt/ @@ -66,7 +57,10 @@ find %{buildroot}/opt/apache-%{name}-%{version}/ -type f -name '*.py' | xargs -i %doc README.md %license LICENSE -%changelog +%changelog +* Wed Sep 27 2023 xiexing - 1.17.1-1 +- update version to 1.17.1 + * Mon May 8 2023 Wenlong Zhang - 1.13.0-2 - add loongarch64 support diff --git a/flink.spec-ori b/flink.spec-ori new file mode 100644 index 0000000..7f38bb9 --- /dev/null +++ b/flink.spec-ori @@ -0,0 +1,89 @@ +%define __jar_repack %{nil} + +%global debug_package %{nil} + +# Use local caches compile +%global compile_for_local 0 + +%global with_debug 0 + +%global with_tests 0 + +Name: flink +Version: 1.13.0 +Release: 2 +Summary: Stateful Computations over Data Streams +License: Apache License v2.0 +URL: https://github.com/apache/%{name} +Source0: https://github.com/apache/%{name}/archive/flink-release-%{version}.tar.gz +Source1: settings.xml +Source2: https://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.5.2/kafka-schema-registry-client-5.5.2.jar +Source3: https://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.5.2/kafka-avro-serializer-5.5.2.jar +Source4: https://packages.confluent.io/maven/io/confluent/kafka-schema-serializer/5.5.2/kafka-schema-serializer-5.5.2.jar + +Patch0: 0001-add-npm.hw-repo.patch +Patch1: 0002-fix-compilation-failure.patch +Patch2: 0003-update-os-maven-plugin-to-support-loongarch64.patch +BuildRequires: java-1.8.0-openjdk-devel maven +Requires: java-1.8.0-openjdk + +%description +Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale. + + +%prep +%autosetup -p1 -n %{name}-release-%{version} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE2} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE3} +mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-serializer -Dversion=5.5.2 -Dpackaging=jar -Dfile=%{SOURCE4} +%build + +maven_cmd="clean package " + +%if 0%{?compile_for_local} + cp %{SOURCE1} ./ + maven_cmd="${maven_cmd} -s settings.xml" +%endif + +%if 0%{?with_debug} + maven_cmd="${maven_cmd} -X " +%endif + +%if 0%{?with_tests:1} + maven_cmd="${maven_cmd} -DskipTests" +%endif + +mvn ${maven_cmd} + +%install +mkdir -p %{buildroot}/opt/ +cp -rf ../%{name}-release-%{version}/flink-dist/target/%{name}-%{version}-bin/%{name}-%{version} %{buildroot}/opt/apache-%{name}-%{version} + +find %{buildroot}/opt/apache-%{name}-%{version}/ -type f -name '*.py' | xargs -i sed -i 's/\#!\/usr\/bin\/env python$/\#!\/usr\/bin\/python3/' {} + +%files +/opt/apache-%{name}-%{version} +%doc README.md +%license LICENSE + +%changelog +* Mon May 8 2023 Wenlong Zhang - 1.13.0-2 +- add loongarch64 support + +* Wed Dec 22 2021 chenjunbiao - 1.13.0-1 +- Update version. + +* Fri Dec 17 2021 weidong - 1.12.7-1 +- Update version. + +* Wed Jul 21 2021 zhangjiapeng - 1.12.0-4 +- Fix compilation failure. + +* Wed Dec 23 2020 weidong - 1.12.0-3 +- Add npm.huawei repo. + +* Thu Dec 17 2020 weidong - 1.12.0-2 +- Fix compilation issues. + +* Mon Dec 14 2020 weidong - 1.12.0-1 +- Initial package. diff --git a/kafka-avro-serializer-5.5.2.jar b/kafka-avro-serializer-5.5.2.jar deleted file mode 100644 index e8c3567..0000000 Binary files a/kafka-avro-serializer-5.5.2.jar and /dev/null differ diff --git a/kafka-avro-serializer-7.2.2.jar b/kafka-avro-serializer-7.2.2.jar new file mode 100644 index 0000000..6ea0e9a Binary files /dev/null and b/kafka-avro-serializer-7.2.2.jar differ diff --git a/kafka-clients-7.2.2-ccs.jar b/kafka-clients-7.2.2-ccs.jar new file mode 100644 index 0000000..177a528 Binary files /dev/null and b/kafka-clients-7.2.2-ccs.jar differ diff --git a/kafka-schema-registry-client-5.5.2.jar b/kafka-schema-registry-client-5.5.2.jar deleted file mode 100644 index 5416262..0000000 Binary files a/kafka-schema-registry-client-5.5.2.jar and /dev/null differ diff --git a/kafka-schema-registry-client-7.2.2.jar b/kafka-schema-registry-client-7.2.2.jar new file mode 100644 index 0000000..b5806dd Binary files /dev/null and b/kafka-schema-registry-client-7.2.2.jar differ diff --git a/kafka-schema-serializer-5.5.2.jar b/kafka-schema-serializer-5.5.2.jar deleted file mode 100644 index fdf96a8..0000000 Binary files a/kafka-schema-serializer-5.5.2.jar and /dev/null differ diff --git a/kafka-schema-serializer-7.2.2.jar b/kafka-schema-serializer-7.2.2.jar new file mode 100644 index 0000000..d6bb8c7 Binary files /dev/null and b/kafka-schema-serializer-7.2.2.jar differ diff --git a/flink-release-1.13.0.tar.gz b/node-16.13.2-linux-arm64.tar.gz similarity index 69% rename from flink-release-1.13.0.tar.gz rename to node-16.13.2-linux-arm64.tar.gz index b64fdbc..2f18dde 100644 Binary files a/flink-release-1.13.0.tar.gz and b/node-16.13.2-linux-arm64.tar.gz differ diff --git a/npm-8.1.2.tar.gz b/npm-8.1.2.tar.gz new file mode 100644 index 0000000..893bd9f Binary files /dev/null and b/npm-8.1.2.tar.gz differ diff --git a/release-1.12.7.tar.gz b/release-1.17.1.tar.gz similarity index 65% rename from release-1.12.7.tar.gz rename to release-1.17.1.tar.gz index 2bcc893..44a75f3 100644 Binary files a/release-1.12.7.tar.gz and b/release-1.17.1.tar.gz differ diff --git a/settings.xml b/settings.xml deleted file mode 100644 index 6ab9c83..0000000 --- a/settings.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - confluent - confluent - confluent - http://packages.confluent.io/maven - - - mapr-public - mapr-releases - mapr-releases - https://maven.aliyun.com/repository/mapr-public - - - nexus-aliyun - *,!jeecg,!jeecg-snapshots,!mapr-releases,!icm - Nexus aliyun - http://maven.aliyun.com/nexus/content/groups/public - - - - - - - - - aliyunmaven - aliyunmaven - https://maven.aliyun.com/repository/public - default - - true - - - true - - - - MavenCentral - http://repo1.maven.org/maven2/ - - - aliyunmavenApache - https://maven.aliyun.com/repository/apache-snapshots - - - - -