| import{_ as i,C as n,O as s,P as l,ah as h,Q as e,U as a,ai as r,aW as o}from"./framework-e4340ccd.js";const c={},d=e("h1",{id:"工作流程",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#工作流程","aria-hidden":"true"},"#"),a(" 工作流程")],-1),p=e("h2",{id:"主要链接",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#主要链接","aria-hidden":"true"},"#"),a(" 主要链接")],-1),u={href:"https://iotdb.apache.org/",target:"_blank",rel:"noopener noreferrer"},g={href:"https://github.com/apache/iotdb/tree/master",target:"_blank",rel:"noopener noreferrer"},b={href:"https://github.com/apache/iotdb-client-go",target:"_blank",rel:"noopener noreferrer"},m={href:"https://github.com/apache/iotdb-bin-resources",target:"_blank",rel:"noopener noreferrer"},f={href:"http://iotdb.apache.org/UserGuide/master/Get%20Started/QuickStart.html",target:"_blank",rel:"noopener noreferrer"},_={href:"https://issues.apache.org/jira/projects/IOTDB/issues",target:"_blank",rel:"noopener noreferrer"},v={href:"https://cwiki.apache.org/confluence/display/IOTDB/Home",target:"_blank",rel:"noopener noreferrer"},j={href:"https://lists.apache.org/list.html?dev@iotdb.apache.org",target:"_blank",rel:"noopener noreferrer"},k={href:"https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/",target:"_blank",rel:"noopener noreferrer"},I={href:"https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email",target:"_blank",rel:"noopener noreferrer"},x=o('<h2 id="订阅邮件列表" tabindex="-1"><a class="header-anchor" href="#订阅邮件列表" aria-hidden="true">#</a> 订阅邮件列表</h2><p>邮件列表是 Apache 项目进行技术讨论和用户沟通的地方,订阅邮件列表就可以收到邮件了。</p><p>邮件列表地址:dev@iotdb.apache.org</p><p>订阅方法:用想接收邮件的邮箱向 <a href="mailto:dev-subscribe@iotdb.apache.org">dev-subscribe@iotdb.apache.org</a> 发一封邮件,主题内容不限,收到回复后,再次向确认地址发一封确认邮件(确认地址比较长,推荐 qq 邮箱)。</p><p>其他邮件列表:</p><ul><li><a href="mailto:notifications@iotdb.apache.org">notifications@iotdb.apache.org</a> (用于接收 JIRA 通知。) <ul><li>如果你只想接收个别感兴趣的 JIRA 通知,你不需要订阅这个列表。你只需要在 JIRA issue 页面上点击"开始关注这个 issue" 或者在这个 issue 上做评论就行了。</li></ul></li><li><a href="mailto:commits@iotdb.apache.org">commits@iotdb.apache.org</a> (任何代码改动都会通知到此处。该邮件列表邮件数量十分多,请注意。)</li><li><a href="mailto:reviews@iotdb.apache.org">reviews@iotdb.apache.org</a> (任何代码审阅意见都会通知到此处。该邮件列表邮件数量十分多,请注意。)</li></ul><h2 id="新功能、bug-反馈、改进等" tabindex="-1"><a class="header-anchor" href="#新功能、bug-反馈、改进等" aria-hidden="true">#</a> 新功能、Bug 反馈、改进等</h2><p>所有希望 IoTDB 做的功能或修的 bug,都可以在 Jira 上提 issue</p><p>可以选择 issue 类型:bug、improvement、new feature 等。新建的 issue 会自动向邮件列表中同步邮件,之后的讨论可在 jira 上留言,也可以在邮件列表进行。当问题解决后请关闭 issue。</p><h2 id="邮件讨论内容-英文" tabindex="-1"><a class="header-anchor" href="#邮件讨论内容-英文" aria-hidden="true">#</a> 邮件讨论内容(英文)</h2><ul><li><p>第一次参与邮件列表可以简单介绍一下自己。(Hi, I'm xxx ...)</p></li><li><p>开发功能前可以发邮件声明一下自己想做的任务。(Hi,I'm working on issue IOTDB-XXX,My plan is ...)</p></li></ul><h2 id="贡献文档" tabindex="-1"><a class="header-anchor" href="#贡献文档" aria-hidden="true">#</a> 贡献文档</h2><p>IoTDB 所有官网上的内容都在项目根目录的 docs 中:</p><ul><li>docs/SystemDesign: 系统设计文档-英文版</li><li>docs/zh/SystemDesign: 系统设计文档-中文版</li><li>docs/UserGuide: 用户手册-英文版</li><li>docs/zh/UserGuide: 用户手册-中文版</li><li>docs/Community: 社区-英文版</li><li>docs/zh/Community: 社区-中文版</li><li>docs/Development: 开发指南-英文版</li><li>docs/zh/Development: 开发指南-中文版</li></ul><p>官网上的版本和分支的对应关系:</p><ul><li>In progress -> master</li><li>major_version.x -> rel/major_version (如 0.9.x -> rel/0.9)</li></ul><p>注意事项:</p>',17),D={href:"https://github.com/apache/iotdb-bin-resources",target:"_blank",rel:"noopener noreferrer"},T=e("h2",{id:"代码格式化",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#代码格式化","aria-hidden":"true"},"#"),a(" 代码格式化")],-1),S={href:"https://github.com/diffplug/spotless/tree/main/plugin-maven",target:"_blank",rel:"noopener noreferrer"},y={href:"https://github.com/google/google-java-format",target:"_blank",rel:"noopener noreferrer"},w={href:"https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169",target:"_blank",rel:"noopener noreferrer"},B={href:"https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides",target:"_blank",rel:"noopener noreferrer"},O=e("li",null,'从磁盘安装 (Plugins -> little gear icon -> "Install plugin from disk" -> Navigate to downloaded zip file)',-1),A=e("li",null,"开启插件,并保持默认的 GOOGLE 格式 (2-space indents)",-1),E=e("li",null,"在 Spotless 没有升级到 18+之前,不要升级 google-java-format 插件",-1),G={href:"https://plugins.jetbrains.com/plugin/7642-save-actions",target:"_blank",rel:"noopener noreferrer"},N=e("li",null,'在“Save Actions”设置页面中,将 "File Path Inclusion" 设置为 .*.java”, 避免在编辑的其他文件时候发生意外的重新格式化',-1),q=e("h2",{id:"编码风格",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#编码风格","aria-hidden":"true"},"#"),a(" 编码风格")],-1),C={href:"https://checkstyle.sourceforge.io/config_filefilters.html",target:"_blank",rel:"noopener noreferrer"},L={href:"https://github.com/apache/iotdb/blob/master/checkstyle.xml",target:"_blank",rel:"noopener noreferrer"},P=o('<p>您可以从该文件中查阅到所有的代码风格要求。当开发完成后,您可以使用 <code>mvn validate</code> 命令来检查您的代码是否符合代码风格的要求。</p><p>另外, 当您在集成开发环境开发时,可能会因为环境的默认代码风格配置导致和本项目的风格规则冲突。</p><p>在 IDEA 中,您可以通过如下步骤解决风格规则不一致的问题。</p><h3 id="禁用通配符引用" tabindex="-1"><a class="header-anchor" href="#禁用通配符引用" aria-hidden="true">#</a> 禁用通配符引用</h3><ol><li>跳转至 Java 代码风格配置页面 (Preferences... -> 编辑器 -> 代码风格 -> Java)。</li><li>切换到“导入”标签。</li><li>在“常规”部分,启用“使用单个类导入”选项。</li><li>将“将 import 与‘*’搭配使用的类计数”改成 999 或者一个比较大的值。</li><li>将“将静态 import 与‘*’搭配使用的名称计数”改成 999 或者一个比较大的值。</li></ol><h2 id="贡献代码" tabindex="-1"><a class="header-anchor" href="#贡献代码" aria-hidden="true">#</a> 贡献代码</h2><p>可以到 jira 上领取现有 issue 或者自己创建 issue 再领取,评论说我要做这个 issue 就可以。</p><ul><li>克隆仓库到自己的本地的仓库,clone 到本地,关联 apache 仓库为上游 upstream 仓库。</li><li>从 master 切出新的分支,分支名根据这个分支的功能决定,一般叫 f_new_feature(如 f_storage_engine) 或者 fix_bug(如 fix_query_cache_bug)</li><li>在 idea 中添加 code style 为 根目录的 java-google-style.xml</li><li>修改代码,增加测试用例(单元测试、集成测试) <ul><li>集成测试参考:server/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneIT</li></ul></li><li>用 <code>mvn spotless:check</code> 检查代码样式,并用<code>mvn spotless:apply</code>修复样式</li><li>提交 PR, 以 [IOTDB-jira 号] 开头</li><li>发邮件到 dev 邮件列表:(I've submitted a PR for issue IOTDB-xxx [link])</li><li>根据其他人的审阅意见进行修改,继续更新,直到合并</li><li>关闭 jira issue</li></ul><h1 id="iotdb-调试方式" tabindex="-1"><a class="header-anchor" href="#iotdb-调试方式" aria-hidden="true">#</a> IoTDB 调试方式</h1><h2 id="导入代码" tabindex="-1"><a class="header-anchor" href="#导入代码" aria-hidden="true">#</a> 导入代码</h2><h3 id="intellij-idea" tabindex="-1"><a class="header-anchor" href="#intellij-idea" aria-hidden="true">#</a> Intellij idea</h3><p>推荐使用 Intellij idea。<code>mvn clean package -DskipTests</code></p><p>之后把 <code>antlr/target/generated-sources/antlr4</code> 和 <code>thrift/target/generated-sources/thrift</code> 标记为 <code>Source Root</code>。</p><h3 id="eclipse" tabindex="-1"><a class="header-anchor" href="#eclipse" aria-hidden="true">#</a> Eclipse</h3><p>如果是 eclipse 2019 之前的版本,需要现在 IoTDB 根目录执行 <code>mvn eclipse:eclipse -DskipTests</code>。</p><p>import -> General -> Existing Projects into Workspace -> 选择 IoTDB 根目录</p><p>如果 eclipse 2019 之后的版本</p><p>import -> Maven -> Existing Maven Projects</p><h1 id="常见编译错误" tabindex="-1"><a class="header-anchor" href="#常见编译错误" aria-hidden="true">#</a> 常见编译错误</h1><h2 id="无法下载-thrift-等文件" tabindex="-1"><a class="header-anchor" href="#无法下载-thrift-等文件" aria-hidden="true">#</a> 无法下载 thrift-* 等文件</h2><p>例如 <code>Could not get content org.apache.maven.wagon.TransferFailedException: Transfer failed for https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu</code> 这一般是网络问题,这时候需要手动下载上述文件:</p>',21),R=e("p",null,"根据以下网址手动下载上述文件;",-1),F={href:"https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS",target:"_blank",rel:"noopener noreferrer"},J={href:"https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu",target:"_blank",rel:"noopener noreferrer"},z=e("li",null,[e("p",null,"将该文件拷贝到 thrift/target/tools/目录下")],-1),U=e("li",null,[e("p",null,"重新执行 maven 的编译命令")],-1),M=o(`<h2 id="无法下载errorprone" tabindex="-1"><a class="header-anchor" href="#无法下载errorprone" aria-hidden="true">#</a> 无法下载errorprone :</h2><div class="language-Failed line-numbers-mode" data-ext="Failed"><pre class="language-Failed"><code>-shaded:jar:9+181-r4173-1: Could not transfer artifact com.google.errorprone:javac-shaded:pom:9+181-r4173-1 |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,2),V={href:"https://repo1.maven.org/maven2/com/google/errorprone/javac-shaded/9+181-r4173-1/javac-shaded-9+181-r4173-1.jar",target:"_blank",rel:"noopener noreferrer"},H=e("li",null,"将jar包安装到本地私仓库 : mvn install:install-file -DgroupId=com.google.errorprone -DartifactId=javac-shaded -Dversion=9+181-r4173-1 -Dpackaging=jar -Dfile=D:\\workspace\\iotdb-master\\docs\\javac-shaded-9+181-r4173-1.jar",-1);function Q(W,X){const t=n("ExternalLinkIcon");return s(),l("div",null,[h(` |
| |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| `),d,p,e("p",null,[a("IoTDB 官网:"),e("a",u,[a("https://iotdb.apache.org/"),r(t)])]),e("p",null,[a("代码库:"),e("a",g,[a("https://github.com/apache/iotdb/tree/master"),r(t)])]),e("p",null,[a("Go语言的代码库:"),e("a",b,[a("https://github.com/apache/iotdb-client-go"),r(t)])]),e("p",null,[a("资源库(包含项目文件等):"),e("a",m,[a("https://github.com/apache/iotdb-bin-resources"),r(t)])]),e("p",null,[a("快速上手:"),e("a",f,[a("http://iotdb.apache.org/UserGuide/master/Get Started/QuickStart.html"),r(t)])]),e("p",null,[a("Jira 任务管理:"),e("a",_,[a("https://issues.apache.org/jira/projects/IOTDB/issues"),r(t)])]),e("p",null,[a("Wiki 文档管理:"),e("a",v,[a("https://cwiki.apache.org/confluence/display/IOTDB/Home"),r(t)])]),e("p",null,[a("邮件列表: "),e("a",j,[a("https://lists.apache.org/list.html?dev@iotdb.apache.org"),r(t)])]),e("p",null,[a("每日构建: "),e("a",k,[a("https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/"),r(t)])]),e("p",null,[a("Slack: "),e("a",I,[a("https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email"),r(t)])]),x,e("ul",null,[e("li",null,[a("Markdown 中的图片可上传至 "),e("a",D,[a("https://github.com/apache/iotdb-bin-resources"),r(t)]),a(" 获得 url")])]),T,e("p",null,[a("我们使用 "),e("a",S,[a("Spotless plugin"),r(t)]),a(" 和 "),e("a",y,[a("google-java-format"),r(t)]),a(" 格式化 Java 代码。你可以通过以下步骤将 IDE 配置为在保存时自动应用格式以 IDEA 为例):")]),e("ol",null,[e("li",null,[a("下载 "),e("a",w,[a("google-java-format-plugin v1.7.0.5"),r(t)]),a(", 安装到 IDEA(Preferences -> plugins -> search google-java-format),"),e("a",B,[a("更详细的操作手册"),r(t)])]),O,A,E,e("li",null,[a("安装 "),e("a",G,[a("Save Actions 插件"),r(t)]),a(' , 并开启插件,打开 "Optimize imports" and "Reformat file" 选项。')]),N]),q,e("p",null,[a("我们使用 "),e("a",C,[a("maven-checkstyle-plugin"),r(t)]),a(" 来保证所有的 Java 代码风格都遵循在项目根目录下的 "),e("a",L,[a("checkstyle.xml"),r(t)]),a(" 文件中定义的规则集.")]),P,e("ul",null,[e("li",null,[R,e("ul",null,[e("li",null,[e("a",F,[a("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS"),r(t)])]),e("li",null,[e("a",J,[a("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu"),r(t)])])])]),z,U]),M,e("ol",null,[e("li",null,[a("手动下载jar包: "),e("a",V,[a("https://repo1.maven.org/maven2/com/google/errorprone/javac-shaded/9+181-r4173-1/javac-shaded-9+181-r4173-1.jar"),r(t)])]),H])])}const Y=i(c,[["render",Q],["__file","ContributeGuide.html.vue"]]);export{Y as default}; |