Skip to content

Commit ab02f75

Browse files
authored
[To dev/1.3] Implement high availability for the C++ client and support tsblock (#15594)
* Implement high availability for the C++ client and support tsblock * fix issues on windows
1 parent 3ed3a08 commit ab02f75

25 files changed

Lines changed: 6946 additions & 2244 deletions

iotdb-client/client-cpp/pom.xml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,32 @@
7272
</execution>
7373
</executions>
7474
</plugin>
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-resources-plugin</artifactId>
78+
<executions>
79+
<execution>
80+
<id>copy-cpp-files</id>
81+
<goals>
82+
<goal>copy-resources</goal>
83+
</goals>
84+
<phase>validate</phase>
85+
<configuration>
86+
<outputDirectory>${project.build.directory}/build/main/generated-sources-cpp</outputDirectory>
87+
<resources>
88+
<resource>
89+
<directory>${project.basedir}/src/main</directory>
90+
<includes>
91+
<include>**/*.h</include>
92+
<include>**/*.cpp</include>
93+
<include>**/*.cc</include>
94+
</includes>
95+
</resource>
96+
</resources>
97+
</configuration>
98+
</execution>
99+
</executions>
100+
</plugin>
75101
<plugin>
76102
<groupId>org.apache.maven.plugins</groupId>
77103
<artifactId>maven-dependency-plugin</artifactId>
@@ -155,14 +181,6 @@
155181
<sourceFile>${project.basedir}/src/main/CMakeLists.txt</sourceFile>
156182
<destinationFile>${project.build.directory}/build/main/CMakeLists.txt</destinationFile>
157183
</fileSet>
158-
<fileSet>
159-
<sourceFile>${project.basedir}/src/main/Session.h</sourceFile>
160-
<destinationFile>${project.build.directory}/build/main/generated-sources-cpp/Session.h</destinationFile>
161-
</fileSet>
162-
<fileSet>
163-
<sourceFile>${project.basedir}/src/main/Session.cpp</sourceFile>
164-
<destinationFile>${project.build.directory}/build/main/generated-sources-cpp/Session.cpp</destinationFile>
165-
</fileSet>
166184
</fileSets>
167185
</configuration>
168186
</execution>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
#ifndef IOTDB_ABSTRACTSESSIONBUILDER_H
21+
#define IOTDB_ABSTRACTSESSIONBUILDER_H
22+
23+
#include <string>
24+
25+
class AbstractSessionBuilder {
26+
public:
27+
std::string host = "localhost";
28+
int rpcPort = 6667;
29+
std::string username = "root";
30+
std::string password = "root";
31+
std::string zoneId = "";
32+
int fetchSize = 10000;
33+
std::string sqlDialect = "tree";
34+
std::string database = "";
35+
bool enableAutoFetch = true;
36+
bool enableRedirections = true;
37+
bool enableRPCCompression = false;
38+
};
39+
40+
#endif // IOTDB_ABSTRACTSESSIONBUILDER_H

0 commit comments

Comments
 (0)