Apache Pulsar 1.22.0源码编译

                Apache Pulsar消息组件的github地址:

    源码github地址:https://github.com/apache/incubator-pulsar

    源码压缩包下载地址:https://github.com/apache/incubator-pulsar/releases

    关于Pulsar的介绍此处不做介绍

    一、当前环境说明:

CentOS6.7 + JDK 1.8 + Maven 3.3.3(配置的是aliyun的maven代理)+Protobuf 2.5.0(编译源码使用其作为RPC框架)


    二、编译步骤:

        1、安装jdk、maven、protobuf,请参看其它相关文档,此文档不做介绍;
      2、下载源码,进行解压缩到/usr/local/src/目录,命令:tar zxvf apache-pulsar-1.22.0-incubating-src.tar.gz -C /usr/local/,进入到源码根目录,命令:cd apache-pulsar-1.22.0-incubating;

        3、使用maven编译源码,编译命令:mvn install -Dmaven.test.skip=true -X


        4、编译成功之后的压缩包目录如下图:


三、编译过程遇到的问题:

    1、需要修改/usr/local/src/apache-pulsar-1.22.0-incubating/managed-ledger/pom.xml的zookeeper依赖信息:
<dependency>
  <groupId>org.apache.zookeeper</groupId>
  <artifactId>zookeeper</artifactId>
  <version>3.4.10</version>
</dependency>
        2、修改/usr/local/src/apache-pulsar-1.22.0-incubating/pulsar-zookeeper-utils/pom.xml内容,如下(相关依赖并不完整):
<dependency>
  <groupId>org.apache.zookeeper</groupId>
  <artifactId>zookeeper</artifactId>
  <version>3.4.10</version>
</dependency>
<dependency>
  <groupId>commons-configuration</groupId>
  <artifactId>commons-configuration</artifactId>
  <version>1.6</version>
</dependency>
<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <version>2.5</version>
</dependency>
<dependency>
  <groupId>org.apache.bookkeeper.stats</groupId>
  <artifactId>bookkeeper-stats-api</artifactId>
  <version>4.3.1</version>
</dependency>
<dependency>
  <groupId>commons-codec</groupId>
  <artifactId>commons-codec</artifactId>
  <version>1.10</version>
</dependency>
        3、修改/usr/local/src/apache-pulsar-1.22.0-incubating/pulsar-broker/pom.xml内容,如下(增加):
<dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
<version>0.7.1</version>
</dependency>
        4、保证该pom文件在maven本地仓库存在,如果不存在,那么需要自己下载,命令:wget https://dl.bintray.com/yahoo/maven/com/yahoo/athenz/athenz/1.7.17/athenz-1.7.17.pom

如果需要转载,请注明文章来源地址:https://blog.csdn.net/y1170328179s/article/details/80357049
阅读更多
个人分类: 大数据组件初识
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭