Take the first step to join the Apache IoTDB community! (Subscribe to email, debug code)

Many students who want to participate in project development do not know which tasks are suitable for them because there is no one to lead the way. They are also at a loss as to how to participate in the project. Today I will introduce how to participate in the development. The main goal of this article is to help you join the community.

The text is 1512 words, and the estimated reading time is 4 minutes.

Today's content mainly includes: subscribe to the mailing list, find issues, compile the source code, and debug the server code.

Subscribe to the mailing list

The main communication method of the Apache project is the mailing list. The mailing list of our project developers is [email protected]. As long as you subscribe to this mailing list, you can receive emails from other people to this mailbox. Similarly, you Others will receive emails sent here, similar to a WeChat group with a slightly higher delay.

The subscription method is to send an email to [email protected] with any subject content, you can write subscribe. Next, you will receive a confirmation email with a link in the confirmation email. If you reply to this confirmation link, the subscription is successful.

The first thing after subscribing is to post a self-introduction. You can introduce your name, region, company, familiar language, technology stack, etc.

You don’t need to take the mailing list as a serious place. In fact, you can discuss anything related to the project here, including holding a meetup, reporting bugs, sharing design ideas, or just getting started and hope that others will introduce some introductory tasks. of.

The attitude when I first came to the mailing list is: not afraid of making mistakes, not afraid of making mistakes, speak enthusiastically.

Find the right issue

I usually use jira.

https://issues.apache.org/jira/projects/IOTDB/issues

In addition, the issue of github is also available.

If you don’t know which features are suitable for you, you can ask on the mailing list or ask me.

Compile the source code

git clone https://github.com/apache/incubator-iotdb.git
cd incubator-iotdb
mvn clean package -DskipTests

Next, you need to mark the thrift/target/generated-sources/thrift and antlr/target/generated-sources/antlr4 directories as project source code for the IDE to recognize.

Take IDEA marking the antlr directory as an example:

So far, there should be no red in the code.

Debug server code

To debug IoTDB for the first time, you can start with two modules, the server (server) and the command line tool (cli).

First start the server, the main class IoTDB, and start the debug mode.

Next, set a breakpoint on the executeStatement of the TSServiceImpl class. All statements written in Cli will be sent to the server, and the server's thread will process the statement through this rpc function.

Next, start the command line tool. The main class is Cli (mac, linux) or WinCli (windows). It will report missing parameters after startup. At this time, you can select Cli at the arrow and then Edit Configuration

Set several parameters in the class javadoc to Program arguments, click Apply, OK.

Then you can run to start Cli (if you want to debug the client, you can start it in debug mode). After startup, you can enter a command in the run console. Here, we take the creation of a storage group as an example. After entering and press Enter, the client process starts to wait for the server to return the result.

At this time, it will automatically jump to the debugger of the server process, and you can officially debug.

Another type of code that is suitable for learning code is to run test cases. Each module has a corresponding test case. The common UT name corresponds to (test class name + Test), and the suffix of integration test is IT.

to sum up

After taking the first step, you can look at the code against the design document, http://iotdb.apache.org/zh/SystemDesign/Architecture/Architecture.html. Next, I will introduce the design principles and source code analysis of IoTDB. Welcome to follow!

Guess you like

Origin blog.csdn.net/qiaojialin/article/details/108047052