diff --git a/0001-use-huawei-repository.patch b/0001-use-huawei-repository.patch new file mode 100644 index 0000000000000000000000000000000000000000..73b8c5c19c059913b5b5cdb281cb5a5662754046 --- /dev/null +++ b/0001-use-huawei-repository.patch @@ -0,0 +1,17 @@ +Index: pom.xml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/pom.xml b/pom.xml +--- a/pom.xml (revision 6d321e1f03140a1b7e5a364e286dfbd969f30ba2) ++++ b/pom.xml (date 1691633613403) +@@ -2431,7 +2431,7 @@ + + central + default +- https://repo1.maven.org/maven2 ++ https://repo.huaweicloud.com/repository/maven/ + + false + diff --git a/README.en.md b/README.en.md index 418c25e08570f3ad83912f661beaab0abd9ddd9a..6c84d8e39b9499f2f3fb0ee76a12ceb209529489 100644 --- a/README.en.md +++ b/README.en.md @@ -1,7 +1,7 @@ # pulsar #### Description -Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API. +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} #### Software Architecture Software architecture description diff --git a/README.md b/README.md index a393747c5a8c9c061023ab0e57da2f9882ee9366..928b4137fc44ab2342f73514822cfae48f577d19 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ # pulsar #### 介绍 -Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API. +Apache Pulsar 是一个企业级的发布订阅(pub-sub)消息系统。向Pulsar发送数据的应用程序叫做生产者(producer),而从Pulsar读取数据的应用程序叫做消费者(consumer)。有时候消费者也被叫作订阅者。主题(topic)是Pulsar的核心资源,一个主题可以被看成是一个通道,消费者向这个通道发送数据,消费者从这个通道拉取数据。 #### 软件架构 -软件架构说明 +Apache Pulsar 集群由两层组成: +无状态服务层,由一组接收和传递消息的 Broker 组成 +有状态存储层,由一组名为 bookies 的 Apache BookKeeper 存储节点组成,可持久化地存储消息 +通过分层架构实现了存储和计算分离 +另外使用Apache Zookeeper进行元数据管理 #### 安装教程 diff --git a/apache-pulsar-2.10.4-src.tar.gz b/apache-pulsar-2.10.4-src.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a46afc10de7e0fc9b08a544ba777fda620e563fe Binary files /dev/null and b/apache-pulsar-2.10.4-src.tar.gz differ diff --git a/pulsar.spec b/pulsar.spec new file mode 100644 index 0000000000000000000000000000000000000000..b572970d5c77b718e1c3cec2af287de959146853 --- /dev/null +++ b/pulsar.spec @@ -0,0 +1,53 @@ +%define debug_package %{nil} +%define pulsar_ver 2.10.4 +%define pkg_ver 1 +%define _prefix /opt/pulsar +Summary: Cloud-Native, Distributed Messaging and Streaming +Name: pulsar +Version: %{pulsar_ver} +Release: %{pkg_ver} +License: Apache-2.0 +Group: Applications/Message +URL: https://pulsar.apache.org +Source0: https://archive.apache.org/dist/pulsar/pulsar-2.10.4/apache-pulsar-2.10.4-src.tar.gz +Patch0001: 0001-use-huawei-repository.patch +BuildRoot: /root/rpmbuild/BUILDROOT/ +BuildRequires: java-1.8.0-openjdk-devel,maven,systemd +Requires: java-1.8.0-openjdk,systemd +Provides: apache-pulsar +Provides: mvn(org.apche.pulsar:pulsar) + +%description +Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API. + +%prep +%setup -q -n apache-pulsar-%{version}-src + +%patch0001 -p1 + +%build +mvn clean install -Pcore-modules,-main -DskipTests + +%install +mkdir -p $RPM_BUILD_ROOT%{_prefix}/{lib,bin,conf,examples,instances,licenses} +cd %{_builddir}/apache-pulsar-%{version}-src/distribution/server/target/ +tar -xvf apache-pulsar-%{version}-bin.tar.gz +cd apache-pulsar-%{version} +cp -pr * $RPM_BUILD_ROOT%{_prefix} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%attr(-,pulsar,pulsar) %{_prefix} +%dir %attr(755, pulsar, pulsar) %{_prefix} + +%pre +getent group pulsar >/dev/null || groupadd -r pulsar +getent passwd pulsar >/dev/null || useradd -r -g pulsar -d / -s /sbin/nologin pulsar +exit 0 + +%changelog +* Fri Aug 11 2023 Jialing Wang - 2.10.4-1 +- init puslar spec \ No newline at end of file