You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ja...@apache.org on 2024/08/28 13:00:02 UTC
(tsfile) branch rc/1.1 updated (e5d64fa3 -> 9f92203e)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a change to branch rc/1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git
from e5d64fa3 Add short-circuit evaluation and use Freemarker to generate filters for different data types.
new 7b7d018b Fix log when closing TsFile. Allow to close TsFile even if no device is written. Fix tablet generation in test.
new 86d5641f Optimize code coverage structure (#195)
new 9f92203e change version
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/code-coverage.yml | 2 +-
.gitignore | 1 +
code-coverage/copy-code-coverage-sources.sh | 31 -------
code-coverage/pom.xml | 132 ----------------------------
cpp/pom.xml | 2 +-
cpp/src/file/write_file.cc | 8 +-
cpp/test/writer/tsfile_writer_test.cc | 12 +--
java/common/pom.xml | 2 +-
java/examples/pom.xml | 4 +-
java/pom.xml | 4 +-
java/tsfile/pom.xml | 4 +-
pom.xml | 5 +-
python/pom.xml | 2 +-
13 files changed, 24 insertions(+), 185 deletions(-)
delete mode 100755 code-coverage/copy-code-coverage-sources.sh
delete mode 100644 code-coverage/pom.xml
(tsfile) 02/03: Optimize code coverage structure (#195)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rc/1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 86d5641f66a6f12f3708dc2851f19a00e4d31c2f
Author: Haonan <hh...@outlook.com>
AuthorDate: Fri Aug 2 17:13:48 2024 +0800
Optimize code coverage structure (#195)
---
.github/workflows/code-coverage.yml | 2 +-
code-coverage/copy-code-coverage-sources.sh | 31 -------
code-coverage/pom.xml | 132 ----------------------------
pom.xml | 3 -
4 files changed, 1 insertion(+), 167 deletions(-)
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index 69c278f6..3fa85d2f 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -39,4 +39,4 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- files: code-coverage/target/jacoco-merged-reports/jacoco.xml,cpp/target/build/test/coverage_report/index.html
+ files: java/tsfile/target/jacoco-merged-reports/jacoco.xml,cpp/target/build/test/coverage_report/index.html
diff --git a/code-coverage/copy-code-coverage-sources.sh b/code-coverage/copy-code-coverage-sources.sh
deleted file mode 100755
index 19c24fd1..00000000
--- a/code-coverage/copy-code-coverage-sources.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-#
-# 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.
-#
-
-for file in ../java/*/target/*.exec
-do
- cp $file ./target/
-done
-
-for file in ../java/*/target/classes
-do
- echo "copy from" ${file}
- cp -r $file ./target/
-done
-
diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
deleted file mode 100644
index b75bee1e..00000000
--- a/code-coverage/pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tsfile</groupId>
- <artifactId>tsfile-parent</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>tsfile-code-coverage</artifactId>
- <packaging>pom</packaging>
- <name>TsFile: Code-Coverage</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>make-cmake-executable</id>
- <goals>
- <goal>exec</goal>
- </goals>
- <phase>process-resources</phase>
- <configuration>
- <basedir>${project.basedir}</basedir>
- <executable>chmod</executable>
- <arguments>
- <argument>+x</argument>
- <argument>copy-code-coverage-sources.sh</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>collect-code-coverage-results</id>
- <goals>
- <goal>exec</goal>
- </goals>
- <phase>post-integration-test</phase>
- <configuration>
- <executable>${project.basedir}/copy-code-coverage-sources.sh</executable>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <configuration>
- <rules>
- <rule implementation="org.jacoco.maven.RuleConfiguration">
- <element>BUNDLE</element>
- <limits>
- <!-- Cover methodes >=30%. (the plugin does not support
- ignore getter and setter and toString etc..) -->
- <limit implementation="org.jacoco.report.check.Limit">
- <counter>METHOD</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.00</minimum>
- </limit>
- <!-- if-else, swtich etc.. >=70% -->
- <limit implementation="org.jacoco.report.check.Limit">
- <counter>BRANCH</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.00</minimum>
- </limit>
- <!-- class files >=95% -->
- <limit implementation="org.jacoco.report.check.Limit">
- <counter>CLASS</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.00</minimum>
- </limit>
- </limits>
- </rule>
- </rules>
- </configuration>
- <executions>
- <!-- see https://natritmeyer.com/howto/reporting-aggregated-unit-and-integration-test-coverage-with-jacoco/-->
- <execution>
- <id>merge-unit-and-integration-final</id>
- <goals>
- <goal>merge</goal>
- </goals>
- <phase>post-integration-test</phase>
- <configuration>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/</directory>
- <includes>
- <include>*.exec</include>
- </includes>
- </fileSet>
- </fileSets>
- <destFile>${project.build.directory}/merged.exec</destFile>
- </configuration>
- </execution>
- <execution>
- <id>create-merged-report-final</id>
- <goals>
- <goal>report</goal>
- <goal>check</goal>
- </goals>
- <phase>post-integration-test</phase>
- <configuration>
- <dataFile>${project.build.directory}/merged.exec</dataFile>
- <outputDirectory>${project.build.directory}/jacoco-merged-reports</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/pom.xml b/pom.xml
index 89907d03..a1d42bff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -895,9 +895,6 @@
</profile>
<profile>
<id>with-code-coverage</id>
- <modules>
- <module>code-coverage</module>
- </modules>
<build>
<plugins>
<!--
(tsfile) 01/03: Fix log when closing TsFile. Allow to close TsFile even if no device is written. Fix tablet generation in test.
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rc/1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 7b7d018b2caee1be5d4b3913327f5fdca29e70fa
Author: Tian Jiang <jt...@163.com>
AuthorDate: Wed Aug 7 17:14:33 2024 +0800
Fix log when closing TsFile.
Allow to close TsFile even if no device is written.
Fix tablet generation in test.
---
.gitignore | 1 +
cpp/src/file/write_file.cc | 8 ++++++--
cpp/test/writer/tsfile_writer_test.cc | 12 ++++++------
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index 944ecf5a..00adb1bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ python/tsfile/*.h
python/tsfile/*.cpp
python/data
python/venv/*
+cpp/cmake-build-debug-mingw/
diff --git a/cpp/src/file/write_file.cc b/cpp/src/file/write_file.cc
index 2fb08c26..112e4349 100644
--- a/cpp/src/file/write_file.cc
+++ b/cpp/src/file/write_file.cc
@@ -120,12 +120,16 @@ int WriteFile::sync() {
int WriteFile::close() {
ASSERT(fd_ > 0);
if (::close(fd_) < 0) {
- std::cout << "feild to close " << path_ << " errorno " << errno
+ #ifdef DEBUG_SE
+ std::cout << "failed to close " << path_ << " errorno " << errno
<< std::endl;
+ #endif
// log_err("file close error, path=%s, errno=%d", path_.c_str(), errno);
return E_FILE_CLOSE_ERR;
}
- std::cout << "coulse finish" << std::endl;
+ #ifdef DEBUG_SE
+ std::cout << "close finish" << std::endl;
+ #endif
return E_OK;
}
diff --git a/cpp/test/writer/tsfile_writer_test.cc b/cpp/test/writer/tsfile_writer_test.cc
index 4f52e197..b934bdce 100644
--- a/cpp/test/writer/tsfile_writer_test.cc
+++ b/cpp/test/writer/tsfile_writer_test.cc
@@ -135,22 +135,22 @@ TEST_F(TsFileWriterTest, WriteMultipleTabletsInt64) {
for (int i = 0; i < device_num; i++) {
std::string device_name = "test_device" + std::to_string(i);
+ int max_rows = 100;
+ Tablet tablet(device_name, &schema_vec[i], max_rows);
+ tablet.init();
for (int j = 0; j < measurement_num; j++) {
- int max_rows = 100;
- Tablet tablet(device_name, &schema_vec[i], max_rows);
- tablet.init();
for (int row = 0; row < max_rows; row++) {
tablet.set_timestamp(row, 16225600 + row);
}
for (int row = 0; row < max_rows; row++) {
- tablet.set_value(row, j, row);
+ tablet.set_value(row, j, static_cast<int64_t>(row));
}
- ASSERT_EQ(tsfile_writer_->write_tablet(tablet), E_OK);
}
+ ASSERT_EQ(tsfile_writer_->write_tablet(tablet), E_OK);
}
ASSERT_EQ(tsfile_writer_->flush(), E_OK);
- tsfile_writer_->close();
+ ASSERT_EQ(tsfile_writer_->close(), E_OK);
}
TEST_F(TsFileWriterTest, WriteMultipleTabletsDouble) {
(tsfile) 03/03: change version
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rc/1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 9f92203e2bc28880c1e037acc4d235f22a2f9eb0
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Mon Aug 12 20:32:56 2024 +0800
change version
---
cpp/pom.xml | 2 +-
java/common/pom.xml | 2 +-
java/examples/pom.xml | 4 ++--
java/pom.xml | 4 ++--
java/tsfile/pom.xml | 4 ++--
pom.xml | 2 +-
python/pom.xml | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/cpp/pom.xml b/cpp/pom.xml
index 3390c0f4..3342950e 100644
--- a/cpp/pom.xml
+++ b/cpp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-parent</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>tsfile-cpp</artifactId>
<packaging>pom</packaging>
diff --git a/java/common/pom.xml b/java/common/pom.xml
index 91b24366..bfb8d1ad 100644
--- a/java/common/pom.xml
+++ b/java/common/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-java</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>common</artifactId>
<name>TsFile: Java: Common</name>
diff --git a/java/examples/pom.xml b/java/examples/pom.xml
index 8f215aaa..c5a55be8 100644
--- a/java/examples/pom.xml
+++ b/java/examples/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-java</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>examples</artifactId>
<packaging>pom</packaging>
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
diff --git a/java/pom.xml b/java/pom.xml
index 9f207cd7..047add05 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -24,10 +24,10 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-parent</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>tsfile-java</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
<packaging>pom</packaging>
<name>TsFile: Java</name>
<modules>
diff --git a/java/tsfile/pom.xml b/java/tsfile/pom.xml
index 2e410168..06d22f8f 100644
--- a/java/tsfile/pom.xml
+++ b/java/tsfile/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-java</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>tsfile</artifactId>
<name>TsFile: Java: TsFile</name>
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.tsfile</groupId>
<artifactId>common</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
diff --git a/pom.xml b/pom.xml
index a1d42bff..be8c98d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
</parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-parent</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache TsFile Project Parent POM</name>
<properties>
diff --git a/python/pom.xml b/python/pom.xml
index 0efca65c..e11fde5f 100644
--- a/python/pom.xml
+++ b/python/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-parent</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.1.0-86d5641f-SNAPSHOT</version>
</parent>
<artifactId>tsfile-python</artifactId>
<packaging>pom</packaging>