NingG +



本来今天晚上想浏览一下flume官网的,不过突然看到How to Get Involved,再看看那些贡献了代码的名单,很是羡慕,我这个人爱吹牛,如果我也在名单中,那岂不又能吹牛一把?哈哈~想想都能笑出声。另一方面,用过的开源工具不少,但是如何参与到开源项目中,我还真不知道,碰巧在看flume官网,那就看看如何参与到flume这个开源项目中去吧。

官方原文地址:How to Contribute,本文使用英文原文+中文注释方式来写。


Welcome contributors! We strive to include everyone’s contributions. This page provides necessary guidelines on how to contribute effectively towards furthering the development and evolution of Flume. You should also read the guide on setting up Development Environment where you will find details on how to checkout, build and test Flume. (如何下载源码、编译源码、测试源码,需要先阅读Development Environment。)

Note: This guide applies to general contributors. If you are a committer, please read the How to Commit as well. (committer还需阅读How to Commit

What can be contributed?

There are many ways you can contribute towards the project. A few of these are:(参与方式,有如下几种)


Providing Patches

In order to provide patches, follow these guidelines:

$ git diff > /path/to/FLUME-1234-0.patch

$ cd ~/src/flume # or wherever you keep the root of your Flume source tree
$ patch -p1 < FLUME-1234.patch


Reviewing Code

Flume uses the Apache Review Board for doing code reviews. In order for a change to be reviewed, it should be either posted on the review board or attached to the JIRA. If the change is a minor change affecting only few lines and does not seem to impact main logic of the affected sources, it need not be posted on the review board. However, if the code change is large or otherwise impacting the core logic of the affected sources, it should be posted on the review board. Feel free to comment on the JIRA requesting the assignee to post the patch for review on review board.(小改动的patch,贴在JIRA上就好了;涉及核心代码的patch,应同时在JIRA和review board上贴出来。)

Note: Not all patches attached to a JIRA are ready for review. Sometimes the patches are attached just to solicit early feedback regarding the implementation direction. Feel free to look it over and give your feedback in the JIRA as necessary. Patches are considered ready for review either when the patch has been posted on review board, or the JIRA status has been changed to ‘Patch Available’. Find here a list of Flume JIRAs marked Patch Available. (patch有时候are not ready for review,只是为了征求意见,看看实现的方向对不对)

Goals for Code Reviews

The net outcome from the review should be the same - which is to ensure the following:

Code review guidelines

Following are some guidelines on how to do a code review. You may use any other approach instead as long as the above stated goals are met. That said, here is an approach that works fine generally:

How to give feedback

Once you have collected your comments/concerns/feedback you need to send it to back to the contributor. In doing so, please be as courteous as possible and ensure the following:

Once you have provided your feedback, wait for the developer to respond. It is possible that the developer may need further clarification on your feedback, in which case you should promptly provide it where necessary. In general, the dialog between the reviewer and developer should lead to finding a reasonable middle ground where key concerns are satisfied and the goals of the review have been met.

If a change has met all your criteria for review, please +1 the change to indicate that you are happy with it.(如果代码让你满意,请点击+1)


How to contribute中提到了各种规范、细节,这些就是参与开源项目的基本准则,大家都按照这个准则来操作,才能保证开源项目的顺利进行。想到了Robbin的一句话:Small is beautiful, constraint is liberty.

微信公众号 ningg, 联系我


微信搜索: 公众号 ningg, 联系我, 交个朋友.