Skip to content

Commit

Permalink
Merge branch 'master' into force_ci/alter_column_datatype
Browse files Browse the repository at this point in the history
# Conflicts:
#	integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppDataNodeConfig.java
#	integration-test/src/main/java/org/apache/iotdb/it/env/remote/config/RemoteDataNodeConfig.java
#	integration-test/src/main/java/org/apache/iotdb/itbase/env/DataNodeConfig.java
#	iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
#	iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnSchema.java
#	pom.xml
  • Loading branch information
jt2594838 committed Jan 24, 2025
2 parents d07c818 + 52da698 commit 3d76803
Show file tree
Hide file tree
Showing 695 changed files with 23,898 additions and 5,935 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cluster-it-1c1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
Simple:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster-it-1c1d1a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
AINode:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster-it-1c3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
Simple:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
compile-check:
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/daily-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
Simple:
Expand All @@ -33,8 +33,6 @@ jobs:
java-version: ${{ matrix.java }}
- name: IT/UT Test
shell: bash
# we do not compile client-cpp for saving time, it is tested in client.yml
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
run: |
mvn clean verify \
-P with-integration-tests \
Expand All @@ -49,3 +47,37 @@ jobs:
name: cluster-log-java${{ matrix.java }}-${{ runner.os }}
path: integration-test/target/cluster-logs
retention-days: 3
SingleRegionTableModel:
strategy:
fail-fast: false
max-parallel: 15
matrix:
java: [ 8, 17 ]
runs-on: [ self-hosted, iotdb ]
# group: self-hosted
# labels: iotdb
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: IT/UT Test
shell: bash
# we do not compile client-cpp for saving time, it is tested in client.yml
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
run: |
mvn clean verify \
-P with-integration-tests \
-DskipUTs \
-DintegrationTest.forkCount=2 -DDataNodeMaxHeapSize=1024 -DintegrationTest.dataRegionPerDataNode=1\
-pl integration-test \
-am -PTableSimpleIT
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: table-standalone-log-java${{ matrix.java }}-${{ runner.os }}
path: integration-test/target/cluster-logs
retention-days: 3
2 changes: 1 addition & 1 deletion .github/workflows/daily-ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
unit-test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
dependency-check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pipe-it-2cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
auto-create-schema:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
PR_NUMBER: ${{ github.event.number }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
codecov:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/table-cluster-it-1c1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
Simple:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/table-cluster-it-1c3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
Simple:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ concurrency:
env:
MAVEN_OPTS: -Xms2g -Xmx4g -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
unit-test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
dependency-check:
Expand Down
3 changes: 2 additions & 1 deletion .mvn/develocity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
-->
<develocity xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
<projectId>iotdb</projectId>
<server>
<url>https://ge.apache.org</url>
<url>https://develocity.apache.org</url>
</server>
<buildScan>
<backgroundBuildScanUpload>#{isFalse(env['GITHUB_ACTIONS'])}</backgroundBuildScanUpload>
Expand Down
4 changes: 2 additions & 2 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.21.3</version>
<version>1.22.2</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>2.0</version>
<version>2.0.1</version>
</extension>
</extensions>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.iotdb.db.pipe.event.common.heartbeat.PipeHeartbeatEvent;
import org.apache.iotdb.db.pipe.event.common.tablet.PipeRawTabletInsertionEvent;
import org.apache.iotdb.pipe.api.PipeProcessor;
import org.apache.iotdb.pipe.api.annotation.TreeModel;
import org.apache.iotdb.pipe.api.collector.EventCollector;
import org.apache.iotdb.pipe.api.customizer.configuration.PipeProcessorRuntimeConfiguration;
import org.apache.iotdb.pipe.api.customizer.parameter.PipeParameterValidator;
Expand All @@ -37,6 +38,7 @@
import java.util.Collections;
import java.util.concurrent.atomic.AtomicLong;

@TreeModel
public class CountPointProcessor implements PipeProcessor {
private static final String AGGREGATE_SERIES_KEY = "aggregate-series";
private static final AtomicLong writePointCount = new AtomicLong(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.tsfile.enums.TSDataType;
import org.apache.tsfile.file.metadata.enums.CompressionType;
import org.apache.tsfile.file.metadata.enums.TSEncoding;
import org.apache.tsfile.utils.BitMap;
import org.apache.tsfile.write.record.Tablet;
import org.apache.tsfile.write.schema.IMeasurementSchema;
import org.apache.tsfile.write.schema.MeasurementSchema;
Expand Down Expand Up @@ -341,18 +340,14 @@ private static void insertTabletWithAlignedTimeseriesMethod2()
schemaList.add(new MeasurementSchema("s2", TSDataType.INT32));

Tablet tablet = new Tablet(ROOT_SG1_D1_VECTOR2, schemaList);
long[] timestamps = tablet.timestamps;
Object[] values = tablet.values;

for (long time = 100; time < 200; time++) {
int row = tablet.getRowSize();
tablet.addTimestamp(row, time);

long[] sensor1 = (long[]) values[0];
sensor1[row] = new SecureRandom().nextLong();
tablet.addValue(row, 0, new SecureRandom().nextLong());

int[] sensor2 = (int[]) values[1];
sensor2[row] = new SecureRandom().nextInt();
tablet.addValue(row, 1, new SecureRandom().nextInt());

if (tablet.getRowSize() == tablet.getMaxRowNumber()) {
session.insertAlignedTablet(tablet, true);
Expand All @@ -378,32 +373,19 @@ private static void insertNullableTabletWithAlignedTimeseries()

Tablet tablet = new Tablet(ROOT_SG1_D1_VECTOR3, schemaList);

long[] timestamps = tablet.timestamps;
Object[] values = tablet.values;
// Use the bitMap to mark the null value point
BitMap[] bitMaps = new BitMap[values.length];
tablet.bitMaps = bitMaps;

bitMaps[1] = new BitMap(tablet.getMaxRowNumber());
for (long time = 200; time < 300; time++) {
int row = tablet.getRowSize();
tablet.addTimestamp(row, time);

long[] sensor1 = (long[]) values[0];
sensor1[row] = new SecureRandom().nextLong();

int[] sensor2 = (int[]) values[1];
sensor2[row] = new SecureRandom().nextInt();
tablet.addValue(row, 0, new SecureRandom().nextLong());

// mark this point as null value
if (time % 5 == 0) {
bitMaps[1].mark(row);
if (time % 5 != 0) {
tablet.addValue(row, 1, new SecureRandom().nextInt());
}

if (tablet.getRowSize() == tablet.getMaxRowNumber()) {
session.insertAlignedTablet(tablet, true);
tablet.reset();
bitMaps[1].reset();
}
}

Expand Down Expand Up @@ -595,44 +577,5 @@ private static void insertTabletsWithAlignedTimeseries()
tablet2.reset();
tablet3.reset();
}

// Method 2 to add tablet data
long[] timestamps1 = tablet1.timestamps;
Object[] values1 = tablet1.values;
long[] timestamps2 = tablet2.timestamps;
Object[] values2 = tablet2.values;
long[] timestamps3 = tablet3.timestamps;
Object[] values3 = tablet3.values;

for (long time = 0; time < 100; time++) {
int row1 = tablet1.getRowSize();
int row2 = tablet2.getRowSize();
int row3 = tablet3.getRowSize();
tablet1.addTimestamp(row1, time);
tablet2.addTimestamp(row2, time);
tablet3.addTimestamp(row3, time);
for (int i = 0; i < 2; i++) {
long[] sensor1 = (long[]) values1[i];
sensor1[row1] = i;
long[] sensor2 = (long[]) values2[i];
sensor2[row2] = i;
long[] sensor3 = (long[]) values3[i];
sensor3[row3] = i;
}
if (tablet1.getRowSize() == tablet1.getMaxRowNumber()) {
session.insertAlignedTablets(tabletMap, true);

tablet1.reset();
tablet2.reset();
tablet3.reset();
}
}

if (tablet1.getRowSize() != 0) {
session.insertAlignedTablets(tabletMap, true);
tablet1.reset();
tablet2.reset();
tablet3.reset();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ private static void insertTablet(Session session, String deviceId)

Tablet tablet = new Tablet(deviceId, schemaList, 100);

// Method 1 to add tablet data
long timestamp = System.currentTimeMillis();
for (long row = 0; row < 100; row++) {
int rowIndex = tablet.getRowSize();
Expand All @@ -171,27 +170,5 @@ private static void insertTablet(Session session, String deviceId)
session.insertTablet(tablet);
tablet.reset();
}

// Method 2 to add tablet data
long[] timestamps = tablet.timestamps;
Object[] values = tablet.values;

for (long time = 0; time < 100; time++) {
int row = tablet.getRowSize();
tablet.addTimestamp(row, time);
for (int i = 0; i < 3; i++) {
long[] sensor = (long[]) values[i];
sensor[row] = i;
}
if (tablet.getRowSize() == tablet.getMaxRowNumber()) {
session.insertTablet(tablet, true);
tablet.reset();
}
}

if (tablet.getRowSize() != 0) {
session.insertTablet(tablet);
tablet.reset();
}
}
}
Loading

0 comments on commit 3d76803

Please sign in to comment.