Skip to main content

IoTDB Working Process

About 5 min

IoTDB Working Process

IoTDB official website:https://iotdb.apache.org/open in new window

Code library:https://github.com/apache/iotdbopen in new window

Code library for go language: https://github.com/apache/iotdb-client-goopen in new window

Docs library:https://github.com/apache/iotdb-docsopen in new window

Library for resources (project's documents, compiler, etc): https://github.com/apache/iotdb-bin-resourcesopen in new window

Get started quickly:http://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.htmlopen in new window

Jira Task Management:https://issues.apache.org/jira/projects/IOTDB/issuesopen in new window

Wiki Document Management:https://cwiki.apache.org/confluence/display/IOTDB/Home\open in new window

Mailing list: https://lists.apache.org/list.html?dev@iotdb.apache.orgopen in new window

Everyday build: https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/open in new window

Slack: https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/emailopen in new window

Subscribe to mailing list

The mailing list is where the Apache project conducts technical discussions and communication with users. Follow the mailing list to receive mail.

Mailing list address:dev@iotdb.apache.org

Follow method: Send an email to dev-subscribe@iotdb.apache.org with the email you want to receive the email, the subject content is not limited, after receiving the reply, send a confirmation email to the confirmation address again (the confirmation address is longer, it is recommended gmail mailbox).

Other mailing list:

  • notifications@iotdb.apache.org (for JIRA information notification.)
    • If you only want to receive individual Jira notifications that you are interest in, you do not need to subscribe this mailing list. Instead, you just need to click "start-watching this issue" on the jira issue webpage or just comment on this issue.
  • commits@iotdb.apache.org (Any code changes will be notified here, please note that this mailing list will be very large)
  • reviews@iotdb.apache.org (Any code review comments will be notified here, please note that this mailing list will be very large)

New features, bug feedback, improvements and more

All features or bugs that you want IoTDB to do can be raised on Jira:https://issues.apache.org/jira/projects/IOTDB/issuesopen in new window

You can choose issue types: bug, improvement, new feature, etc. New issues will be automatically synchronized to the mailing list (notifications@), and subsequent discussions can be left on jira or on the mailing list. When the issue is resolved, close the issue.

Email discussion content (English)

  • Joining the mailing list for the first time can introduce youself briefly. (Hi, I'm xxx ...)

  • Before developing a new feature, you can send an e-mail to declare the task you want to do.(Hi,I'm working on issue IOTDB-XXX,My plan is ...)

Contributing documents

The content of all IoTDB official websites is in the src directory of the https://github.com/apache/iotdb-docs:open in new window

  • src/UserGuide: User Guide English Version
  • src/zh/UserGuide: User Guide Chinese Version
  • src/Community: community English Version
  • src/zh/Community: community Chinese Version
  • src/Development: Development Guide English Version
  • src/zh/Development: Development Guide Chinese Version

Correspondence between versions and directory:

  • In progress -> src/UserGuide/Master, src/zh/UserGuide/Master
  • major_version.x -> rel/major_version (eg 1.1.x -> V1.1.x)

Precautions:

  • Images in Markdown can be uploaded to .vuepress/public/img and referenced directly in Markdown
  • Do not use special Unicode chars, e.g., U+FF1A
  • Do not use the character of dollar (as we will use Latex to generate pdf files)

Code Formatting

We use the Spotless
pluginopen in new window
together with google-java-formatopen in new window to format our Java code. You can configure your IDE to automatically apply formatting on saving with these steps(Take idea as an example):

  1. Download the google-java-format
    plugin v1.7.0.5open in new window
    , it can be installed in IDEA (Preferences -> plugins -> search google-java-format), More detailed setup manualopen in new window
  2. Install the plugin from disk (Plugins -> little gear icon -> "Install plugin from disk" -> Navigate to downloaded zip file)
  3. In the plugin settings, enable the plugin and keep the default Google code style (2-space indents)
  4. Remember to never update this plugin to a later version,until Spotless was upgraded to version 1.8+.
  5. Install the Save Actions
    pluginopen in new window
    , and enable the plugin, along with "Optimize imports" and "Reformat file"
  6. In the "Save Actions" settings page, setup a "File Path Inclusion" for .*\.java. Otherwise you will get unintended reformatting in other files you edit.
  7. Fix the issues of reordering the import packages: in IDEA: choose: Preferences | Editor | Code Style | Java | imports. At the tail of the panel, there is "Import Layout", change it to:
   import org.apache.iotdb.*
   <blank line>
   import all other imports
   <blank line>
   import java.*
   <blank line>
   import static all other imports
  1. Before you submit codes, you can use mvn spotless:check to check your codes manually,
    and use mvn spotless:apply to format your codes.

Code Sytle

We use the maven-checkstyle-pluginopen in new window to make Java codes obey a consistent ruleset defined in checkstyle.xmlopen in new window under the project root.

You can reference the code style rules in the file. After development, you can use mvn validate to check whether your codes satisfy the style rules.

Besides, when you develop in an IDE, some default code style configurations may be conflict with those rules.

In IDEA, you can follow these steps to change those inconsistent style formatting rules:

Disable using wildcard import

  1. Navigate to Java code style configuration page (Preferences... -> Editor -> Code Style -> Java).
  2. Switch to the 'imports' tab.
  3. In the 'General' section, enable 'Use single class import' option.
  4. Change 'Class count to use import with '*'' to 999 or another very large number.
  5. Change 'Names to count to use static import with '*'' to 999 or another very large number.

Contributing code

You can go to jira to pick up the existing issue or create your own issue and get it. The comment says that I can do this issue.

  • Clone the repository to your own local repository, clone to the local, and associate the apache repository as the upstream upstream repository.
  • Cut out a new branch from master. The branch name is determined by the function of this branch. It is usually called f_new_feature (such as f_storage_engine) or fix_bug (such as fix_query_cache_bug).
  • Add code style as the root java-google-style.xml in the idea
  • Modify the code and add test cases (unit test, integration test)
    • Integration test reference:server/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneIT
  • Use mvn spotless:check to check the code style and use mvn spotless:apply to correct the code style
  • Submit a PR, starting with [IOTDB-jira number]
  • Email to dev mailing list:(I've submitted a PR for issue IOTDB-xxx [link])
  • Make changes based on other people's reviews and continue to update until merged
  • close jira issue

IoTDB Debug Guide

Import the code

Intellij idea

It is recommended to use Intellij idea。mvn clean package -DskipTests

Mark antlr/target/generated-sources/antlr4 andthrift/target/generated-sources/thrift as Source Root

Eclipse

If it is a version before eclipse 2019,users need to be executed in the root directory of IoTDB mvn eclipse:eclipse -DskipTests

import -> General -> Existing Projects into Workspace -> Select IoTDB root directory

If the version after eclipse 2019

import -> Maven -> Existing Maven Projects

Frequent Questions When Compiling the Source Code

Q: I could not download thrift-* tools, like 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

It is due to some network problems (especially in China), you can:

Q: IConfigNodeRPCService class is unrecognized (IDEA can not find the class even though we have generated it)

It is because Thrift generate the file too large, which exceeds the lines that IDEA can parse by default. You can find that file and then you will see IDEA claims that. To make it work, you can:

  • Click "Help" menu of IDEA
  • Choose "Edit Customed Properties"
  • On the opened file (idea.properties), add: idea.max.intellisense.filesize=9000
  • Restart IDEA

The initial committer of IoTDB is using this Java profileropen in new window to debug. Welcome all IoTDB contributors to use it.

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.