Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ To run integration tests from IntelliJ: enable the `with-integration-tests` prof
- **DataNode** (`iotdb-core/datanode`): Handles data storage, query execution, and client connections. The main server component.
- **AINode** (`iotdb-core/ainode`): Python-based node for AI/ML inference tasks.

### Edge Distribution

- `EdgeNode` (`iotdb-core/confignode/src/main/java/org/apache/iotdb/edge/EdgeNode.java`) starts the ConfigNode and DataNode in one JVM for resource-constrained single-node deployments.
- `distribution/src/assembly/edge.xml` produces the additional `apache-iotdb-<version>-edge-bin.zip` artifact. Keep its `edge-bin` assembly id unique so it cannot replace an existing attached artifact.
- Edge-specific system defaults live under `iotdb-core/node-commons/src/assembly/resources/conf/edge/`. Standard node, all-in-one, and integration-test assemblies must continue to exclude `edge/**`.
- Edge launchers must reuse the configuration-aware port checks in `scripts/conf/iotdb-common.sh`. Stop scripts must match both the `EdgeNode` main class and the exact `IOTDB_HOME`; never fall back to a global process-name kill.
- Package node-independent tools that work with the combined process. Exclude scripts that require standalone node launchers or environment files, including destructive, daemon-management, and health-check scripts.
- After packaging changes, run a clean distribution build, check that every existing distribution artifact is still produced, and inspect the Edge zip contents and startup/shutdown behavior.

### Dual Data Model

IoTDB supports two data models operating on the same storage:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,18 @@ Under the root path of iotdb:

After being built, the IoTDB distribution is located at the folder: "distribution/target".

### Build IoTDB Edge

The distribution build also produces `apache-iotdb-<version>-edge-bin.zip`. IoTDB Edge runs the ConfigNode and DataNode in one JVM for resource-constrained, single-node deployments. It is an additional artifact and does not replace any existing distribution package.

After extracting the package, configure `conf/iotdb-system.properties`, then start or stop the Edge process with:

```bash
sbin/start-edge.sh
sbin/stop-edge.sh
```

On Windows, use `sbin\windows\start-edge.bat` and `sbin\windows\stop-edge.bat`. The package retains tools that are compatible with the combined Edge process.

### Only build cli

Expand Down
13 changes: 13 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ git checkout rel/x.x

编译完成后, IoTDB 二进制包将生成在: "distribution/target".

### 源码编译 IoTDB Edge

上述发行版构建还会生成 `apache-iotdb-<version>-edge-bin.zip`。IoTDB Edge 在同一个 JVM 中运行 ConfigNode 和 DataNode,适用于资源受限的单机部署。它是新增制品,不会替换任何已有发行包。

解压后,可在 `conf/iotdb-system.properties` 中调整配置,并使用以下脚本启停 Edge 进程:

```bash
sbin/start-edge.sh
sbin/stop-edge.sh
```

Windows 环境请使用 `sbin\windows\start-edge.bat` 和 `sbin\windows\stop-edge.bat`。Edge 包会保留与合并进程兼容的工具脚本。

### 只编译 cli

在 iotdb/iotdb-client 目录下执行:
Expand Down
2 changes: 2 additions & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<descriptor>src/assembly/confignode.xml</descriptor>
<descriptor>src/assembly/cli.xml</descriptor>
<descriptor>src/assembly/library-udf.xml</descriptor>
<descriptor>src/assembly/edge.xml</descriptor>
</descriptors>
<finalName>apache-iotdb-${project.version}</finalName>
</configuration>
Expand Down Expand Up @@ -123,6 +124,7 @@
<include>apache-iotdb-${project.version}-confignode-bin.zip</include>
<include>apache-iotdb-${project.version}-library-udf-bin.zip</include>
<include>apache-iotdb-${project.version}-external-service-impl-bin.zip</include>
<include>apache-iotdb-${project.version}-edge-bin.zip</include>
</includes>
</fileSet>
</fileSets>
Expand Down
7 changes: 7 additions & 0 deletions distribution/src/assembly/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,18 @@
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/node-commons/src/assembly/resources/conf</directory>
<excludes>
<exclude>edge/**</exclude>
</excludes>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<excludes>
<exclude>ainode-env.*</exclude>
<exclude>**/ainode-env.*</exclude>
<exclude>edge-env.*</exclude>
<exclude>**/edge-env.*</exclude>
<exclude>iotdb-common.sh</exclude>
<exclude>**/iotdb-common.bat</exclude>
</excludes>
Expand All @@ -85,6 +90,8 @@
<excludes>
<exclude>*ainode.*</exclude>
<exclude>**/*ainode.*</exclude>
<exclude>*edge.*</exclude>
<exclude>**/*edge.*</exclude>
</excludes>
<fileMode>0755</fileMode>
</fileSet>
Expand Down
3 changes: 3 additions & 0 deletions distribution/src/assembly/confignode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/node-commons/src/assembly/resources/conf</directory>
<excludes>
<exclude>edge/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../scripts/conf</directory>
Expand Down
3 changes: 3 additions & 0 deletions distribution/src/assembly/datanode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/node-commons/src/assembly/resources/conf</directory>
<excludes>
<exclude>edge/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../scripts/conf</directory>
Expand Down
146 changes: 146 additions & 0 deletions distribution/src/assembly/edge.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->
<assembly>
<id>edge-bin</id>
<formats>
<format>dir</format>
<format>zip</format>
</formats>
<baseDirectory>apache-iotdb-${project.version}-edge-bin</baseDirectory>
<dependencySets>
<dependencySet>
<includes>
<include>*:iotdb-server:zip:*</include>
<include>*:iotdb-cli:zip:*</include>
<include>*:iotdb-confignode:zip:*</include>
</includes>
<outputDirectory>${file.separator}</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<exclude>tools/**</exclude>
<exclude>conf/**</exclude>
<exclude>sbin/**</exclude>
</excludes>
</unpackOptions>
</dependencySet>
</dependencySets>
<fileSets>
<!-- jmx credentials and the tool logback come from the datanode resources;
logback-datanode.xml is replaced by the merged logback-edge.xml below. -->
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/datanode/src/assembly/resources/conf</directory>
<excludes>
<exclude>logback-datanode.xml</exclude>
</excludes>
</fileSet>
<!-- iotdb-system.properties is replaced by the edge-tuned one below. -->
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/node-commons/src/assembly/resources/conf</directory>
<excludes>
<exclude>iotdb-system.properties</exclude>
<exclude>edge/**</exclude>
</excludes>
</fileSet>
<!-- edge-specific system configuration. -->
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../iotdb-core/node-commons/src/assembly/resources/conf/edge</directory>
</fileSet>
<!-- merged logback configuration for the single Edge process. -->
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/src/assembly/resources/conf-edge</directory>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<includes>
<include>edge-env.sh</include>
<include>windows/edge-env.bat</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<includes>
<include>iotdb-common.sh</include>
<include>windows/iotdb-common.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<!-- one pair of start/stop scripts for the merged process, plus the cli. -->
<fileSet>
<outputDirectory>sbin</outputDirectory>
<directory>${project.basedir}/../scripts/sbin</directory>
<includes>
<include>start-edge.sh</include>
<include>stop-edge.sh</include>
<include>start-cli.sh</include>
<include>windows/start-edge.bat</include>
<include>windows/stop-edge.bat</include>
<include>windows/start-cli.bat</include>
<include>windows/start-cli-table.bat</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<!-- Keep node-independent tools. Edge does not package the standalone node launchers or
environment files required by the excluded destructive, daemon, and health scripts. -->
<fileSet>
<outputDirectory>tools</outputDirectory>
<directory>${project.basedir}/../scripts/tools</directory>
<excludes>
<exclude>*ainode.*</exclude>
<exclude>**/*ainode.*</exclude>
<exclude>ops/daemon-*.sh</exclude>
<exclude>ops/destroy-*.sh</exclude>
<exclude>ops/health_check.sh</exclude>
<exclude>windows/ops/destroy-*.bat</exclude>
<exclude>windows/ops/health_check.bat</exclude>
</excludes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.basedir}/../iotdb-client/cli/src/assembly/resources/conf/logback-backup.xml</source>
<outputDirectory>conf</outputDirectory>
<fileMode>0755</fileMode>
</file>
<file>
<source>${maven.multiModuleProjectDirectory}/external-service-impl/mqtt/target/mqtt-${project.version}-jar-with-dependencies.jar</source>
<outputDirectory>lib</outputDirectory>
</file>
<file>
<source>${maven.multiModuleProjectDirectory}/external-service-impl/rest/target/rest-${project.version}-jar-with-dependencies.jar</source>
<outputDirectory>lib</outputDirectory>
</file>
</files>
<componentDescriptors>
<componentDescriptor>common-files.xml</componentDescriptor>
</componentDescriptors>
</assembly>
Loading
Loading