| import{_ as i,r as n,o as s,c as l,a as h,d as e,e as r,b as a,f as o}from"./app-5cdcb249.js";const c={},d=e("h1",{id:"工作流程",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#工作流程","aria-hidden":"true"},"#"),r(" 工作流程")],-1),p=e("h2",{id:"主要链接",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#主要链接","aria-hidden":"true"},"#"),r(" 主要链接")],-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-docs",target:"_blank",rel:"noopener noreferrer"},f={href:"https://github.com/apache/iotdb-bin-resources",target:"_blank",rel:"noopener noreferrer"},_={href:"https://iotdb.apache.org/zh/UserGuide/V1.1.x/QuickStart/QuickStart.html",target:"_blank",rel:"noopener noreferrer"},v={href:"https://issues.apache.org/jira/projects/IOTDB/issues",target:"_blank",rel:"noopener noreferrer"},j={href:"https://cwiki.apache.org/confluence/display/IOTDB/Home",target:"_blank",rel:"noopener noreferrer"},k={href:"https://lists.apache.org/list.html?dev@iotdb.apache.org",target:"_blank",rel:"noopener noreferrer"},I={href:"https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/",target:"_blank",rel:"noopener noreferrer"},x={href:"https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email",target:"_blank",rel:"noopener noreferrer"},D=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>',12),T={href:"https://github.com/apache/iotdb-docs",target:"_blank",rel:"noopener noreferrer"},S=o('<ul><li>src/UserGuide: 用户手册-英文版</li><li>src/zh/UserGuide: 用户手册-中文版</li><li>src/Community: 社区-英文版</li><li>src/zh/Community: 社区-中文版</li><li>src/Development: 开发指南-英文版</li><li>src/zh/Development: 开发指南-中文版</li></ul><p>文档版本和文件夹的对应关系:</p><ul><li>In progress -> src/UserGuide/Master, src/zh/UserGuide/Master</li><li>major_version.x -> src/UserGuide/major_version, src/zh/UserGuide/major_version (如 1.1.x -> V1.1.x)</li></ul><p>注意事项:</p><ul><li>Markdown 中的图片可上传至 .vuepress/public/img 文件夹下,引用时使用相对路径即可。</li></ul><h2 id="代码格式化" tabindex="-1"><a class="header-anchor" href="#代码格式化" aria-hidden="true">#</a> 代码格式化</h2>',6),w={href:"https://github.com/diffplug/spotless/tree/main/plugin-maven",target:"_blank",rel:"noopener noreferrer"},y=e("br",null,null,-1),B={href:"https://github.com/google/google-java-format",target:"_blank",rel:"noopener noreferrer"},A={href:"https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169",target:"_blank",rel:"noopener noreferrer"},O={href:"https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides",target:"_blank",rel:"noopener noreferrer"},E=e("li",null,'从磁盘安装 (Plugins -> little gear icon -> "Install plugin from disk" -> Navigate to downloaded zip file)',-1),G=e("li",null,"开启插件,并保持默认的 GOOGLE 格式 (2-space indents)",-1),N=e("li",null,"在 Spotless 没有升级到 18+之前,不要升级 google-java-format 插件",-1),q={href:"https://plugins.jetbrains.com/plugin/7642-save-actions",target:"_blank",rel:"noopener noreferrer"},L=e("li",null,'在“Save Actions”设置页面中,将 "File Path Inclusion" 设置为 .*.java”, 避免在编辑的其他文件时候发生意外的重新格式化',-1),z=e("h2",{id:"编码风格",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#编码风格","aria-hidden":"true"},"#"),r(" 编码风格")],-1),C={href:"https://checkstyle.sourceforge.io/config_filefilters.html",target:"_blank",rel:"noopener noreferrer"},P={href:"https://github.com/apache/iotdb/blob/master/checkstyle.xml",target:"_blank",rel:"noopener noreferrer"},R=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><br> 这一般是网络问题,这时候需要手动下载上述文件:</p>',21),U=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"},V=e("li",null,[e("p",null,"将该文件拷贝到 thrift/target/tools/目录下")],-1),M=e("li",null,[e("p",null,"重新执行 maven 的编译命令")],-1),Q=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),H={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"},X=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 Z(W,Y){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,[r("IoTDB 官网:"),e("a",u,[r("https://iotdb.apache.org/"),a(t)])]),e("p",null,[r("代码库:"),e("a",g,[r("https://github.com/apache/iotdb/tree/master"),a(t)])]),e("p",null,[r("Go语言的代码库:"),e("a",b,[r("https://github.com/apache/iotdb-client-go"),a(t)])]),e("p",null,[r("文档库:"),e("a",m,[r("https://github.com/apache/iotdb-docs"),a(t)])]),e("p",null,[r("资源库(包含项目文件等):"),e("a",f,[r("https://github.com/apache/iotdb-bin-resources"),a(t)])]),e("p",null,[r("快速上手:"),e("a",_,[r("https://iotdb.apache.org/zh/UserGuide/V1.1.x/QuickStart/QuickStart.html"),a(t)])]),e("p",null,[r("Jira 任务管理:"),e("a",v,[r("https://issues.apache.org/jira/projects/IOTDB/issues"),a(t)])]),e("p",null,[r("Wiki 文档管理:"),e("a",j,[r("https://cwiki.apache.org/confluence/display/IOTDB/Home"),a(t)])]),e("p",null,[r("邮件列表: "),e("a",k,[r("https://lists.apache.org/list.html?dev@iotdb.apache.org"),a(t)])]),e("p",null,[r("每日构建: "),e("a",I,[r("https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/"),a(t)])]),e("p",null,[r("Slack: "),e("a",x,[r("https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email"),a(t)])]),D,e("p",null,[r("IoTDB 所有官网上的内容都在 "),e("a",T,[r("https://github.com/apache/iotdb-docs"),a(t)]),r(" 的 src 中:")]),S,e("p",null,[r("我们使用 "),e("a",w,[r("Spotless"),y,r(" plugin"),a(t)]),r(" 和 "),e("a",B,[r("google-java-format"),a(t)]),r(" 格式化 Java 代码。你可以通过以下步骤将 IDE 配置为在保存时自动应用格式以 IDEA 为例):")]),e("ol",null,[e("li",null,[r("下载 "),e("a",A,[r("google-java-format-plugin v1.7.0.5"),a(t)]),r(", 安装到 IDEA(Preferences -> plugins -> search google-java-format),"),e("a",O,[r("更详细的操作手册"),a(t)])]),E,G,N,e("li",null,[r("安装 "),e("a",q,[r("Save Actions 插件"),a(t)]),r(' , 并开启插件,打开 "Optimize imports" and "Reformat file" 选项。')]),L]),z,e("p",null,[r("我们使用 "),e("a",C,[r("maven-checkstyle-plugin"),a(t)]),r(" 来保证所有的 Java 代码风格都遵循在项目根目录下的 "),e("a",P,[r("checkstyle.xml"),a(t)]),r(" 文件中定义的规则集.")]),R,e("ul",null,[e("li",null,[U,e("ul",null,[e("li",null,[e("a",F,[r("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS"),a(t)])]),e("li",null,[e("a",J,[r("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu"),a(t)])])])]),V,M]),Q,e("ol",null,[e("li",null,[r("手动下载jar包: "),e("a",H,[r("https://repo1.maven.org/maven2/com/google/errorprone/javac-shaded/9+181-r4173-1/javac-shaded-9+181-r4173-1.jar"),a(t)])]),X])])}const $=i(c,[["render",Z],["__file","ContributeGuide.html.vue"]]);export{$ as default}; |