| import{_ as o,r as s,o as l,c as r,b as e,d as t,a as n,e as a}from"./app-C75uWLJT.js";const d={},c=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>',3),u={href:"https://github.com/diffplug/spotless/tree/main/plugin-maven",target:"_blank",rel:"noopener noreferrer"},p={href:"https://github.com/google/google-java-format",target:"_blank",rel:"noopener noreferrer"},h={href:"https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169",target:"_blank",rel:"noopener noreferrer"},m={href:"https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides",target:"_blank",rel:"noopener noreferrer"},g=e("li",null,'Install from disk (Plugins -> gear icon -> "Install plugin from disk" -> Navigate to downloaded the zip file).',-1),b=e("li",null,"Enable the plugin and keep the default google format (2-space indents).",-1),v=e("li",null,"Avoid upgrading the google-java-format plugin until Spotless upgrades to version 18 or higher",-1),f={href:"https://plugins.jetbrains.com/plugin/7642-save-actions",target:"_blank",rel:"noopener noreferrer"},y=e("li",null,[t('Under "Save Actions" settings, set '),e("code",null,"File Path Inclusion"),t(" to "),e("code",null,".*.java"),t(" to prevent accidental reformatting of non-Java files.")],-1),x=e("h3",{id:"code-styles",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#code-styles"},[e("span",null,"Code Styles")])],-1),_={href:"https://checkstyle.sourceforge.io/config_filefilters.html",target:"_blank",rel:"noopener noreferrer"},k={href:"https://github.com/apache/iotdb/blob/master/checkstyle.xml",target:"_blank",rel:"noopener noreferrer"},w=e("code",null,"mvn validate",-1),I=a('<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>',5),T=e("p",null,"Step 1: Vote for a release",-1),C={href:"https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release",target:"_blank",rel:"noopener noreferrer"},R=e("p",null,"Step 2: Download Artifacts",-1),E={href:"https://dist.apache.org/repos/dist/dev/iotdb/",target:"_blank",rel:"noopener noreferrer"},S=e("p",null,"Step 3: Import the Public Key of the Release Manager",-1),D={href:"https://dist.apache.org/repos/dist/dev/iotdb/KEYS",target:"_blank",rel:"noopener noreferrer"},A=e("code",null,"gpg2",-1),P=a(`<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-ext="text" data-title="text"><pre class="language-text"><code>pub rsa4096 2019-10-15 [SC] |
| 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>Or</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>pub rsa4096/28662AC6 2019-12-23 [SC] |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>Download the public key:</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>gpg2 --receive-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (or 28662AC6) |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>or (specify keyserver)</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>gpg2 --keyserver p80.pool.sks-keyservers.net --recv-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (or 28662AC6) |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>-----BEGIN PGP PUBLIC KEY BLOCK----- |
| Version: GnuPG v2 |
| ... |
| -----END PGP PUBLIC KEY BLOCK----- |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>gpg2 --import key.asc |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li></ul></li>`,2),q=a(`<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-ext="text" data-title="text"><pre class="language-text"><code>mvn -B apache-rat:check |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>Verify signatures and hashes</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>gpg2 --verify apache-iotdb-0.12.0-source-release.zip.asc apache-iotdb-0.12.0-source-release.zip |
| |
| # Look for a message indicating a "Good Signature" |
| |
| shasum -a512 apache-iotdb-0.12.0-source-release.zip |
| |
| # Compare the output with the corresponding .sha512 file. If they match, the verification is successful. |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>mvnw install |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>gpg2 --verify apache-iotdb-0.12.0-bin.zip.asc apache-iotdb-0.12.0-bin.zip |
| |
| # Look for a message indicating a "Good Signature". |
| |
| shasum -a512 apache-iotdb-0.12.0-bin.zip |
| |
| # Compare the output with the corresponding .sha512 file. If they match, the verification is successful. |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>nohup ./sbin/start-server.sh >/dev/null 2>&1 & |
| |
| ./sbin/start-cli.sh |
| |
| CREATE DATABASE root.turbine; |
| CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA; |
| insert into root.turbine.d1(timestamp,s0) values(1,1); |
| insert into root.turbine.d1(timestamp,s0) values(2,2); |
| insert into root.turbine.d1(timestamp,s0) values(3,3); |
| select * from root.**; |
| |
| # Expect the following output: |
| +-----------------------------------+------------------+ |
| | Time|root.turbine.d1.s0| |
| +-----------------------------------+------------------+ |
| | 1970-01-01T08:00:00.001+08:00| 1.0| |
| | 1970-01-01T08:00:00.002+08:00| 2.0| |
| | 1970-01-01T08:00:00.003+08:00| 3.0| |
| +-----------------------------------+------------------+ |
| |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>Hi, |
| |
| +1 (PMC could binding) |
| |
| The source release: |
| LICENSE and NOTICE [ok] |
| signatures and hashes [ok] |
| All files have ASF header [ok] |
| could compile from source: ./mvnw clean install [ok] |
| |
| The binary distribution: |
| LICENSE and NOTICE [ok] |
| signatures and hashes [ok] |
| Could run with the following statements [ok] |
| |
| CREATE DATABASE root.turbine; |
| CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA; |
| insert into root.turbine.d1(timestamp,s0) values(1,1); |
| insert into root.turbine.d1(timestamp,s0) values(2,2); |
| insert into root.turbine.d1(timestamp,s0) values(3,3); |
| select * from root.**; |
| |
| Thanks, |
| xxx |
| </code></pre><div class="line-numbers" aria-hidden="true"><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>`,3),j=a('<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">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>',9),B=e("p",null,"How to submit code",-1),F=e("p",null,"Contribution path:",-1),G={href:"https://issues.apache.org/jira/projects/IOTDB/issues",target:"_blank",rel:"noopener noreferrer"},N=e("p",null,"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.",-1),O=e("p",null,"PR guidelines:",-1),U={href:"https://help.github.com/articles/about-pull-requests/",target:"_blank",rel:"noopener noreferrer"},z={href:"https://github.com/apache/iotdb",target:"_blank",rel:"noopener noreferrer"},M=e("p",null,"Fork the repository:",-1),J={href:"https://github.com/apache/iotdb",target:"_blank",rel:"noopener noreferrer"},L=a(`<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-ext="text" data-title="text"><pre class="language-text"><code>git clone https://github.com/<your_github_name>/iotdb.git |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>cd iotdb |
| git remote add upstream https://github.com/apache/iotdb.git |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git remote -v |
| origin https://github.com/<your_github_name>/iotdb.git (fetch) |
| origin https://github.com/<your_github_name>/iotdb.git(push) |
| upstream https://github.com/apache/iotdb.git (fetch) |
| upstream https://github.com/apache/iotdb.git (push) |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git checkout -b fix |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git commit -a -m "<you_commit_message>" |
| git push origin fix |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div>`,13),V={href:"https://www.atlassian.com/git/tutorials/setting-up-a-repository",target:"_blank",rel:"noopener noreferrer"},H=a("<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>",1),Y=e("p",null,"Create a PR",-1),X=e("code",null,"<your_branch_name>",-1),W={href:"https://issues.apache.org/jira/projects/IOTDB/issues",target:"_blank",rel:"noopener noreferrer"},K={href:"https://help.github.com/categories/collaborating-with-issues-and-pull-requests/",target:"_blank",rel:"noopener noreferrer"},Q=a(`<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-ext="text" data-title="text"><pre class="language-text"><code>git checkout master |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git pull upstream master |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git checkout fix |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Step 4: Perform a rebase</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>git rebase -i master |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git add . |
| git rebase --continue |
| </code></pre><div class="line-numbers" aria-hidden="true"><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-ext="text" data-title="text"><pre class="language-text"><code>git push -f origin fix |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li>`,1),Z=a("<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>",3),$=a('<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">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>',15),ee=e("p",null,[t("Unable to download files such as "),e("code",null,"thrift-*"),t(":"),e("br"),t(" For example "),e("code",null,"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"),t("."),e("br"),t(" This is usually a network issue, requiring manual download of the specified files:")],-1),te=e("p",null,"Download manually from:",-1),ie={href:"https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-MacOS",target:"_blank",rel:"noopener noreferrer"},ne={href:"https://github.com/apache/iotdb-bin-resources/blob/main/compile-tools/thrift-0.14-ubuntu",target:"_blank",rel:"noopener noreferrer"},ae=e("li",null,[e("p",null,[t("Copy the file to the "),e("code",null,"thrift/target/tools/"),t(" directory.")])],-1),oe=e("li",null,[e("p",null,"Re-execute the Maven compile command.")],-1),se=a(`<li><p>Unable to download <code>errorprone</code>:</p><div class="language-Failed line-numbers-mode" data-ext="Failed" data-title="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><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-ext="text" data-title="text"><pre class="language-text"><code>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 |
| </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li>`,1),le=e("h2",{id:"references",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#references"},[e("span",null,"References")])],-1),re={href:"https://iotdb.apache.org/",target:"_blank",rel:"noopener noreferrer"},de={href:"https://github.com/apache/iotdb",target:"_blank",rel:"noopener noreferrer"},ce={href:"https://github.com/apache/iotdb-client-go",target:"_blank",rel:"noopener noreferrer"},ue={href:"https://github.com/apache/iotdb-docs",target:"_blank",rel:"noopener noreferrer"},pe={href:"https://github.com/apache/iotdb-bin-resources",target:"_blank",rel:"noopener noreferrer"},he={href:"http://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html",target:"_blank",rel:"noopener noreferrer"},me={href:"https://issues.apache.org/jira/projects/IOTDB/issues",target:"_blank",rel:"noopener noreferrer"},ge={href:"https://cwiki.apache.org/confluence/display/IOTDB/Home",target:"_blank",rel:"noopener noreferrer"},be={href:"https://lists.apache.org/list.html?dev@iotdb.apache.org",target:"_blank",rel:"noopener noreferrer"},ve={href:"https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/",target:"_blank",rel:"noopener noreferrer"},fe={href:"https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email",target:"_blank",rel:"noopener noreferrer"};function ye(xe,_e){const i=s("ExternalLinkIcon");return l(),r("div",null,[c,e("p",null,[t("We utilize the "),e("a",u,[t("Spotless plugin"),n(i)]),t(" and "),e("a",p,[t("google-java-format"),n(i)]),t(" to format Java code. You can configure the IDE to automatically apply formatting on save by following these steps (using IDEA as an example):")]),e("ol",null,[e("li",null,[t("Download "),e("a",h,[t("google-java-format-plugin v1.7.0.5"),n(i)]),t(" and install it into the IDEA (Preferences -> Plugins -> search for google-java-format). For more details, please check the "),e("a",m,[t("manual"),n(i)]),t(".")]),g,b,v,e("li",null,[t("Install the "),e("a",f,[t("Save Actions"),n(i)]),t(' plugin. Enable "Optimize imports" and "Reformat file" options.')]),y]),x,e("p",null,[t("We enforce code style consistency using the "),e("a",_,[t("maven-checkstyle-plugin"),n(i)]),t(" guided by the rules defined in the "),e("a",k,[t("checkstyle.xml"),n(i)]),t(" file in the project root directory. To validate your code style, execute "),w,t(".")]),I,e("ul",null,[e("li",null,[T,e("ul",null,[e("li",null,[t("Please read "),e("a",C,[t("https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release"),n(i)])])])]),e("li",null,[R,e("ul",null,[e("li",null,[t("Access release candidates at "),e("a",E,[t("https://dist.apache.org/repos/dist/dev/iotdb/"),n(i)])])])]),e("li",null,[S,e("ul",null,[e("li",null,[e("p",null,[t("Retrieve keys from "),e("a",D,[t("https://dist.apache.org/repos/dist/dev/iotdb/KEYS"),n(i)]),t(" and use "),A,t(" for the import. Instructions and the start of public keys are listed on the page.")])]),P])]),q]),j,e("ul",null,[e("li",null,[B,e("ul",null,[e("li",null,[F,e("p",null,[t("The IoTDB community welcomes developers to participate in building the open source project. You can check "),e("a",G,[t("Issues"),n(i)]),t(" and contribute to their resolution or make other improvements.")]),N]),e("li",null,[O,e("p",null,[t("Submitting a "),e("a",U,[t("Pull Request"),n(i)]),t(" on GitHub is straightforward. The following steps use the "),e("a",z,[t("apache/iotdb"),n(i)]),t(' project as an example (replace "iotdb" with the relevant project name if different).')]),e("ul",null,[e("li",null,[M,e("p",null,[t("Navigate to the "),e("a",J,[t("github page"),n(i)]),t(' and click "Fork" in the upper right corner')])]),e("li",null,[L,e("p",null,[t("For more on git usage, visit: "),e("a",V,[t("Git Usage Tutorial"),n(i)])])]),H,e("li",null,[Y,e("p",null,[t("Navigate to your GitHub repository page in the browser, switch to your committed branch "),X,t(', and click "New pull request" and "Create pull request" buttons in turn to create a PR. If you are addressing '),e("a",W,[t("Issues"),n(i)]),t(", include [IOTDB-xxx] at the beginning.")]),e("p",null,[t("At this point, your PR is created. For more information on PRs, please read "),e("a",K,[t("Collaborating-with-issues-and-pull-requests"),n(i)])])]),Q])])])]),Z]),$,e("ul",null,[e("li",null,[ee,e("ul",null,[e("li",null,[te,e("ul",null,[e("li",null,[e("a",ie,[t("thrift-0.14-MacOS"),n(i)])]),e("li",null,[e("a",ne,[t("thrift-0.14-ubuntu"),n(i)])])])]),ae,oe])]),se]),le,e("ul",null,[e("li",null,[e("p",null,[t("Apache IoTDB Official Website:"),e("a",re,[t("https://iotdb.apache.org/"),n(i)])])]),e("li",null,[e("p",null,[t("Code Repository:"),e("a",de,[t("https://github.com/apache/iotdb"),n(i)])])]),e("li",null,[e("p",null,[t("Go Language Repository: "),e("a",ce,[t("https://github.com/apache/iotdb-client-go"),n(i)])])]),e("li",null,[e("p",null,[t("Documentation Repository:"),e("a",ue,[t("https://github.com/apache/iotdb-docs"),n(i)])])]),e("li",null,[e("p",null,[t("Resource Repository (project's documents, compiler, etc): "),e("a",pe,[t("https://github.com/apache/iotdb-bin-resources"),n(i)])])]),e("li",null,[e("p",null,[t("Quick Start Guide:"),e("a",he,[t("http://iotdb.apache.org/UserGuide/Master/QuickStart/QuickStart.html"),n(i)])])]),e("li",null,[e("p",null,[t("JIRA Task Management:"),e("a",me,[t("https://issues.apache.org/jira/projects/IOTDB/issues"),n(i)])])]),e("li",null,[e("p",null,[t("WiKi Documentation:"),e("a",ge,[t("https://cwiki.apache.org/confluence/display/IOTDB/Home"),n(i)])])]),e("li",null,[e("p",null,[t("Mailing list: "),e("a",be,[t("https://lists.apache.org/list.html?dev@iotdb.apache.org"),n(i)])])]),e("li",null,[e("p",null,[t("Daily Builds: "),e("a",ve,[t("https://ci-builds.apache.org/job/IoTDB/job/IoTDB-Pipe/job/master/"),n(i)])])]),e("li",null,[e("p",null,[t("Slack: "),e("a",fe,[t("https://apacheiotdb.slack.com/join/shared_invite/zt-qvso1nj8-7715TpySZtZqmyG5qXQwpg#/shared-invite/email"),n(i)])])])])])}const we=o(d,[["render",ye],["__file","Development-Guide.html.vue"]]),Ie=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{we as comp,Ie as data}; |