| import{_ as i,c as t,b as a,o as n}from"./app-8RDGKaEm.js";const s={};function l(r,e){return n(),t("div",null,e[0]||(e[0]=[a(`<h1 id="development-guide" tabindex="-1"><a class="header-anchor" href="#development-guide"><span>Development Guide</span></a></h1><h2 id="development-agreements" tabindex="-1"><a class="header-anchor" href="#development-agreements"><span>Development Agreements</span></a></h2><h3 id="code-formatting" tabindex="-1"><a class="header-anchor" href="#code-formatting"><span>Code Formatting</span></a></h3><p>We utilize the <a href="https://github.com/diffplug/spotless/tree/main/plugin-maven" target="_blank" rel="noopener noreferrer">Spotless plugin</a> and <a href="https://github.com/google/google-java-format" target="_blank" rel="noopener noreferrer">google-java-format</a> to format Java code. You can configure the IDE to automatically apply formatting on save by following these steps (using IDEA as an example):</p><ol><li>Download <a href="https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169" target="_blank" rel="noopener noreferrer">google-java-format-plugin v1.7.0.5</a> and install it into the IDEA (Preferences -> Plugins -> search for google-java-format). For more details, please check the <a href="https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides" target="_blank" rel="noopener noreferrer">manual</a>.</li><li>Install from disk (Plugins -> gear icon -> "Install plugin from disk" -> Navigate to downloaded the zip file).</li><li>Enable the plugin and keep the default google format (2-space indents).</li><li>Avoid upgrading the google-java-format plugin until Spotless upgrades to version 18 or higher</li><li>Install the <a href="https://plugins.jetbrains.com/plugin/7642-save-actions" target="_blank" rel="noopener noreferrer">Save Actions</a> plugin. Enable "Optimize imports" and "Reformat file" options.</li><li>Under "Save Actions" settings, set <code>File Path Inclusion</code> to <code>.*.java</code> to prevent accidental reformatting of non-Java files.</li></ol><h3 id="code-styles" tabindex="-1"><a class="header-anchor" href="#code-styles"><span>Code Styles</span></a></h3><p>We enforce code style consistency using the <a href="https://checkstyle.sourceforge.io/config_filefilters.html" target="_blank" rel="noopener noreferrer">maven-checkstyle-plugin</a> guided by the rules defined in the <a href="https://github.com/apache/iotdb/blob/master/checkstyle.xml" target="_blank" rel="noopener noreferrer">checkstyle.xml</a> file in the project root directory. To validate your code style, execute <code>mvn validate</code>.</p><p>Ensure your IDE's default code style settings do not conflict with the project's rules.</p><p>In IDEA, you can align your style settings as follows.</p><ul><li>Disable wildcard imports: <ul><li>Navigate to Java code style settings (Preferences -> Editor -> Code Style -> Java).</li><li>Go to the "Import" tab.</li><li>In the "General" section, enable "Use single class import".</li><li>Set "Class count to use import with '*'" to 999 or a larger value.</li><li>Set "Names count to use static import with '*' " to 999 or a larger value.</li></ul></li></ul><h2 id="contribution-methods" tabindex="-1"><a class="header-anchor" href="#contribution-methods"><span>Contribution Methods</span></a></h2><h3 id="participating-in-votes" tabindex="-1"><a class="header-anchor" href="#participating-in-votes"><span>Participating in Votes</span></a></h3><ul><li><p>Step 1: Vote for a release</p><ul><li>Please read <a href="https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release" target="_blank" rel="noopener noreferrer">https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release</a></li></ul></li><li><p>Step 2: Download Artifacts</p><ul><li>Access release candidates at <a href="https://dist.apache.org/repos/dist/dev/iotdb/" target="_blank" rel="noopener noreferrer">https://dist.apache.org/repos/dist/dev/iotdb/</a></li></ul></li><li><p>Step 3: Import the Public Key of the Release Manager</p><ul><li><p>Retrieve keys from <a href="https://dist.apache.org/repos/dist/dev/iotdb/KEYS" target="_blank" rel="noopener noreferrer">https://dist.apache.org/repos/dist/dev/iotdb/KEYS</a> and use <code>gpg2</code> for the import. Instructions and the start of public keys are listed on the page.</p></li><li><p>The first way:</p><ul><li><p>The beginning of the public key is:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">pub rsa4096 2019-10-15 [SC]</span> |
| <span class="line"> 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>Or</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">pub rsa4096/28662AC6 2019-12-23 [SC]</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li><li><p>Download the public key:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">gpg2 --receive-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (or 28662AC6)</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>or (specify keyserver)</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">gpg2 --keyserver p80.pool.sks-keyservers.net --recv-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (or 28662AC6)</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li></ul></li><li><p>The second way:</p><ul><li><p>Copy the content below into a text file named <code>key.asc</code>:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">-----BEGIN PGP PUBLIC KEY BLOCK-----</span> |
| <span class="line">Version: GnuPG v2</span> |
| <span class="line">...</span> |
| <span class="line">-----END PGP PUBLIC KEY BLOCK-----</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Import RM's public key to your computer:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">gpg2 --import key.asc</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li></ul></li></ul></li><li><p>Step 4: Verification of Releases</p><ul><li><p>Ensure LICENSE and NOTICE files are present and correct</p></li><li><p>Check README and RELEASE_NOTES files</p></li><li><p>Validate code headers:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">mvn -B apache-rat:check</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li><li><p>Verify signatures and hashes</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">gpg2 --verify apache-iotdb-0.12.0-source-release.zip.asc apache-iotdb-0.12.0-source-release.zip</span> |
| <span class="line"></span> |
| <span class="line"># Look for a message indicating a "Good Signature"</span> |
| <span class="line"></span> |
| <span class="line">shasum -a512 apache-iotdb-0.12.0-source-release.zip</span> |
| <span class="line"></span> |
| <span class="line"># Compare the output with the corresponding .sha512 file. If they match, the verification is successful.</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></li><li><p>Verify the compilation:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">mvnw install</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Ensure that the output ends with "SUCCESS" for all tasks.</p></li></ul></li><li><p>Step 5: Verify the Binary Release</p><ul><li><p>Ensure LICENSE and NOTICE files are present and correct</p></li><li><p>Check README and RELEASE_NOTES files</p></li><li><p>Verify signatures and hashes</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">gpg2 --verify apache-iotdb-0.12.0-bin.zip.asc apache-iotdb-0.12.0-bin.zip</span> |
| <span class="line"></span> |
| <span class="line"># Look for a message indicating a "Good Signature".</span> |
| <span class="line"></span> |
| <span class="line">shasum -a512 apache-iotdb-0.12.0-bin.zip</span> |
| <span class="line"></span> |
| <span class="line"># Compare the output with the corresponding .sha512 file. If they match, the verification is successful.</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></li><li><p>Verify that it starts and the sample statements execute correctly</p><p>To ensure the server starts and executes sample statements correctly, run the following commands:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">nohup ./sbin/start-server.sh >/dev/null 2>&1 &</span> |
| <span class="line"></span> |
| <span class="line">./sbin/start-cli.sh</span> |
| <span class="line"></span> |
| <span class="line">CREATE DATABASE root.turbine;</span> |
| <span class="line">CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA;</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(1,1);</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(2,2);</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(3,3);</span> |
| <span class="line">select * from root.**;</span> |
| <span class="line"></span> |
| <span class="line"># Expect the following output:</span> |
| <span class="line">+-----------------------------------+------------------+</span> |
| <span class="line">| Time|root.turbine.d1.s0|</span> |
| <span class="line">+-----------------------------------+------------------+</span> |
| <span class="line">| 1970-01-01T08:00:00.001+08:00| 1.0|</span> |
| <span class="line">| 1970-01-01T08:00:00.002+08:00| 2.0|</span> |
| <span class="line">| 1970-01-01T08:00:00.003+08:00| 3.0|</span> |
| <span class="line">+-----------------------------------+------------------+</span> |
| <span class="line"></span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></li></ul></li><li><p>Step 6: Send an Email After Verification</p><p>Once verification is complete, you can send an email to confirm the successful validation:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">Hi,</span> |
| <span class="line"></span> |
| <span class="line">+1 (PMC could binding)</span> |
| <span class="line"></span> |
| <span class="line">The source release:</span> |
| <span class="line">LICENSE and NOTICE [ok]</span> |
| <span class="line">signatures and hashes [ok]</span> |
| <span class="line">All files have ASF header [ok]</span> |
| <span class="line">could compile from source: ./mvnw clean install [ok]</span> |
| <span class="line"></span> |
| <span class="line">The binary distribution:</span> |
| <span class="line">LICENSE and NOTICE [ok]</span> |
| <span class="line">signatures and hashes [ok]</span> |
| <span class="line">Could run with the following statements [ok]</span> |
| <span class="line"></span> |
| <span class="line">CREATE DATABASE root.turbine;</span> |
| <span class="line">CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA;</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(1,1);</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(2,2);</span> |
| <span class="line">insert into root.turbine.d1(timestamp,s0) values(3,3);</span> |
| <span class="line">select * from root.**;</span> |
| <span class="line"></span> |
| <span class="line">Thanks,</span> |
| <span class="line">xxx</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></li></ul><h3 id="code-contribution" tabindex="-1"><a class="header-anchor" href="#code-contribution"><span>Code Contribution</span></a></h3><h4 id="contribution-process" tabindex="-1"><a class="header-anchor" href="#contribution-process"><span>Contribution process:</span></a></h4><p>Tasks are managed as issues in JIRA in the Apache IoTDB community.</p><p>The full lifecycle of an Issue: Create an issue -> assign an issue -> submit a PR(pull request) -> review the PR -> merge the pr -> close the issue.</p><h4 id="create-an-issue" tabindex="-1"><a class="header-anchor" href="#create-an-issue"><span>Create an Issue:</span></a></h4><ul><li>Clearly name and describe the issue in JIRA: <ul><li>Naming: Try to make it clear and easy to understand. Examples include supporting a new aggregate query function (avg) and optimizing the performance of querying raw data. The issue will later be included in the release note.</li><li>Description: New features and improvements should be clear. Mention environment, affected versions, and steps to reproduce if reporting bugs.</li></ul></li></ul><h4 id="assign-an-issue" tabindex="-1"><a class="header-anchor" href="#assign-an-issue"><span>Assign an Issue:</span></a></h4><ul><li><p>To prevent duplicate efforts, add a comment like "I'm working on this" when you take up an issue.</p><p>Note: If you cannot assign an issue, it is because your account does not have the necessary permission.<br> In this case, please send an email to the <a href="mailto:dev@iotdb.apache.org" target="_blank" rel="noopener noreferrer">dev@iotdb.apache.org</a> mailing list with the title of "[application] apply for permission to assign issues to XXX (your JIRA username)".</p></li></ul><h4 id="submit-a-pr" tabindex="-1"><a class="header-anchor" href="#submit-a-pr"><span>Submit a PR</span></a></h4><ul><li><p>How to submit code</p><ul><li><p>Contribution path:</p><p>The IoTDB community welcomes developers to participate in building the open source project. You can check <a href="https://issues.apache.org/jira/projects/IOTDB/issues" target="_blank" rel="noopener noreferrer">Issues</a> and contribute to their resolution or make other improvements.</p><p>Submit a PR that passes Travis-CI tests and Sonar code quality checks. If at least one committer approves and there are no code conflicts, the PR can be merged.</p></li><li><p>PR guidelines:</p><p>Submitting a <a href="https://help.github.com/articles/about-pull-requests/" target="_blank" rel="noopener noreferrer">Pull Request</a> on GitHub is straightforward. The following steps use the <a href="https://github.com/apache/iotdb" target="_blank" rel="noopener noreferrer">apache/iotdb</a> project as an example (replace "iotdb" with the relevant project name if different).</p><ul><li><p>Fork the repository:</p><p>Navigate to the <a href="https://github.com/apache/iotdb" target="_blank" rel="noopener noreferrer">github page</a> and click "Fork" in the upper right corner</p></li><li><p>Configure git and submit changes</p><ul><li>Step 1: Clone the code locally:</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git clone https://github.com/<your_github_name>/iotdb.git</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p><strong>Note: Please replace <code><your_github_name></code> with your GitHub username.</strong> The origin will default to your fork on GitHub after cloning.</p><ul><li>Step 2: Add apache/iotdb as an upstream remote branch:</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">cd iotdb</span> |
| <span class="line">git remote add upstream https://github.com/apache/iotdb.git</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>Step 3: Check the remote repository settings:</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git remote -v</span> |
| <span class="line">origin https://github.com/<your_github_name>/iotdb.git (fetch)</span> |
| <span class="line">origin https://github.com/<your_github_name>/iotdb.git(push)</span> |
| <span class="line">upstream https://github.com/apache/iotdb.git (fetch)</span> |
| <span class="line">upstream https://github.com/apache/iotdb.git (push)</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>Step 4: Create a new branch to make changes (assume the new branch name is <code>fix</code>):</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git checkout -b fix</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Once created, you can make changes to the code.</p><ul><li>Step 5: Commit your changes to the remote branch(here's an example of a <code>fix</code> branch):</li></ul><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git commit -a -m "<you_commit_message>"</span> |
| <span class="line">git push origin fix</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>For more on git usage, visit: <a href="https://www.atlassian.com/git/tutorials/setting-up-a-repository" target="_blank" rel="noopener noreferrer">Git Usage Tutorial</a></p></li><li><p>Important Notes for Git Commit</p><ul><li><p>Keep your repository clean:</p><ul><li><p>Do not upload binary files. Ensure the repository size only increases due to code changes.</p></li><li><p>Do not upload generated code.</p></li></ul></li><li><p>Make meaningful commit messages:</p><ul><li><p>Title with JIRA number: [IOTDB-JIRA number].</p></li><li><p>Title with GitHub ISSUE number: [ISSUE-issue number].</p></li><li><p>Include #XXXX in the content for linking purposes.</p></li></ul></li></ul></li><li><p>Create a PR</p><p>Navigate to your GitHub repository page in the browser, switch to your committed branch <code><your_branch_name></code>, and click "New pull request" and "Create pull request" buttons in turn to create a PR. If you are addressing <a href="https://issues.apache.org/jira/projects/IOTDB/issues" target="_blank" rel="noopener noreferrer">Issues</a>, include [IOTDB-xxx] at the beginning.</p><p>At this point, your PR is created. For more information on PRs, please read <a href="https://help.github.com/categories/collaborating-with-issues-and-pull-requests/" target="_blank" rel="noopener noreferrer">Collaborating-with-issues-and-pull-requests</a></p></li><li><p>Conflict resolution</p><p>Code conflicts during PR submission are typically caused by multiple people editing the same file. They can be resolved by following these steps:</p><p>Step 1: Switch to the master branch</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git checkout master</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Step 2: Synchronize the remote master branch to your local branch</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git pull upstream master</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Step 3: Switch back to the branch you were on (assuming it's named <code>fix</code>)</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git checkout fix</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Step 4: Perform a rebase</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git rebase -i master</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Save the file that pops up (usually no changes needed). You will then be prompted to resolve conflicts in the specified files. Execute the following code after all the conflicts are resolved.</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git add .</span> |
| <span class="line">git rebase --continue</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>Repeat until you see a message like <em>rebase successful</em>, then you can update the branch you submitted the PR from:</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">git push -f origin fix</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li></ul></li></ul></li><li><p>Content to be submitted:</p><ul><li><p>Issue Type: New Feature</p><ul><li><p>Submit user manuals and code modification PRs in both English and Chinese.</p><p>The user manual mainly describes the function definition and usage. It should include scenario descriptions, configuration methods, interface function descriptions, and usage examples. Place content in the <code>src/UserGuide</code> directory for English and <code>src/zh/UserGuide</code> for Chinese on the main branch of the apache/iotdb-docs repository.</p><p>Update the user guide by making corresponding changes in <code>src/.vuepress/sidebar</code> on the main branch.</p></li><li><p>Commit Unit Test UT or Integration Test IT</p><p>Submit Unit Tests (UT) or Integration Tests (IT) covering as many cases as possible, referencing existing tests as models. You can refer to <code>xxTest</code> (Path: <code>iotdb/server/src/test/java/org/apache/iotdb/db/query/aggregation/</code>) or <code>xxIT</code> (Path: <code>iotdb/integration/src/test/java/org/apache/iotdb/db/integration/</code>).</p></li></ul></li><li><p>Issue Type: Improvement</p><p>Submit code and UT. Generally, there is no need to modify the user manual. It is advisable to submit experimental results showing quantified improvements and side effects.</p></li><li><p>Issue type: Bug</p><p>Write UT or IT that can reproduce the bug.</p></li></ul></li><li><p>Code management</p><ul><li><p>Branch management:</p><ul><li><p>The naming scheme of the IoTDB version is: <code>0.Major_version.Minor_version</code>. For example, in version 0.12.4, 12 represents the major version and 4 refers to the minor version.</p></li><li><p>The master branch corresponds to the next unreleased major version. Each major version release is archived in a separate branch, e.g., the code for the 0.12.x series is under the <code>rel/0.12</code> branch.</p></li><li><p>Bug fixes found in a released version should be submitted to all branches that are equal to or newer than that version. For example, a PR about a bug fix in version 0.11.x should be submitted to <code>rel/0.11</code> branch, <code>rel/0.12</code> branch and master branch.</p></li></ul></li><li><p>Code formatting:</p><p>Before submitting a PR, use <code>mvn spotless:apply</code> to format the code, otherwise the CI code format check will fail.</p></li><li><p>Notes:</p><ul><li><p>The default values between <code>iotdb-datanode.properties</code> and <code>IoTDBConfig</code> must be consistent</p></li><li><p>If configuration parameters are changed, modify the following files simultaneously:</p><ul><li><p>Configuration file: <code>iotdb-core/datanode/src/assembly/resources/conf/iotdb-datanode.properties</code></p></li><li><p>Code: <code>IoTDBDescriptor</code>, <code>IoTDBConfig</code></p></li><li><p>Documentation: <code>apache/iotdb-docs/src/UserGuide/{version}/Reference/DataNode-Config-Manual.md</code>, <code>apache/iotdb-docs/src/zh/UserGuide/{version}/Reference/DataNode-Config-Manual.md</code></p><p>To modify configuration parameters in IT and UT files, you should make these modifications within methods annotated with <code>@Before</code> and reset them in methods annotated with <code>@After</code> to avoid affecting other tests. Parameters for the compaction module should be consolidated in the <code>CompactionConfigRestorer</code> file.</p></li></ul></li></ul></li></ul></li><li><p>PR Naming</p><ul><li><p>Naming Convention: Branch tag - JIRA tag - PR name</p><p>Example: [To rel/0.12] [IoTDB-1907] implement customized sync process: sender</p></li><li><p>Branch tag</p><p>If you are submitting a PR to a non-master branch, such as the <code>rel/0.13</code> branch, include the branch tag in the PR name, like [To rel/0.13]. If the PR is targeted at the master branch, no branch tag is needed.</p></li><li><p>Jira tag</p><p>Start with the JIRA number, such as [IoTDB-1907] implement customized sync process: sender. This way, once the PR is created, bots will automatically link the PR to the corresponding issue.</p><p>Note: This auto-linking won't happen if the PR is created without any JIRA number or with one that is improper, in which case you need to correct the PR name and manually paste the PR link to the issue page by adding a comment or attaching a link.</p></li></ul></li></ul><ul><li><p>PR Description</p><p>Typically, the PR name cannot cover all changes, so it's necessary to add a detailed description of what has been altered. Provide explanations for any aspects that may be difficult to understand.</p><p>For PRs fixing bugs, describe the cause of the bug and the solution. Additionally, detail the addition of UT/IT test cases and any potential negative effects.</p></li><li><p>After Submitting a PR</p><p>Send an email to the mailing list at <a href="mailto:dev@iotdb.apache.org" target="_blank" rel="noopener noreferrer">dev@iotdb.apache.org</a>, outlining the work done in the PR. ake each reviewer's feedback seriously, respond to each comment, and make adjustments after reaching a consensus.</p></li></ul><h4 id="review-a-pr" tabindex="-1"><a class="header-anchor" href="#review-a-pr"><span>Review a PR</span></a></h4><ul><li><p>Key Considerations:</p><ul><li>PR Naming: Ensure PRs are properly named with the JIRA number for new features and bug fixes.</li><li>PR Description: Check if the description is clear.</li><li>Test Cases: Attach functional or performance test reports.</li><li>User Manuals: Ensure that new features include a user manual.</li><li>Code Isolation: Avoid mixing unrelated code changes in the same PR. Split unrelated modifications into separate PRs.</li></ul></li><li><p>Review Process:</p><ul><li><p>First step: Click "Files changed" in the PR<br><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/zh/development/howtocontributecode/01.png"></p></li><li><p>Second step: For lines with issues, move to the left side where a plus sign appears. Click the plus, leave a comment, and then click "Start a review". At this point, all review comments are saved temporarily and are not visible to others.<br><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/zh/development/howtocontributecode/02.png"></p></li><li><p>Third step: After all the comments are added, click "Review changes", choose your feedback — "Approve" if it’s ready to merge, "Request changes" if there are bugs that need correction, or "Comment" if you're unsure. Finally, submit your review comments which will then be visible to the person who submitted the PR.<br><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/zh/development/howtocontributecode/03.png"></p></li></ul></li></ul><h4 id="merge-a-pr" tabindex="-1"><a class="header-anchor" href="#merge-a-pr"><span>Merge a PR</span></a></h4><ul><li><p>Confirm that all review comments have been addressed and you have approval from at least one committer.</p></li><li><p>Choose <code>squash</code> merge. Opt for <code>rebase</code> only if the author has a single, clear commit log.</p></li><li><p>Close the corresponding issue on JIRA, and tag the fixed or completed version. [Note that solving or closing an issue should always include adding a PR or description on JIRA to allow tracking of task changes.]</p></li></ul><h3 id="contribute-to-documentation" tabindex="-1"><a class="header-anchor" href="#contribute-to-documentation"><span>Contribute to Documentation</span></a></h3><p>The process for contributing to the user manual is the same as for code, but involves different files:</p><ul><li>The English user manual is located in <code>src/UserGuide</code>.</li><li>The Chinese version is located in <code>src/zh/UserGuide</code>.</li><li>To update the user manual directory, including adding or deleting markdown documents or changing document names, appropriate modifications should be made in <code>src/.vuepress/sidebar</code> on the main branch.</li></ul><h3 id="new-features-bug-feedback-improvements-etc" tabindex="-1"><a class="header-anchor" href="#new-features-bug-feedback-improvements-etc"><span>New Features, Bug Feedback, Improvements, etc.</span></a></h3><p>Any new features or bugs to be fixed can be submitted as an issue on JIRA.</p><p>You can select the type of issue: bug, improvement, new feature, etc. New issues are automatically synchronized to the mailing list, and subsequent discussions can take place on JIRA or via the mailing list. Please close the issue once it is resolved.</p><h3 id="email-discussion-content" tabindex="-1"><a class="header-anchor" href="#email-discussion-content"><span>Email discussion Content</span></a></h3><p>Please conduct discussions in English:</p><ul><li><p>When joining the mailing list for the first time, you might introduce yourself (e.g., "Hi, I'm xxx...").</p></li><li><p>Before starting work on a feature, you may announce your intent via email (e.g., "Hi, I'm working on issue IOTDB-XXX, My plan is...").</p></li></ul><h3 id="frequently-asked-questions" tabindex="-1"><a class="header-anchor" href="#frequently-asked-questions"><span>Frequently Asked Questions</span></a></h3><ul><li><p>Unable to download files such as <code>thrift-*</code>:<br> For example <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> This is usually a network issue, requiring manual download of the specified files:</p><ul><li><p>Download manually from:</p><ul><li><a href="https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS" target="_blank" rel="noopener noreferrer">thrift-0.14-MacOS</a></li><li><a href="https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu" target="_blank" rel="noopener noreferrer">thrift-0.14-ubuntu</a></li></ul></li><li><p>Copy the file to the <code>thrift/target/tools/</code> directory.</p></li><li><p>Re-execute the Maven compile command.</p></li></ul></li><li><p>Unable to download <code>errorprone</code>:</p><div class="language-Failed line-numbers-mode" data-highlighter="prismjs" data-ext="Failed" data-title="Failed"><pre><code><span class="line">-shaded:jar:9+181-r4173-1: Could not transfer artifact com.google.errorprone:javac-shaded:pom:9+181-r4173-1</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>Solution:</p><pre><code>1. Manually download the jar package [javac-shaded-9+181-r4173-1.jar](https://repo1.maven.org/maven2/com/google/errorprone/javac-shaded/9+181-r4173-1/javac-shaded-9+181-r4173-1.jar) |
| |
| 2. Install the jar package to the local private repository: |
| </code></pre><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">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</span> |
| <span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></li></ul><h2 id="references" tabindex="-1"><a class="header-anchor" href="#references"><span>References</span></a></h2><ul><li><p>Apache IoTDB Official Website:<a href="https://iotdb.apache.org/" target="_blank" rel="noopener noreferrer">https://iotdb.apache.org/</a></p></li><li><p>Code Repository:<a href="https://github.com/apache/iotdb" target="_blank" rel="noopener noreferrer">https://github.com/apache/iotdb</a></p></li><li><p>Go Language Repository: <a href="https://github.com/apache/iotdb-client-go" target="_blank" rel="noopener noreferrer">https://github.com/apache/iotdb-client-go</a></p></li><li><p>Documentation Repository:<a href="https://github.com/apache/iotdb-docs" target="_blank" rel="noopener noreferrer">https://github.com/apache/iotdb-docs</a></p></li><li><p>Resource Repository (project's documents, compiler, etc): <a href="https://github.com/apache/iotdb-bin-resources" target="_blank" rel="noopener noreferrer">https://github.com/apache/iotdb-bin-resources</a></p></li><li><p>Quick Start Guide:<a href="http://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html" target="_blank" rel="noopener noreferrer">http://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html</a></p></li><li><p>JIRA Task Management:<a href="https://issues.apache.org/jira/projects/IOTDB/issues" target="_blank" rel="noopener noreferrer">https://issues.apache.org/jira/projects/IOTDB/issues</a></p></li><li><p>WiKi Documentation:<a href="https://cwiki.apache.org/confluence/display/IOTDB/Home" target="_blank" rel="noopener noreferrer">https://cwiki.apache.org/confluence/display/IOTDB/Home</a></p></li><li><p>Mailing list: <a href="https://lists.apache.org/list.html?dev@iotdb.apache.org" target="_blank" rel="noopener noreferrer">https://lists.apache.org/list.html?dev@iotdb.apache.org</a></p></li><li><p>Daily Builds: <a href="https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/" target="_blank" rel="noopener noreferrer">https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/</a></p></li><li><p>Slack: <a href="https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email" target="_blank" rel="noopener noreferrer">https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email</a></p></li></ul>`,41)]))}const d=i(s,[["render",l],["__file","Development-Guide.html.vue"]]),c=JSON.parse('{"path":"/Community/Development-Guide.html","title":"Development Guide","lang":"en-US","frontmatter":{"description":"Development Guide Development Agreements Code Formatting We utilize the Spotless plugin and google-java-format to format Java code. You can configure the IDE to automatically ap...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://iotdb.apache.org/zh/Community/Development-Guide.html"}],["meta",{"property":"og:url","content":"https://iotdb.apache.org/Community/Development-Guide.html"}],["meta",{"property":"og:site_name","content":"IoTDB Website"}],["meta",{"property":"og:title","content":"Development Guide"}],["meta",{"property":"og:description","content":"Development Guide Development Agreements Code Formatting We utilize the Spotless plugin and google-java-format to format Java code. You can configure the IDE to automatically ap..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-07-16T07:42:59.000Z"}],["meta",{"property":"article:modified_time","content":"2024-07-16T07:42:59.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Development Guide\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-07-16T07:42:59.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"Development Agreements","slug":"development-agreements","link":"#development-agreements","children":[{"level":3,"title":"Code Formatting","slug":"code-formatting","link":"#code-formatting","children":[]},{"level":3,"title":"Code Styles","slug":"code-styles","link":"#code-styles","children":[]}]},{"level":2,"title":"Contribution Methods","slug":"contribution-methods","link":"#contribution-methods","children":[{"level":3,"title":"Participating in Votes","slug":"participating-in-votes","link":"#participating-in-votes","children":[]},{"level":3,"title":"Code Contribution","slug":"code-contribution","link":"#code-contribution","children":[]},{"level":3,"title":"Contribute to Documentation","slug":"contribute-to-documentation","link":"#contribute-to-documentation","children":[]},{"level":3,"title":"New Features, Bug Feedback, Improvements, etc.","slug":"new-features-bug-feedback-improvements-etc","link":"#new-features-bug-feedback-improvements-etc","children":[]},{"level":3,"title":"Email discussion Content","slug":"email-discussion-content","link":"#email-discussion-content","children":[]},{"level":3,"title":"Frequently Asked Questions","slug":"frequently-asked-questions","link":"#frequently-asked-questions","children":[]}]},{"level":2,"title":"References","slug":"references","link":"#references","children":[]}],"git":{"createdTime":1721115779000,"updatedTime":1721115779000,"contributors":[{"name":"majialin","email":"107627937+mal117@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":9.95,"words":2986},"filePathRelative":"Community/Development-Guide.md","localizedDate":"July 16, 2024","autoDesc":true}');export{d as comp,c as data}; |