blob: 3c92aa38d9981dfdd613a4b6e846f15b29729aa8 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>ShardingSphere</title>
<link>https://shardingsphere.apache.org/community/cn/</link>
<description>Recent content on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/community/cn/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>订阅指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/subscribe/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/subscribe/</guid>
<description>在使用 ShardingSphere 的过程中,如果您发现任何问题,有新的想法、建议都可以通过 Apache 邮件列表参与到 ShardingSphere 的社区建设中。
发送订阅邮件。 用自己的邮箱向 dev-subscribe@shardingsphere.apache.org 发送一封邮件,主题和内容任意。
接收确认邮件并回复。 完成步骤1后,您将收到一封来自 dev-help@shardingsphere.apache.org 的确认邮件(如未收到,请确认该邮件是否已被拦截,或已经被自动归入订阅邮件、垃圾邮件、推广邮件等文件夹)。直接回复该邮件,或点击邮件里的链接快捷回复即可,主题和内容任意。
接收欢迎邮件。 完成以上步骤后,您会收到一封主题为 WELCOME to dev@shardingsphere.apache.org 的欢迎邮件,至此您已成功订阅 Apache ShardingSphere 的邮件列表。
至此,您可以通过订阅的邮箱接收及回复邮件,或通过查看归档邮件来跟踪邮件对话。
</description>
</item>
<item>
<title>开发环境指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/establish-project/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/establish-project/</guid>
<description>安装 Git 使用最新版。
可以从 Git 下载页面 下载最新安装包。
如果你运行的是 macOS 或者 Linux 系统,那也可以从相关软件仓库直接安装。
Git 配置 如果系统是 Windows,请在克隆 ShardingSphere 代码之前完成以下配置。
在 PowerShell 或者 cmd 执行以下命令,预防克隆 ShardingSphere 代码的时候出现 filename too long 错误:
git config --global core.longpaths true 安装 JDK 使用 JDK 8 或以上版本。
可以从 OpenJDK 下载页面 下载。
可以根据自己的系统自行搜索 JDK 安装指南。
安装 Maven 可选。Maven 安装并配置好的情况下可以使用 mvn 命令,否则可以使用 mvnw 命令(自动下载并安装需要的 Maven,使用在 .mvn/wrapper/maven-wrapper.properties 配置的版本)。
使用 Maven 3.6 或以上版本。
可以从 Maven 下载页面 下载。
请参考 Maven 官方教程 完成安装。</description>
</item>
<item>
<title>贡献者指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/contributor/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/contributor/</guid>
<description>您可以报告 bug,提交一个新的功能增强建议或者直接对以上内容提交改进补丁。
提交 issue 在提交 issue 之前,请经过充分的搜索,确定该 issue 不是通过简单的检索即可以解决的问题。 查看 issue 列表,确定该 issue 不是一个重复的问题。 新建一个 issue 并选择您的 issue 类型。 使用一个清晰并有描述性的标题来定义 issue。 根据模板填写必要信息。 在提交 issue 之后,对该 issue 分配合适的标签。如:bug,enhancement,discussion 等。 请对自己提交的 issue 保持关注,在讨论中进一步提供必要信息。 开发流程 1. 准备仓库
到 ShardingSphere GitHub Repo fork 仓库到你的 GitHub 账号。
克隆到本地。
git clone https://github.com/(your_github_name)/shardingsphere.git 添加 ShardingSphere 远程仓库。
git remote add apache https://github.com/apache/shardingsphere.git git remote -v 编译并安装所有模块到 Maven 本地仓库缓存,同时会生成 ANTLR .g4 语法文件对应的解析器 Java 类,这样在 IDE 就不会有相关的编译错误了。
cd shardingsphere mvn clean install -Dmaven.</description>
</item>
<item>
<title>提交者指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/committer/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/committer/</guid>
<description>提交者提名 ShardingSphere 社区遵循 Apache Community’s process 来接收新的提交者。 当您积极地参与 ShardingSphere 社区之后,项目管理委员会和项目官方提交者会根据您的表现发起吸纳您成为官方提交者和项目管理委员会成员的流程。
提交者责任 开发新功能; 代码重构; 及时和可靠的评审 Pull Request; 思考和接纳新特性请求; 解答问题; 维护文档和代码示例; 改进流程和工具; 定期检查 CI Scheduled Workflow 是否正常运行; 引导新的参与者融入社区。 日常工作 Committer 需要每天查看社区待处理的 Pull Request 和 Issue 列表,负责问题的处理: 包括标记 issue,回复 issue,关闭 issue 等; 将 issue 分配至熟悉该模块的贡献者; Assignee 在被分配 issue 后,需要进行如下判断: 判断是否是长期 issue,如是,则标记为 pending; 判断 issue 类型,如:bug,enhancement,discussion 等; 标记 Milestone。 Committer 提交的 PR,需要根据 PR 类型和当前发布的周期标注 Label 和 Milestone。</description>
</item>
<item>
<title>开发规范</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/code-conduct/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/code-conduct/</guid>
<description>以下行为准则以完全遵循 Apache软件基金会行为准则为前提。
开发理念 用心 保持责任心和敬畏心,以工匠精神持续雕琢。 可读 代码无歧义,通过阅读而非调试手段浮现代码意图。 整洁 认同《重构》和《代码整洁之道》的理念,追求整洁优雅代码。 一致 代码风格、命名以及使用方式保持完全一致。 精简 极简代码,以最少的代码表达最正确的意思。高度复用,无重复代码和配置。及时删除无用代码。 抽象 层次划分清晰,概念提炼合理。保持方法、类、包以及模块处于同一抽象层级。 极致 拒绝随意,保证任何一行代码、任何一个字母、任何一个空格都有其存在价值。 代码提交行为规范 确保构建流程中的各个步骤都成功完成,包括:Apache 协议文件头检查、Checkstyle 检查、编译、单元测试等。构建流程启动命令:mvn -T 1C clean install 或者 ./mvnw -T 1C clean install。执行目录有 2 种选择,根据自己的熟悉程度做选择:1)对项目还不太熟悉,在项目根目录执行构建,所有模块都会执行构建,2)明确知道这次改动会影响到哪些模块,在这些模块执行构建,可以大大缩短构建时间。 确保覆盖率不低于 master 分支。 应尽量将设计精细化拆分;做到小幅度修改,多次数提交,但应保证提交的完整性。 确保遵守编码规范。 如果您使用 IDEA,可导入推荐的 src/resources/code-style-idea.xml。 通过 Spotless 统一代码风格,执行 mvn spotless:apply 格式化代码。 编码规范 使用 linux 换行符。 不应有无意义的空行。请提炼私有方法,代替方法体过长或代码段逻辑闭环而采用的空行间隔。 类、方法和变量的命名要做到顾名思义,避免使用缩写。 返回值变量使用 result 命名;循环中使用 each 命名循环变量;map 中使用 entry 代替 each。 捕获的异常名称命名为 ex ;捕获异常且不做任何事情,异常名称命名为 ignored。 配置文件使用 Spinal Case 命名(一种使用 - 分割单词的特殊 Snake Case)。 需要注释解释的代码尽量提成小方法,用方法名称解释。 equals 和 == 条件表达式中,常量在左,变量在右;大于小于等条件表达式中,变量在左,常量在右。 除了构造器入参与全局变量名称相同的赋值语句外,避免使用 this 修饰符。 除了用于继承的抽象类之外,尽量将类设计为 final。 嵌套循环尽量提成方法。 成员变量定义顺序以及参数传递顺序在各个类和方法中保持一致。 优先使用卫语句。 类和方法的访问权限控制为最小。 方法所用到的私有方法应紧跟该方法,如果有多个私有方法,书写私有方法应与私有方法在原方法的出现顺序相同。 方法入参和返回值不允许为 null。 优先使用三目运算符代替 if else 的返回和赋值语句。 优先使用 lombok 代替构造器,getter, setter 方法和 log 变量。 优先考虑使用 LinkedList,只有在需要通过下标获取集合中元素值时再使用 ArrayList。 ArrayList,HashMap 等可能产生扩容的集合类型必须指定集合初始大小,避免扩容。 日志与注释一律使用英文。 注释只能包含 javadoc,todo 和 fixme。 公开的类和方法必须有 javadoc,其他类和方法以及覆盖自父类的方法无需 javadoc。 条件运算符(&amp;lt;表达式1&amp;gt; ?</description>
</item>
<item>
<title>Issue 提交与处理规范</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/issue-conduct/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/issue-conduct/</guid>
<description>Issue 提交规范 Issue 列表以可读和可检索为目标。提交者有义务将标题总结的有意义和易于检索,并保持内容的正确和完整性; 请在经过充分的检索之后,确定无相关的已存在 Issue,再提交新的 Issue; Issue 类型划分为缺陷报告、新功能请求和问题,请在提交 Issue 时选择正确的模板并根据模板填写其内容; 由配置不确定等产生的问题,请将相关的可重现代码提交至 Github,以便于社区贡献者定位和确定问题; 请在 Issue 得到解决之后,回复该 Issue,形成闭环,为其他浏览此 Issue 的读者提供有效信息; 请及时关注已提交的 Issue,长时间无反馈的 Issue 将定期关闭; 为保证社区多元化,请使用英文参与交流。 Issue 处理规范 对于标题不明晰的 Issue,由处理人引导提交者将标题修改完善后再行处理; 对于内容缺失模板必要信息的 Issue,由处理人引导提交者将所需信息提供完善后再行处理; 涉及到缺陷修复、功能提升等与代码相关的 Issue,都将标记正确的标签以及完成此 Issue 的项目版本; 处理人将定期关闭长时间无反馈的 Issue; 无参考和检索价值的 Issue 将被标记为 status:invalid,读者无需关注。 </description>
</item>
<item>
<title>文档规范</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/document-conduct/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/document-conduct/</guid>
<description> 每个 Topic 不用写标题,GitHub 支持标题的自动生成。 每个表格要严格按照表格样式排版,以便后续人员看清楚和接手。 段落的句号结尾要换行,否则会造成某段落太长。 每个 Topic 的结尾留一空行。 每个 Topic 里面的 Title 前要空行。 每个 Topic 的文件名命名要有意义。 英文文档不要使用中文字符。 每个表头的 | 和 - 之间要加一个空格。 操作步骤均使用 1. 可自动生成序号。 Item List 前面都用“;”结尾,最后一项用“。”结尾。 中英文之间需要增加空格。 </description>
</item>
<item>
<title>官方文档贡献指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/document-contributor/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/document-contributor/</guid>
<description>如果您想帮助贡献 ShardingSphere 文档或网站,我们很乐意为您提供帮助!任何人都可以贡献,无论您是刚接触项目还是已经使用 ShardingSphere 很长时间,无论是自我认同的开发人员、最终用户,还是那些无法忍受错别字的人,都可以对文档或者网站进行贡献。
在贡献者指南里,已经提到如何提交 Issues 与 Pull Request,这里我们将要介绍如何给官方文档提交 Pull Request。
前置条件 熟悉 官方网站。 熟悉 GitHub 协同开发流程。 熟练掌握 Markdown。 熟悉 Hugo。 Fork 文档项目 Fork ShardingSphere 的 master 分支。
目录结构说明 shardingsphere ├─docs ├─community │ ├─archetypes │ ├─content │ │ ├─contribute │ │ ├─powered-by │ │ ├─security │ │ └─team │ ├─layouts │ ├─static │ └─themes ├─document │ ├─archetypes │ ├─content │ │ ├─concepts │ │ │ ├─adaptor │ │ │ ├─distsql │ │ │ ├─mode │ │ │ └─pluggable │ │ ├─dev-manual │ │ ├─downloads │ │ ├─features │ │ │ ├─encrypt │ │ │ ├─governance │ │ │ ├─readwrite-splitting │ │ │ ├─scaling │ │ │ ├─shadow │ │ │ ├─sharding │ │ │ │ ├─concept │ │ │ │ ├─principle │ │ │ │ └─use-norms │ │ │ ├─test-engine │ │ │ └─transaction │ │ │ ├─concept │ │ │ ├─principle │ │ │ └─use-norms │ │ ├─others │ │ │ ├─api-change-history │ │ │ └─faq │ │ ├─overview │ │ ├─quick-start │ │ ├─user-manual │ │ │ ├─shardingsphere-jdbc │ │ │ │ ├─configuration │ │ │ │ └─usage │ │ │ ├─shardingsphere-proxy │ │ │ ├─shardingsphere-sidecar │ │ │ └─shardingsphere-scaling │ ├─i18n │ ├─layouts │ ├─static │ └─themes 文档基础知识 ShardingSphere 文档使用 Markdown 编写,并使用 Hugo 进行处理生成 html,部署于 asf-site 分支,源代码位于 Github。</description>
</item>
<item>
<title>ShardingSphere 发布指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/release/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/release/</guid>
<description>发布前准备工作 1. 确认 Release Note Release Note 需提供中文/英文两种版本,确认中文描述是否明确,英文翻译是否准确,并按以下标签进行分类:
新功能。 API 变更。 功能增强。 重构。 漏洞修复。 2. 确认 Issue 列表 打开 Github Issues ,过滤 Milestone 为 ${RELEASE.VERSION} 且状态为打开的 Issue:
关闭已完成的 Issue; 未完成的 Issue 与负责人进行沟通,如果不影响本次发版,修改 Milestone 为下一个版本; 确认发布版本的 Milestone 下没有打开状态的 Issue。 3. 确认 Pull request 列表 打开 Github Pull requests ,过滤 Milestone 为 ${RELEASE.VERSION} 且状态为打开的 Pull request:
对打开的 Pull request 进行 Review 并且 Merge; 无法 Merge 且不影响本次发版的 Pull request,修改 Milestone 为下一个版本; 确认发布版本的 Milestone 下没有打开状态的 Pull request。 4.</description>
</item>
<item>
<title>ElasticJob 发布指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob/</guid>
<description>发布准备 GPG 设置 详情请参见发布指南。
设置 settings.xml 文件 将以下模板添加到 ~/.m2/settings.xml 中,所有密码需要加密后再填入。 加密设置可参考这里。
&amp;lt;settings&amp;gt; &amp;lt;servers&amp;gt; &amp;lt;server&amp;gt; &amp;lt;id&amp;gt;apache.snapshots.https&amp;lt;/id&amp;gt; &amp;lt;username&amp;gt; &amp;lt;!-- APACHE LDAP 用户名 --&amp;gt; &amp;lt;/username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;!-- APACHE LDAP 加密后的密码 --&amp;gt; &amp;lt;/password&amp;gt; &amp;lt;/server&amp;gt; &amp;lt;server&amp;gt; &amp;lt;id&amp;gt;apache.releases.https&amp;lt;/id&amp;gt; &amp;lt;username&amp;gt; &amp;lt;!-- APACHE LDAP 用户名 --&amp;gt; &amp;lt;/username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;!-- APACHE LDAP 加密后的密码 --&amp;gt; &amp;lt;/password&amp;gt; &amp;lt;/server&amp;gt; &amp;lt;/servers&amp;gt; &amp;lt;/settings&amp;gt; Apache Snapshot 发布 部署到 Apache Snapshot 仓库 1. 确保本地构建项目正常
./mvnw clean install 2. 部署 Snapshot 仓库
./mvnw deploy -DrepositoryId=apache.snapshots.https -T1C 3. 检查 Snapshot 仓库上传结果</description>
</item>
<item>
<title>ElasticJob-UI 发布指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob-ui/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob-ui/</guid>
<description>GPG 设置 详情请参见发布指南。
发布 Apache Maven 中央仓库 1. 设置 settings.xml 文件
将以下模板添加到 ~/.m2/settings.xml 中,所有密码需要加密后再填入。 加密设置可参考这里。
&amp;lt;settings&amp;gt; &amp;lt;servers&amp;gt; &amp;lt;server&amp;gt; &amp;lt;id&amp;gt;apache.snapshots.https&amp;lt;/id&amp;gt; &amp;lt;username&amp;gt; &amp;lt;!-- APACHE LDAP 用户名 --&amp;gt; &amp;lt;/username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;!-- APACHE LDAP 加密后的密码 --&amp;gt; &amp;lt;/password&amp;gt; &amp;lt;/server&amp;gt; &amp;lt;server&amp;gt; &amp;lt;id&amp;gt;apache.releases.https&amp;lt;/id&amp;gt; &amp;lt;username&amp;gt; &amp;lt;!-- APACHE LDAP 用户名 --&amp;gt; &amp;lt;/username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;!-- APACHE LDAP 加密后的密码 --&amp;gt; &amp;lt;/password&amp;gt; &amp;lt;/server&amp;gt; &amp;lt;/servers&amp;gt; &amp;lt;/settings&amp;gt; 2. 更新版本说明
https://github.com/apache/shardingsphere-elasticjob-ui/blob/master/RELEASE-NOTES.md 3. 创建发布分支
假设从 Github 下载的 ElasticJob-UI 源代码在 ~/elasticjob-ui/ 目录;假设即将发布的版本为 ${RELEASE.VERSION}。 创建 ${RELEASE.VERSION}-release 分支,接下来的操作都在该分支进行。
## ${name} 为源码所在分支,如:master,dev-4.</description>
</item>
<item>
<title>2FA</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/2fa/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/2fa/</guid>
<description>双因素认证(2FA) 双因子验证(2FA)是指结合密码以及实物(信用卡、SMS 手机、令牌或指纹等生物标志)两种条件对用户进行认证的方法。 为保证提交者账户的安全,我们需要您在 GitHub 上启用 2FA 来验证登录用户、并贡献代码。
具体内容可参考 2FA。
注意:若您不启用 2FA,您将会从本项目中除名,并且无法访问我们的仓库以及来自我们私有仓库的 fork 仓库。
在 GitHub 上启用 2FA 具体操作,请参考使用 TOTP 启用双因素认证。
当您开启 2FA 验证后,您需要使用用户名/密码 + 手机认证码的方式来登录 GitHub。
提示:若无法通过页面链接下载对应 APP,可在手机的应用市场或是 APP Store 里搜索并下载 Google Authenticator。
如何提交代码 当启用 2FA 认证后,您需要生成私有访问 Token 来进行 git 提交等操作。此时,您将使用用户名 + 私有访问 Token 来代替 用户名 + 密码的方式 进行代码的提交。
具体操作,请参考创建私有 Token。</description>
</item>
<item>
<title>签署 iCLA 指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/icla/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/icla/</guid>
<description>Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署 ICLA 的目的是定义向 ASF 贡献的文档,保护知识产权,避免后续法律纠纷。ICLA 在官方存档后生效,贡献者方可参与 Apache 项目。
当我们需要签署 ICLA 时步骤如下:
1. 打开链接 官网 Licenses 在 Contributor License Agreements 下找到 CLAs 并进入页面。
2. 在页面上方我们可以看到两个下载链接,选择 ICLA (个人 CLA)并下载文件。
3. 打开 PDF,ICLA 需要填写的是两个部分,均需要全英文填写。
注意事项:
姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 Committer 相关的签署,则 preferred Apache id(s) 是必填项。 4.文件最下方的署名。 官方只接受手写或者 gpg 签名,这里只建议用手写的方式,可以打印文件进行手写签名或者使用电子笔进行签字。
提交文件 如果您是新 Committer,请扫描签署后文件的所有页合并到一个 PDF 的文档,发送 email 到 secretary@apache.org。 其他情况,请联系需要您签署 ICLA 文档的负责人。 </description>
</item>
<item>
<title>提交者选举流程指南</title>
<link>https://shardingsphere.apache.org/community/cn/contribute/vote/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/community/cn/contribute/vote/</guid>
<description>提交者选举流程 1. 在 @private 邮件列表讨论并投票,投票由现有的 PMC 成员发起,邮件内容主要陈述提名者的活动和社区贡献。
例如: To:private@shardingsphere.apache.org Title: [VOTE] New committer: (提名者) Content: Hi, everyone This is ^a formal vote^ about inviting (提名者) as our new committer. He/She really made an effort to improve ShardingSphere Parser and fix many issues. The following links will direct you to his/her work. https://github.com/apache/shardingsphere/pull/6319 https://github.com/apache/shardingsphere/pull/6293 https://github.com/apache/shardingsphere/pull/6259 https://github.com/apache/shardingsphere/pull/6211 [^ means these words are subject to change in different case] 2. 等待 3*24h 社区 Committer 投票。</description>
</item>
</channel>
</rss>