Skip to content

Conversation

@jixuan1989
Copy link
Member

@jixuan1989 jixuan1989 commented Apr 17, 2021

This PR fixes:

  1. in the cluster module, set the default number of nodes as 1, and the default replica number as 1.

  2. users can skip to set the value of internal_ip. If internal_ip is commented, then the hostname of the server will be used rather than 127.0.0.1 to be used.

  3. add a new module testcontainer. The module will be added if your PC/Mac has installed Docker.

  4. the testcontainer module will build two docker images: apache/iotdb:maven-development and apache/iotdb:cluster-maven-development when running mvn pre-integration-test

  5. Two E2E test (end with *IT.java) with TestContainer framework examples are provided, in testcontainer/src/test/java/, while one is for single node and another is for the cluster with 3 nodes.

  6. remove duplicated verify phash in integration-test phase.

  7. To disable the testcontainer module, use -P !testcontainer in your mvn command.

  8. In this PR, spotless:check is moved to a profile, which is enabled by default. To skip the step (for faster compiling, use -P !spotless).

try {
metaServer = new MetaClusterServer();
// preStartCustomize();
preStartCustomize();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preStratCustomize is just for debug, should not used in deployment.

# request, the number of nodes picked depends on the number of retries.
seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
#seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
seed_nodes=127.0.0.1:9003
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it unfriendly for users to configure only one IP in distributed mode?
Why change the default parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually THIS is "friendly".

What we want:

  1. let user download the zip (iotdb-cluster.zip)
  2. unzip the file
  3. call start-node.sh
  4. begin to have a try.

If we set 3 ips here, then the process is.... very very difficult for users:

  1. let user download the zip (iotdb-cluster.zip)
  2. unzip the file
  3. copy the file into 3 parts
  4. modiy iotdb-cluster.properties one by one (very hard, as they have to read the file to know "ah, in the first file, I need modify the parameter as 9003, and modify the rpc port and internal_data port as .... In the second file, I need ...."
  5. call start-node.sh
  6. begin to have a try.

It is a disaster for fresh man.

If you see other distributed systems, all their default setting is just one node.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, your consideration is reasonable.

@sonarqubecloud
Copy link

@jixuan1989
Copy link
Member Author

The code coverage is hard to be promoted anymore
(I do not know how to simulate exception when calling InetAddress.getLocalHost()).

Copy link
Member

@mychaow mychaow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jixuan1989 jixuan1989 merged commit 7458f4d into master Apr 25, 2021
@jixuan1989 jixuan1989 deleted the testcontainer branch April 25, 2021 07:03
mzp0514 pushed a commit to mzp0514/iotdb that referenced this pull request Apr 26, 2021
# This is the 1st commit message:

Fix query one sensor in a vector from memtable (apache#3056)

Fix query one sensor in a vector from memtable
# This is the commit message apache#2:

[IOTDB-1310] Enable docker, docker-compose and testcontainer for End to end test (apache#3024)

* enable TestCongtainer for E2E test for (singleNode and cluster)

* remove duplicated operations in integration-test phase

* move spotless:apply to a profile `spotless`, which is enabled by default.

Co-authored-by: xiangdong huang <[email protected]>
# This is the commit message apache#3:

add sink interface

# This is the commit message apache#4:

3 new event sinks

# This is the commit message apache#5:

add ts sink

# This is the commit message apache#6:

add ts sink

# This is the commit message apache#7:

add mqtt sink

# This is the commit message apache#8:

refactor sink module

# This is the commit message apache#9:

init package sink.manager

# This is the commit message apache#10:

rename SinkException

# This is the commit message apache#11:

remove id in config

# This is the commit message apache#12:

fix doc

# This is the commit message apache#13:

add test framework

# This is the commit message apache#14:

add alertmanager sink & test & doc

# This is the commit message apache#15:

beautify the doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants