blob: 1ee513ad4b48fcfc209ab13b385872148f0e537b [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[447],{845:function(e,t,a){"use strict";a.r(t);var r=a(29),i=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"工作流程"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#工作流程"}},[e._v("#")]),e._v(" 工作流程")]),e._v(" "),t("h2",{attrs:{id:"主要链接"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#主要链接"}},[e._v("#")]),e._v(" 主要链接")]),e._v(" "),t("p",[e._v("IoTDB 官网:https://iotdb.apache.org/")]),e._v(" "),t("p",[e._v("代码库:https://github.com/apache/iotdb/tree/master")]),e._v(" "),t("p",[e._v("Go语言的代码库:https://github.com/apache/iotdb-client-go")]),e._v(" "),t("p",[e._v("资源库(包含项目文件等):https://github.com/apache/iotdb-bin-resources")]),e._v(" "),t("p",[e._v("快速上手:http://iotdb.apache.org/UserGuide/master/Get%20Started/QuickStart.html")]),e._v(" "),t("p",[e._v("Jira 任务管理:https://issues.apache.org/jira/projects/IOTDB/issues")]),e._v(" "),t("p",[e._v("Wiki 文档管理:https://cwiki.apache.org/confluence/display/IOTDB/Home")]),e._v(" "),t("p",[e._v("邮件列表: https://lists.apache.org/list.html?dev@iotdb.apache.org")]),e._v(" "),t("p",[e._v("每日构建: https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/")]),e._v(" "),t("p",[e._v("Slack: https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email")]),e._v(" "),t("h2",{attrs:{id:"订阅邮件列表"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#订阅邮件列表"}},[e._v("#")]),e._v(" 订阅邮件列表")]),e._v(" "),t("p",[e._v("邮件列表是 Apache 项目进行技术讨论和用户沟通的地方,订阅邮件列表就可以收到邮件了。")]),e._v(" "),t("p",[e._v("邮件列表地址:dev@iotdb.apache.org")]),e._v(" "),t("p",[e._v("订阅方法:用想接收邮件的邮箱向 dev-subscribe@iotdb.apache.org 发一封邮件,主题内容不限,收到回复后,再次向确认地址发一封确认邮件(确认地址比较长,推荐 qq 邮箱)。")]),e._v(" "),t("p",[e._v("其他邮件列表:")]),e._v(" "),t("ul",[t("li",[e._v("notifications@iotdb.apache.org (用于接收 JIRA 通知。)\n"),t("ul",[t("li",[e._v('如果你只想接收个别感兴趣的 JIRA 通知,你不需要订阅这个列表。你只需要在 JIRA issue 页面上点击"开始关注这个 issue" 或者在这个 issue 上做评论就行了。')])])]),e._v(" "),t("li",[e._v("commits@iotdb.apache.org (任何代码改动都会通知到此处。该邮件列表邮件数量十分多,请注意。)")]),e._v(" "),t("li",[e._v("reviews@iotdb.apache.org (任何代码审阅意见都会通知到此处。该邮件列表邮件数量十分多,请注意。)")])]),e._v(" "),t("h2",{attrs:{id:"新功能、bug-反馈、改进等"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#新功能、bug-反馈、改进等"}},[e._v("#")]),e._v(" 新功能、Bug 反馈、改进等")]),e._v(" "),t("p",[e._v("所有希望 IoTDB 做的功能或修的 bug,都可以在 Jira 上提 issue")]),e._v(" "),t("p",[e._v("可以选择 issue 类型:bug、improvement、new feature 等。新建的 issue 会自动向邮件列表中同步邮件,之后的讨论可在 jira 上留言,也可以在邮件列表进行。当问题解决后请关闭 issue。")]),e._v(" "),t("h2",{attrs:{id:"邮件讨论内容-英文"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#邮件讨论内容-英文"}},[e._v("#")]),e._v(" 邮件讨论内容(英文)")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("第一次参与邮件列表可以简单介绍一下自己。(Hi, I'm xxx ...)")])]),e._v(" "),t("li",[t("p",[e._v("开发功能前可以发邮件声明一下自己想做的任务。(Hi,I'm working on issue IOTDB-XXX,My plan is ...)")])])]),e._v(" "),t("h2",{attrs:{id:"贡献文档"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#贡献文档"}},[e._v("#")]),e._v(" 贡献文档")]),e._v(" "),t("p",[e._v("IoTDB 所有官网上的内容都在项目根目录的 docs 中:")]),e._v(" "),t("ul",[t("li",[e._v("docs/SystemDesign: 系统设计文档-英文版")]),e._v(" "),t("li",[e._v("docs/zh/SystemDesign: 系统设计文档-中文版")]),e._v(" "),t("li",[e._v("docs/UserGuide: 用户手册-英文版")]),e._v(" "),t("li",[e._v("docs/zh/UserGuide: 用户手册-中文版")]),e._v(" "),t("li",[e._v("docs/Community: 社区-英文版")]),e._v(" "),t("li",[e._v("docs/zh/Community: 社区-中文版")]),e._v(" "),t("li",[e._v("docs/Development: 开发指南-英文版")]),e._v(" "),t("li",[e._v("docs/zh/Development: 开发指南-中文版")])]),e._v(" "),t("p",[e._v("官网上的版本和分支的对应关系:")]),e._v(" "),t("ul",[t("li",[e._v("In progress -> master")]),e._v(" "),t("li",[e._v("major_version.x -> rel/major_version (如 0.9.x -> rel/0.9)")])]),e._v(" "),t("p",[e._v("注意事项:")]),e._v(" "),t("ul",[t("li",[e._v("Markdown 中的图片可上传至 https://github.com/apache/iotdb-bin-resources 获得 url")])]),e._v(" "),t("h2",{attrs:{id:"代码格式化"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#代码格式化"}},[e._v("#")]),e._v(" 代码格式化")]),e._v(" "),t("p",[e._v("我们使用 "),t("a",{attrs:{href:"https://github.com/diffplug/spotless/tree/main/plugin-maven",target:"_blank",rel:"noopener noreferrer"}},[e._v("Spotless\nplugin"),t("OutboundLink")],1),e._v(" 和 "),t("a",{attrs:{href:"https://github.com/google/google-java-format",target:"_blank",rel:"noopener noreferrer"}},[e._v("google-java-format"),t("OutboundLink")],1),e._v(" 格式化 Java 代码。你可以通过以下步骤将 IDE 配置为在保存时自动应用格式以 IDEA 为例):")]),e._v(" "),t("ol",[t("li",[e._v("下载 "),t("a",{attrs:{href:"https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169",target:"_blank",rel:"noopener noreferrer"}},[e._v("google-java-format-plugin v1.7.0.5"),t("OutboundLink")],1),e._v(", 安装到 IDEA(Preferences -> plugins -> search google-java-format),"),t("a",{attrs:{href:"https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides",target:"_blank",rel:"noopener noreferrer"}},[e._v("更详细的操作手册"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v('从磁盘安装 (Plugins -> little gear icon -> "Install plugin from disk" -> Navigate to downloaded zip file)')]),e._v(" "),t("li",[e._v("开启插件,并保持默认的 GOOGLE 格式 (2-space indents)")]),e._v(" "),t("li",[e._v("在 Spotless 没有升级到 18+之前,不要升级 google-java-format 插件")]),e._v(" "),t("li",[e._v("安装 "),t("a",{attrs:{href:"https://plugins.jetbrains.com/plugin/7642-save-actions",target:"_blank",rel:"noopener noreferrer"}},[e._v("Save Actions 插件"),t("OutboundLink")],1),e._v(' , 并开启插件,打开 "Optimize imports" and "Reformat file" 选项。')]),e._v(" "),t("li",[e._v('在“Save Actions”设置页面中,将 "File Path Inclusion" 设置为 .*.java”, 避免在编辑的其他文件时候发生意外的重新格式化')])]),e._v(" "),t("h2",{attrs:{id:"编码风格"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#编码风格"}},[e._v("#")]),e._v(" 编码风格")]),e._v(" "),t("p",[e._v("我们使用 "),t("a",{attrs:{href:"https://checkstyle.sourceforge.io/config_filefilters.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("maven-checkstyle-plugin"),t("OutboundLink")],1),e._v(" 来保证所有的 Java 代码风格都遵循在项目根目录下的 "),t("a",{attrs:{href:"https://github.com/apache/iotdb/blob/master/checkstyle.xml",target:"_blank",rel:"noopener noreferrer"}},[e._v("checkstyle.xml"),t("OutboundLink")],1),e._v(" 文件中定义的规则集.")]),e._v(" "),t("p",[e._v("您可以从该文件中查阅到所有的代码风格要求。当开发完成后,您可以使用 "),t("code",[e._v("mvn validate")]),e._v(" 命令来检查您的代码是否符合代码风格的要求。")]),e._v(" "),t("p",[e._v("另外, 当您在集成开发环境开发时,可能会因为环境的默认代码风格配置导致和本项目的风格规则冲突。")]),e._v(" "),t("p",[e._v("在 IDEA 中,您可以通过如下步骤解决风格规则不一致的问题。")]),e._v(" "),t("h3",{attrs:{id:"禁用通配符引用"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#禁用通配符引用"}},[e._v("#")]),e._v(" 禁用通配符引用")]),e._v(" "),t("ol",[t("li",[e._v("跳转至 Java 代码风格配置页面 (Preferences... -> 编辑器 -> 代码风格 -> Java)。")]),e._v(" "),t("li",[e._v("切换到“导入”标签。")]),e._v(" "),t("li",[e._v("在“常规”部分,启用“使用单个类导入”选项。")]),e._v(" "),t("li",[e._v("将“将 import 与‘*’搭配使用的类计数”改成 999 或者一个比较大的值。")]),e._v(" "),t("li",[e._v("将“将静态 import 与‘*’搭配使用的名称计数”改成 999 或者一个比较大的值。")])]),e._v(" "),t("h2",{attrs:{id:"贡献代码"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#贡献代码"}},[e._v("#")]),e._v(" 贡献代码")]),e._v(" "),t("p",[e._v("可以到 jira 上领取现有 issue 或者自己创建 issue 再领取,评论说我要做这个 issue 就可以。")]),e._v(" "),t("ul",[t("li",[e._v("克隆仓库到自己的本地的仓库,clone 到本地,关联 apache 仓库为上游 upstream 仓库。")]),e._v(" "),t("li",[e._v("从 master 切出新的分支,分支名根据这个分支的功能决定,一般叫 f_new_feature(如 f_storage_engine) 或者 fix_bug(如 fix_query_cache_bug)")]),e._v(" "),t("li",[e._v("在 idea 中添加 code style 为 根目录的 java-google-style.xml")]),e._v(" "),t("li",[e._v("修改代码,增加测试用例(单元测试、集成测试)\n"),t("ul",[t("li",[e._v("集成测试参考:server/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneIT")])])]),e._v(" "),t("li",[e._v("用 "),t("code",[e._v("mvn spotless:check")]),e._v(" 检查代码样式,并用"),t("code",[e._v("mvn spotless:apply")]),e._v("修复样式")]),e._v(" "),t("li",[e._v("提交 PR, 以 [IOTDB-jira 号] 开头")]),e._v(" "),t("li",[e._v("发邮件到 dev 邮件列表:(I've submitted a PR for issue IOTDB-xxx [link])")]),e._v(" "),t("li",[e._v("根据其他人的审阅意见进行修改,继续更新,直到合并")]),e._v(" "),t("li",[e._v("关闭 jira issue")])]),e._v(" "),t("h1",{attrs:{id:"iotdb-调试方式"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#iotdb-调试方式"}},[e._v("#")]),e._v(" IoTDB 调试方式")]),e._v(" "),t("h2",{attrs:{id:"导入代码"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#导入代码"}},[e._v("#")]),e._v(" 导入代码")]),e._v(" "),t("h3",{attrs:{id:"intellij-idea"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#intellij-idea"}},[e._v("#")]),e._v(" Intellij idea")]),e._v(" "),t("p",[e._v("推荐使用 Intellij idea。"),t("code",[e._v("mvn clean package -DskipTests")])]),e._v(" "),t("p",[e._v("之后把 "),t("code",[e._v("antlr/target/generated-sources/antlr4")]),e._v(" 和 "),t("code",[e._v("thrift/target/generated-sources/thrift")]),e._v(" 标记为 "),t("code",[e._v("Source Root")]),e._v("。")]),e._v(" "),t("h3",{attrs:{id:"eclipse"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#eclipse"}},[e._v("#")]),e._v(" Eclipse")]),e._v(" "),t("p",[e._v("如果是 eclipse 2019 之前的版本,需要现在 IoTDB 根目录执行 "),t("code",[e._v("mvn eclipse:eclipse -DskipTests")]),e._v("。")]),e._v(" "),t("p",[e._v("import -> General -> Existing Projects into Workspace -> 选择 IoTDB 根目录")]),e._v(" "),t("p",[e._v("如果 eclipse 2019 之后的版本")]),e._v(" "),t("p",[e._v("import -> Maven -> Existing Maven Projects")]),e._v(" "),t("h2",{attrs:{id:"调试代码"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#调试代码"}},[e._v("#")]),e._v(" 调试代码")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("服务器主函数:"),t("code",[e._v("server/src/main/java/org/apache/iotdb/db/service/IoTDB")]),e._v(",可以 debug 模式启动")])]),e._v(" "),t("li",[t("p",[e._v("命令行界面:"),t("code",[e._v("cli/src/main/java/org/apache/iotdb/cli/")]),e._v(',linux 用 Cli,windows 用 WinCli,可以直接启动。启动时需要参数"-h 127.0.0.1 -p 6667 -u root -pw root"')])]),e._v(" "),t("li",[t("p",[e._v("服务器的 rpc 实现(主要用来客户端和服务器通信,一般在这里开始打断点):"),t("code",[e._v("server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl")])]),e._v(" "),t("ul",[t("li",[e._v("jdbc 所有语句:executeStatement(TSExecuteStatementReq req)")]),e._v(" "),t("li",[e._v("jdbc 查询语句:executeQueryStatement(TSExecuteStatementReq req)")]),e._v(" "),t("li",[e._v("native 写入接口:insertRecord(TSInsertRecordReq req)")])])]),e._v(" "),t("li",[t("p",[e._v("存储引擎 org.apache.iotdb.db.engine.StorageEngine")])]),e._v(" "),t("li",[t("p",[e._v("查询引擎 org.apache.iotdb.db.qp.Planner")])])]),e._v(" "),t("h1",{attrs:{id:"常见编译错误"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#常见编译错误"}},[e._v("#")]),e._v(" 常见编译错误")]),e._v(" "),t("h2",{attrs:{id:"无法下载-thrift-等文件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#无法下载-thrift-等文件"}},[e._v("#")]),e._v(" 无法下载 thrift-* 等文件")]),e._v(" "),t("p",[e._v("例如 "),t("code",[e._v("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")]),e._v("\n这一般是网络问题,这时候需要手动下载上述文件:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("根据以下网址手动下载上述文件;")]),e._v(" "),t("ul",[t("li",[e._v("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS")]),e._v(" "),t("li",[e._v("https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu")])])]),e._v(" "),t("li",[t("p",[e._v("将该文件拷贝到 thrift/target/tools/目录下")])]),e._v(" "),t("li",[t("p",[e._v("重新执行 maven 的编译命令")])])]),e._v(" "),t("h2",{attrs:{id:"无法下载errorprone"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#无法下载errorprone"}},[e._v("#")]),e._v(" 无法下载errorprone :")]),e._v(" "),t("div",{staticClass:"language-Failed to read artifact descriptor for com.google.errorprone:javac line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("-shaded:jar:9+181-r4173-1: Could not transfer artifact com.google.errorprone:javac-shaded:pom:9+181-r4173-1\n")])]),e._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[e._v("1")]),t("br")])]),t("ol",[t("li",[e._v("手动下载jar包: https://repo1.maven.org/maven2/com/google/errorprone/javac-shaded/9+181-r4173-1/javac-shaded-9+181-r4173-1.jar")]),e._v(" "),t("li",[e._v("将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,null,null,null);t.default=i.exports}}]);