🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Contributing to Apache Zeppelin ( Code ) ( 向 Apache Zeppelin 贡献( 代码 ) ) 原文链接 : [http://zeppelin.apache.org/docs/0.7.2/development/howtocontribute.html](http://zeppelin.apache.org/docs/0.7.2/development/howtocontribute.html) 译文链接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10031118](http://www.apache.wiki/pages/viewpage.action?pageId=10031118) 贡献者 : [小瑶](/display/~chenyao) [ApacheCN](/display/~apachecn) [Apache中文网](/display/~apachechina) 注意 **Apache Zeppelin** 是 **[Apache2 License](http://www.apache.org/licenses/LICENSE-2.0.html)** 软件。对 **Zeppelin** (源代码,文档,图像,网站)的任何贡献意味着您同意许可协议作为 **Apache2 license**。 ## 配置 以下是您需要 构建 和 测试 **Zeppelin** 的一些工具。 ### Software Configuration Management ( SCM ) ( 软件配置管理 ) 由于 **Zeppeli** 使用 **Git** 作为其 **SCM** 系统,因此您需要在开发机器中安装 **git** 客户端。 ### Integrated Development Environment ( IDE ) ( 集成开发环境 ) 您可以随意使用任何您喜欢的 **IDE** ,或者您最喜爱的命令行编辑器。 ### Build Tools ( 构建工具 ) 要构建代码,请安装 * Oracle Java 7 * Apache Maven ## Getting the source code ( 获得源代码 ) 首先,您需要 **Zeppelin** 源代码。 **Zeppelin** 的官方位置是  [http://git.apache.org/zeppelin.git](http://git.apache.org/zeppelin.git) 。 ### git access 使用 **git** 获取开发机器上的源代码。 ``` git clone git://git.apache.org/zeppelin.git zeppelin ``` 您可能还想针对特定的分支开发。例如,对于 **branch-0.5.6 ** ``` git clone -b branch-0.5.6 git://git.apache.org/zeppelin.git zeppelin ``` **Apache Zeppelin** 遵循 **[Fork&Pull](https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/Development-workflow-with-Git:-Fork,-Branching,-Commits,-and-Pull-Request)**作为源代码管理工作流程。如果您不仅要构建 **Zeppelin** ,还可以进行任何更改,那么您需要 **fork** [**Zeppelin github** 镜像存储库](https://github.com/apache/zeppelin)并进行 **pull** 请求。 ### Build ( 建立 ) ``` mvn install ``` 跳过测试 ``` mvn install -DskipTests ``` 用特定的 **spark / hadoop** 版本来构建 ``` mvn install -Dspark.version=x.x.x -Dhadoop.version=x.x.x ``` 为了进一步 ### Run Zeppelin server in development mode ( 在开发模式下运行 Zeppelin 服务器 ) ``` cd zeppelin-server HADOOP_HOME=YOUR_HADOOP_HOME JAVA_HOME=YOUR_JAVA_HOME mvn exec:java -Dexec.mainClass="org.apache.zeppelin.server.ZeppelinServer" -Dexec.args="" ``` 注意 确保您首先在 **zeppelin** 根目录上运行 **mvn clean install -DskipTests** ,否则您的服务器构建将无法在本地重现中找到所需的依赖关系。 或使用 **daemon script** ( 守护程序脚本 ) ``` bin/zeppelin-daemon start ``` 服务器将在 **http:// localhost:8080** 上运行。 ### Generating Thrift Code ( 生成 Thrift 代码 ) [Thrift](http://thrift.apache.org/) 生成 **Zeppelin** 代码的一些部分。对于大多数的 **Zeppelin** 更改,您不需要担心这一点。但是如果您修改任何 **Thrift IDL** 文件(例如 **zeppelin-interpreter / src / main / thrift / *.thrift** ),那么您还需要重新生成这些文件,并将其更新的版本作为补丁的一部分提交。 要重新生成代码,请安装 **thrift-0.9.2** ,然后运行以下命令生成 **thrift **代码。 ``` cd <zeppelin_home>/zeppelin-interpreter/src/main/thrift ./genthrift.sh ``` ## Where to Start ( 从哪儿开始 ) 你可以找到 **[beginner & newbie](https://issues.apache.org/jira/browse/ZEPPELIN-981?jql=project%20%3D%20ZEPPELIN%20AND%20labels%20in%20(beginner%2C%20newbie))** ( 初学者和新手 )的问题. ## Stay involved ( 保持参与 ) 贡献者应加入 **Zeppelin mailing lists** 。 * [dev@zeppelin.apache.org](mailto:dev@zeppelin.apache.org)适用于想向 **Zeppelin** 提供代码的人员。订阅,取消订阅,存档。 如果您有任何问题,请在 JIRA 中创建一张 **ticket** 。