如何成为一名优质的 Contributor

关于本文

 本文主要是为了,记录给 Druid-io / Apache Eagle / Apache Flink / Apache HBase / Apache Kafka / Apache Superset / Apache Zookeeper / TensorFlow 开源社区贡献代码,尽自己一点绵薄之力的过程

 文章最后一节,是一些经验之谈,期冀能帮助到 同样热爱开源、也想成为 Contributor 的小伙伴们

开源贡献纪实

Druid-io / Druid

Pull Request

Title Status Create Date Merge Date
Some code refactor for better performance of Avro-Extension #4092 Merged 2017-03-22 2017-04-25
Explain Avro´s unnecessary EOFException (#4098) #4100 Merged 2017-03-23 2017-03-24
Improve collection related things that reusing a immutable object instead of creating a new object #4135 Merged 2017-03-30 2017-05-17
Increment the resource of JVM and the number of threads in Travis instead of default #4139 Open 2017-03-31
Update outdated RLE paper and improve some code refactoring #4286 Merged 2017-05-17 2017-05-19

Issues

All issues in Druid
Open / Close / Total : 1 / 3 / 4


Apache / Eagle

Pull Request

Title Status Create Date Merge Date
[EAGLE-981] GC overhead limit exceeded #896 Merged 2017-03-30 2017-04-18
[EAGLE-982] The log length has exceeded the limit of 4 MB in Travis #897 Merged 2017-03-30 2017-04-18
[EAGLE-992] HBase Naming that unify Hbase and HBase into HBase#905 Merged 2017-04-06 2017-04-18
[EAGLE-1009] Fix return inside finally block may result in losing exception #920 Merged 2017-04-18 2017-04-19
[MINOR] Fix some project construction problems about test sources #922 Open 2017-04-19
[EAGLE-1012] Some language level problems #925 Open 2017-04-19
[MINOR] Fxi sprk/egle issues in JPM module #943 Open 2017-06-07

Issues

All issues in Eagle
Open / Close / Total : 5 / 4 / 9


Pull Request

Title Status Create Date Merge Date
FLINK-6868[build] Using scala.binary.version for flink-streaming-scala in Cassandra Connector #4087 Merged 2017-06-08 2017-06-25
FLINK-7369: Add more information for Key group index out of range of key group range exception #4474 Merged 2017-08-04 2017-08-04

Issues

All issues in Flink
Open / Close / Total : 1 / 1 / 2

Tips: How to Contribute to Flink


Apache / Flume

Pull Request

Title Status Create Date Merge Date
Using volatile + ConcurrentHashMap + LongAdder instead of syncrhonzied + HashMap + AtomicLong for CounterGroup #194 Open 2018-01-17

Tips: How to Contribute to Flume


Apache / HBase

Pull Request

Title Status Create Date Merge Date
HBASE-18470: Fix a bug in RetriesExhaustedWithDetailsException#getDesc describe#56 Merged 2017-07-28 2017-08-03

Apache / Kafka

Pull Request

Title Status Create Date Merge Date
[MINOR] Improve runtime / storage / metrics / config parts #4525 Merged 2018-02-05 2018-02-14
MINOR: Catch null pointer exception for empty leader URL when assignment is null #4798 Open 2018-03-30
MINOR: Remove magic number and extract Pattern instance from method as class field #4799 Merged 2018-03-30 2018-04-09

Landoop / Kafka-Connect-UI

Pull Request

Title Status Create Date Merge Date
Fix #69 Cannot parse automatically the right configurations in PROPERTIES mode when we create a new connector #70 Merged 2018-03-13 2018-03-16
Add new feature: restart task #72 Merged 2018-03-16 2018-03-21

Issues

All issues in Kafka-Connect-UI


Apache / Phoenix

Pull Request

Title Status Create Date Merge Date
PHOENIX-3961 Should delete tableOutputPath in completebulkload #264 Open 2017-06-20

Apache / Superset

Pull Request

Title Status Create Date Merge Date
little code refactor in models.py #2124 Merged 2017-02-07 2017-02-07
Fix werkzeug instance was created twice in Debug Mode (#2135) #2136 Merged 2017-02-08 2017-02-14
Fix ExtDeprecationWarning (#2137) #2138 Merged 2017-02-08 2017-02-09
Some code refactoring #2139 Merged 2017-02-08 2017-02-09
Using the time zone with specific name for querying Druid #2143 Merged 2017-02-09 2017-02-10
Aggregate data outside of topN into a single category #2176 Open 2017-02-15
Fix UNKNOWN option in setup.py #2199 Open 2017-02-17
fix timezone issues in slices (#2354) #2370 Open 2017-03-08
Fix unicode issues (#2308 #2282) #2401 Merged 2017-03-14 2017-03-15
Fix rst grammar problems #4116 Merged 2017-12-26 2017-12-26
Fix invaild gitter url #4125 Merged 2017-12-27 2018-01-05
Hanization #4126 Merged 2017-12-27 2018-01-13

Issues

All issues in Superset
Open / Close / Total : 13 / 7 / 20


Apache / Zookeeper

Pull Request

Title Status Create Date Merge Date
ZOOKEEPER-2784: Add same sid config problem check #257 Open 2017-05-18
ZOOKEEPER-2789: Reassign ZXID for solving 32bit overflow problem #262 Open 2017-05-23
ZOOKEEPER-2815: 1. Using try clause to close resource; 2. Others code refactoring for PERSISTENCE module #283 Merged 2017-06-16 2017-06-26
ZOOKEEPER-2816: Code refactoring for ZK_SERVER module #288 Merged 2017-06-20 2017-06-26
ZOOKEEPER-2817: Using Collections.singletonList instead of Arrays.asList(oneElement) #290 Open 2017-06-22
ZOOKEEPER-2821: 1. Fix spell issues; 2. Remove unnecessary boxing / unboxing; 3. Simplify return clause; 4. … #293 Open 2017-06-27
ZOOKEEPER-2822: Wrong ObjectName about MBeanServer in JMX module #294 Open 2017-06-27
ZOOKEEPER-2823: 1. Fix spell issues; 2. Standardize StringBuilder#append usage; 3. Using try clause for … #295 Open 2017-06-28
ZOOKEEPER-2824: FileChannel#size info should be added to FileTxnLog#commit to solve the confuse that reason is too large log or too busy disk I/O #296 Merged 2017-06-28 2018-02-02
ZOOKEEPER-2825: 1. Remove unnecessary import; 2. contains instead of indexOf > -1 for more readable … #297 Open 2017-06-29
ZOOKEEPER-2826: Code refactoring for CLI module #298 Open 2017-06-29
ZOOKEEPER-2835: Run server with -XX:+AlwaysPreTouch jvm flag #301 Open 2017-07-04
ZOOKEEPER-2837: Add a special START_SERVER_JVMFLAGS option only for start command to distinguish … #302 Open 2017-07-04
ZOOKEEPER-2840: Should using System.nanoTime() ^ this.hashCode() for StaticHostProvider #303 Open 2017-07-05
ZOOKEEPER-2892: Improve lazy initialize and close stream for PrepRequestProcessor #361 Open 2017-09-06

Issues

All issues in Zookeeper
Open / Close / Total : 15 / 3 / 18


Tensorflow / Tensorflow

Pull Request

Title Status Create Date Merge Date
Add .idea/** into .gitignore for JetBrains IDE #12094 Merged 2017-08-08 2017-08-10

如何成为一名优质的 Contributor

通用技巧

保持 Diff 信息最简

 PR 中不应该做无关的 Code Format(import / 代码缩进 等)

保持 PR 的相关性

 不做无关的 代码优化,尤其是对其他不相关的类(可以另起 PR 进行优化)

保持 代码风格一致

 关闭 IDE 自动优化 import 合并为通配符 * 的功能(如,import java.io.* 等)

因地制宜

Druid-io

 遵照 Druid 编码规则,比如 参数列表,需要分行写 等

Apache Eagle

 Apache Eagle 需要 squash PR 中的 commits 等等

Apache HBase

 HBase 是以 Patch + Jira 为主的代码维护模式,Github 里面只是代码镜像,所以提交代码不需要创建 PR

Aapche Superset

 Superset / Tensorflow 之类的 Python 项目,需要注意 PEP 规范

Apache Zookeeper

 参照官方给出的提交代码的文档即可 How to Contribute to Zookeeper

好的习惯

  • 在提交之前,先更新 master 分支,并通过 git rebase -i master 命令,将自己的提交置顶(主分支,也可能不叫 master,比如 Kafka 的主分支是 trunk)
  • 保证自己的代码,能够被单元测试覆盖到。如果原本的测试用例,无法覆盖到,则需要自己编写对应的单元测试
  • 提交性能提升型 PR,需要自己写好 benchmark,并贴出压测结果

小技巧

  • 提交 PR 的时候,在标题的前面增加 [JIRA](对应的 Jira 号)、[MINOR](微小的改动) 和 [WIP](未完成的修改) 之类的标示,可以帮助 Committer 更高效地处理 PR

Tips: 关于 Git 的相关操作,详见我的另一篇博客:《Git 高级玩法》

更多资源,欢迎加入,一起交流学习

Technical Discussion Group:(人工智能 1020982(高级)& 1217710(进阶)| BigData 1670647)


Post author:Benedict Jin
Post link: https://yuzhouwan.com/posts/19631/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.

你可能感兴趣的:(开源社区)