Skip to content

Commit ff3cac4

Browse files
Merge pull request #23 from F2I-Consulting/dev
v0.3.0.0
2 parents f206630 + 8844b1c commit ff3cac4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+6079
-566
lines changed

.github/workflows/github-actions.yml

Lines changed: 132 additions & 80 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
/swig/swigGeneratedJavaWrapper.cpp
1313
/swig/swigGeneratedJavaWrapper.h
1414

15-
## Ignore python swig generated files
16-
/swig/swigGeneratedPythonWrapper.cpp
17-
/swig/swigGeneratedPythonWrapper.h
18-
1915
## Ignore Visual Studio Code files
2016
##
2117
## Get latest from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore

CMakeLists.txt

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
cmake_minimum_required(VERSION 3.12)
1+
if (WIN32)
2+
cmake_minimum_required(VERSION 3.21)
3+
else ()
4+
cmake_minimum_required(VERSION 3.12)
5+
endif (WIN32)
26

37
project(Fetpapi)
48

@@ -11,7 +15,7 @@ set (FETPAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1115

1216
# version mechanism
1317
set (Fetpapi_VERSION_MAJOR 0)
14-
set (Fetpapi_VERSION_MINOR 2)
18+
set (Fetpapi_VERSION_MINOR 3)
1519
set (Fetpapi_VERSION_PATCH 0)
1620
set (Fetpapi_VERSION_TWEAK 0)
1721

@@ -98,7 +102,7 @@ find_package (Threads)
98102
# Boost DEPENDENCY
99103
find_package(Boost 1.70)
100104
if (NOT Boost_FOUND)
101-
# Boost system is required for Beast untill version 1.70 : https://www.boost.org/doc/libs/1_69_0/libs/beast/doc/html/beast/introduction.html
105+
# Boost system is required for Beast until version 1.70 : https://www.boost.org/doc/libs/1_69_0/libs/beast/doc/html/beast/introduction.html
102106
find_package(Boost 1.66 REQUIRED system)
103107
endif()
104108
if (WIN32 AND (Boost_VERSION_MAJOR EQUAL 1) AND (Boost_VERSION_MINOR LESS 74) AND (Boost_VERSION_MINOR GREATER 71))
@@ -147,6 +151,10 @@ if (WITH_ETP_SSL)
147151
find_package(OpenSSL REQUIRED)
148152
endif()
149153
target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
154+
# OpenSSL::applink is recommended under MSVC : https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
155+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
156+
target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::applink)
157+
endif ()
150158
endif ()
151159

152160
if (WITH_FESAPI)
@@ -182,41 +190,21 @@ endif (WITH_PYTHON_WRAPPING)
182190
# Getting source files
183191
# ============================================================================
184192

185-
file (GLOB FETPAPI_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/*.cpp)
186-
file (GLOB FETPAPI_PROTOCOL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/ProtocolHandlers/*.cpp)
187-
file (GLOB FETPAPI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/*.h)
188-
file (GLOB FETPAPI_PROTOCOL_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/ProtocolHandlers/*.h)
189-
file (GLOB FETPAPI_TOOLS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/tools/*.cpp)
190-
file (GLOB FETPAPI_TOOLS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/tools/*.h)
193+
include(${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt)
191194
set (ALL_SOURCES_AND_HEADERS
192195
${ALL_SOURCES_AND_HEADERS}
193196
${FETPAPI_SOURCES}
194-
${FETPAPI_PROTOCOL_SOURCES}
195197
${FETPAPI_HEADERS}
198+
${FETPAPI_PROTOCOL_SOURCES}
196199
${FETPAPI_PROTOCOL_HEADERS}
197200
${FETPAPI_TOOLS_HEADERS}
198-
${FETPAPI_TOOLS_SOURCES}
201+
${FETPAPI_FESAPI_SOURCES}
202+
${FETPAPI_FESAPI_HEADERS}
203+
${FETPAPI_SSL_SOURCES}
204+
${FETPAPI_SSL_HEADERS}
199205
)
200206

201-
if (WITH_ETP_SSL)
202-
file (GLOB FETPAPI_SSL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/ssl/*.cpp)
203-
file (GLOB FETPAPI_SSL_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/ssl/*.h)
204-
205-
set (ALL_SOURCES_AND_HEADERS
206-
${ALL_SOURCES_AND_HEADERS}
207-
${FETPAPI_SSL_SOURCES}
208-
${FETPAPI_SSL_HEADERS}
209-
)
210-
endif (WITH_ETP_SSL)
211-
212207
if (WITH_FESAPI)
213-
file (GLOB FETPAPI_FESAPI_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/fesapi/*.cpp)
214-
file (GLOB FETPAPI_FESAPI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/etp/fesapi/*.h)
215-
set (ALL_SOURCES_AND_HEADERS
216-
${ALL_SOURCES_AND_HEADERS}
217-
${FETPAPI_FESAPI_SOURCES}
218-
${FETPAPI_FESAPI_HEADERS}
219-
)
220208
target_include_directories(${PROJECT_NAME} PRIVATE ${FESAPI_INCLUDE_DIR})
221209
endif (WITH_FESAPI)
222210

@@ -233,7 +221,7 @@ target_include_directories(${PROJECT_NAME} INTERFACE
233221

234222
# organizing sources and headers in the Visual Studio Project
235223
if (WIN32)
236-
source_group ("tools" FILES ${FETPAPI_TOOLS_SOURCES} ${FETPAPI_TOOLS_HEADERS})
224+
source_group ("tools" FILES ${FETPAPI_TOOLS_HEADERS})
237225

238226
set (ETP_PREFIX "etp")
239227
source_group ("${ETP_PREFIX}" FILES ${FETPAPI_SOURCES} ${FETPAPI_HEADERS})
@@ -339,4 +327,29 @@ if (WITH_FESAPI)
339327
endif (WITH_FESAPI)
340328

341329
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FetpapiConfig.cmake
342-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Fetpapi")
330+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Fetpapi")
331+
332+
if (WITH_PYTHON_WRAPPING)
333+
IF (WIN32)
334+
install (
335+
TARGETS ${PROJECT_NAME}
336+
RUNTIME DESTINATION ${CMAKE_CURRENT_LIST_DIR}/python/fetpapi/
337+
)
338+
install(
339+
TARGETS ${PROJECT_NAME}
340+
RUNTIME_DEPENDENCY_SET dep-set
341+
)
342+
cmake_path(GET SSL_EAY_RELEASE PARENT_PATH openSslLibPath)
343+
cmake_path(GET openSslLibPath PARENT_PATH openSslPath)
344+
cmake_path(APPEND openSslPath "bin" OUTPUT_VARIABLE openSslBinPath)
345+
install(
346+
RUNTIME_DEPENDENCY_SET dep-set
347+
PRE_EXCLUDE_REGEXES "api-ms-.*" "ext-ms-.*" "[Ff]esapi[Cc]pp.*\\.dll"
348+
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
349+
DIRECTORIES ${openSslBinPath}
350+
RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/python/fetpapi/
351+
)
352+
ENDIF (WIN32)
353+
install(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/setup.py bdist_wheel
354+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/python)")
355+
endif (WITH_PYTHON_WRAPPING)

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
# Prepare your build environment
3-
- Create a folder called fesapiEnv.
3+
- Create a folder called fetpapiEnv.
44
- In this folder create the three following folders
55
- build
6-
- fetpapi (Git clone this repository into this folder "fetpapi". You should then have a path fesapiEnv/fetpapi/src)
6+
- fetpapi (Git clone this repository into this folder "fetpapi". You should then have a path fetpapiEnv/fetpapi/src)
77
- dependencies
88
- The following compilers are known to work (used in CI)
99
- gcc from version 4.8
@@ -15,22 +15,19 @@ Download (build and install if necessary) third party libraries:
1515
- (OPTIONALLY) OpenSSL : version 1.1 is known to work.
1616
- (OPTIONALLY) [FESAPI](https://github.com/F2I-Consulting/fesapi/releases) : All versions from version 2.7.0.0 should be ok.
1717

18-
We advise you to install these third party libraries respectively into
19-
- fesapiEnv/dependencies/boost-particularVersion
20-
- fesapiEnv/dependencies/avro-particularVersion
2118
# Configure the build
2219
FETPAPI uses cmake as its build tool. A 3.12 version or later of cmake is required https://cmake.org/download/. We also recommend using cmake-gui (already included in the bin folder of the binary releases of cmake) which provides a graphical user interface on top of cmake. If you want to use cmake in command line, you would find example in [Github Actions file](./.github/workflows/github-actions.yml). Follow the below instructions :
2320

24-
- yourPath/fesapiEnv/fetpapi defines where is the source code folder
25-
- yourPath/fesapiEnv/build/theNameYouWant defines where to build the binaries
21+
- yourPath/fetpapiEnv/fetpapi defines where is the source code folder
22+
- yourPath/fetpapiEnv/build/theNameYouWant defines where to build the binaries
2623
- Click on "Configure" button and select your favorite compiler : it will raise several errors.
2724
- give real path and files to the following cmake variables:
2825
- BOOST
2926
- Boost_INCLUDE_DIR : the directory where you can find the directory named "boost" which contain all BOOST headers
3027
- AVRO (using [our own cmake find module](./cmake/modules/FindAVRO.cmake))
3128
- (ONLY IF NOT AUTOMATICALLY FOUND) AVRO_ROOT : The path to the folder containing include and lib folders of AVRO
3229
- Click again on "Configure" button. You should no more have errors so you can now click on "Generate" button.
33-
- You can now build your solution with your favorite compiler (and linker) using the generated solution in yourPath/fesapiEnv/build/theNameYouWant
30+
- You can now build your solution with your favorite compiler (and linker) using the generated solution in yourPath/fetpapiEnv/build/theNameYouWant
3431
- OPTIONALLY, you can also set the variables WITH_DOTNET_WRAPPING, WITH_PYTHON_WRAPPING to true if you want to also generate wrappers on top of FETPAPI for these two other programming languages. Don't forget to click again on "Configure" button once you changed the value of these two variables.
3532
- You will then have to also provide the path to the SWIG (version 3 as a mininum version) executable http://swig.org/download.html in the SWIG_EXECUTABLE variable (and click again on "Configure" button)
3633
- you will find the wrappers in fetpapi/cs/src (fetpapi/cs also contains a VS2015 project for the wrappers) or fetpapi/python/src
@@ -44,9 +41,9 @@ FETPAPI uses cmake as its build tool. A 3.12 version or later of cmake is requir
4441
Remark : you can choose where FETPAPI will be installed (using "make install" on Linux or by generating the "INSTALL" project on Visual Studio) by setting the cmake variable called CMAKE_INSTALL_PREFIX
4542
# How to start
4643
As a first way to start, we advise people to look at examples provided with FESAPI. Please give a look at:
47-
- C++ : client ([here](https://github.com/F2I-Consulting/fetpapiClient)) and server ([here](https://github.com/F2I-Consulting/fetpapiServer)) examples.
44+
- C++ : [in example/withFesapi/etpClient.cpp](./example/withFesapi/etpClient.cpp) or [in example/withoutFesapi/etpClient.cpp](./example/withoutFesapi/etpClient.cpp)
4845
- C# : client ([here](https://github.com/F2I-Consulting/fetpapiClient/tree/main/cs)) : FetpapiClient.cs will be generated by cmake configuration when WITH_DOTNET_WRAPPING is ON, the source file is initially located in ([cmake/Program.cs](https://github.com/F2I-Consulting/fetpapiClient/blob/main/cmake/FetpapiClient.cs.in))
49-
- Java (JDK 1.5 and later) : client ([here](https://github.com/F2I-Consulting/fetpapiClient/tree/main/java))
46+
- Java (JDK 1.5 and later) : in java/src/com/f2i_consulting/example/FetpapiClientUsingFesapi.java (FetpapiClientUsingFesapi.java will be generated by cmake configuration when WITH_JAVA_WRAPPING is ON, the source file is initially located [in cmake/FetpapiClientUsingFesapi.java](./cmake/FetpapiClientUsingFesapi.java))
5047
- Python3 (no support for Python2) : in ([python/example/example.py](https://github.com/F2I-Consulting/fetpapiClient/tree/main/python/src/etp_client_example.py)) (please follow instructions in the documentation header of this example python file)
5148

5249
You can also find Doxygen generated documentation [here](https://f2i-consulting.com/fetpapi/doxygen/)

cmake/FetpapiClientUsingFesapi.java

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
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+
package com.f2i_consulting.fetpapi.client;
20+
21+
import java.util.Optional;
22+
import java.util.UUID;
23+
import java.util.concurrent.TimeUnit;
24+
25+
import com.f2i_consulting.fesapi.SWIGTYPE_p_double;
26+
import com.f2i_consulting.fesapi.fesapi;
27+
import com.f2i_consulting.fesapi.common.DataObjectRepository;
28+
import com.f2i_consulting.fesapi.resqml2.AbstractValuesProperty;
29+
import com.f2i_consulting.fesapi.resqml2.IjkGridExplicitRepresentation;
30+
import com.f2i_consulting.fetpapi.DataspaceVector;
31+
import com.f2i_consulting.fetpapi.MapStringDataObject;
32+
import com.f2i_consulting.fetpapi.MapStringString;
33+
import com.f2i_consulting.fetpapi.ResourceVector;
34+
import com.f2i_consulting.fetpapi.fetpapi;
35+
import com.f2i_consulting.fetpapi.Energistics.Etp.v12.Datatypes.Object.ContextInfo;
36+
import com.f2i_consulting.fetpapi.Energistics.Etp.v12.Datatypes.Object.ContextScopeKind;
37+
import com.f2i_consulting.fetpapi.Energistics.Etp.v12.Datatypes.Object.DataObject;
38+
import com.f2i_consulting.fetpapi.Energistics.Etp.v12.Datatypes.Object.Dataspace;
39+
import com.f2i_consulting.fetpapi.Energistics.Etp.v12.Datatypes.Object.Resource;
40+
import com.f2i_consulting.fetpapi.etp.ClientSession;
41+
import com.f2i_consulting.fetpapi.etp.CoreHandlers;
42+
import com.f2i_consulting.fetpapi.etp.DataArrayHandlers;
43+
import com.f2i_consulting.fetpapi.etp.DataspaceHandlers;
44+
import com.f2i_consulting.fetpapi.etp.DiscoveryHandlers;
45+
import com.f2i_consulting.fetpapi.etp.FesapiHdfProxyFactory;
46+
import com.f2i_consulting.fetpapi.etp.InitializationParameters;
47+
import com.f2i_consulting.fetpapi.etp.StoreHandlers;
48+
49+
public class FetpapiClientUsingFesapi {
50+
51+
/**
52+
* Loading the FesapiCpp and Fetpapi native libraries
53+
*/
54+
static {
55+
try {
56+
System.loadLibrary("${FESAPI_ASSEMBLY_NAME}");
57+
}
58+
catch (UnsatisfiedLinkError e) {
59+
System.out.println("UnsatisfiedLinkError : " + e.toString());
60+
}
61+
try {
62+
System.loadLibrary("${ASSEMBLY_NAME}");
63+
}
64+
catch (UnsatisfiedLinkError e) {
65+
System.out.println("UnsatisfiedLinkError : " + e.toString());
66+
}
67+
}
68+
69+
public static void main(String[] args) {
70+
// Read arguments of the command line
71+
String serverUrl = "ws://etp.f2i-consulting.com:9002/";
72+
String authorization = "";
73+
74+
if (args.length < 1) {
75+
System.out.println("Program arguments should be : serverUrl \"<BearerOrBasic> <token>\"");
76+
System.out.println("WARNING : you did not provide a server URL. The URL will be defaulted to ws://etp.f2i-consulting.com:9002/");
77+
}
78+
else {
79+
serverUrl = args[0];
80+
if (args.length < 2) {
81+
System.out.println("Program arguments should be : serverUrl \"Bearer <token>\"");
82+
System.out.println("WARNING : You did not provide any authorizaton after the URL. Please see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization for further details");
83+
}
84+
else {
85+
if (!args[1].startsWith("Basic ") && !args[1].startsWith("Bearer ")) {
86+
System.out.println("WARNING : HTTP authorization \"" + args[3] + "\" field does not start with \"Basic \" nor \"Bearer \" which is unlikely");
87+
}
88+
authorization = args[1];
89+
}
90+
}
91+
92+
// Create a DataObjectRepository in order to store retrieved dataobjects from the ETP server
93+
try (DataObjectRepository repo = new DataObjectRepository()) {
94+
repo.setDefaultStandard(DataObjectRepository.EnergisticsStandard.RESQML2_0_1);
95+
repo.setDefaultStandard(DataObjectRepository.EnergisticsStandard.EML2_0);
96+
97+
// ****** Connect to ETP server through clientSession ******
98+
String instanceUuid = UUID.randomUUID().toString();
99+
InitializationParameters initializationParams = new InitializationParameters(instanceUuid, serverUrl);
100+
MapStringString additionalHeaderField = new MapStringString();
101+
additionalHeaderField.put("data-partition-id", "osdu"); // Example for OSDU RDDMS
102+
initializationParams.setAdditionalHandshakeHeaderFields(additionalHeaderField);
103+
104+
ClientSession clientSession = fetpapi.createClientSession(initializationParams, authorization);
105+
clientSession.setCoreProtocolHandlers(new CoreHandlers(clientSession));
106+
clientSession.setDataspaceProtocolHandlers(new DataspaceHandlers(clientSession));
107+
clientSession.setDiscoveryProtocolHandlers(new DiscoveryHandlers(clientSession));
108+
clientSession.setStoreProtocolHandlers(new StoreHandlers(clientSession));
109+
clientSession.setDataArrayProtocolHandlers(new DataArrayHandlers(clientSession));
110+
new Thread(clientSession::run).start();
111+
long start = System.currentTimeMillis();
112+
while (clientSession.isEtpSessionClosed() && System.currentTimeMillis() - start < 5000) {
113+
TimeUnit.MILLISECONDS.sleep(1);
114+
}
115+
if (clientSession.isEtpSessionClosed()) {
116+
System.err.println("The ETP session cound not be establisehd in 5 seconds.");
117+
return;
118+
}
119+
System.out.println("Now connected to ETP Server");
120+
// ****** We are now connected to ETP server through clientSession ******
121+
// Set the HDF proxy factory in order to use one compliant with ETP
122+
repo.setHdfProxyFactory(new FesapiHdfProxyFactory(clientSession));
123+
124+
// ****** Get a dataspace content. This corresponds to getting the content of an EPC file ******
125+
// Find an available ETP dataspace
126+
DataspaceVector allDataspaces = clientSession.getDataspaces();
127+
Optional<Dataspace> dataspace = allDataspaces.stream().findAny();
128+
if (dataspace.isEmpty()) {
129+
clientSession.close();
130+
System.err.println("The ETP server has no dataspace.");
131+
return;
132+
}
133+
System.out.println("Working on dataspace " + dataspace.get().getUri());
134+
// List resources of this ETP dataspace
135+
ContextInfo etpContext = new ContextInfo();
136+
etpContext.setUri(dataspace.get().getUri());
137+
etpContext.setDepth(1);
138+
ResourceVector allResources = clientSession.getResources(etpContext, ContextScopeKind.self);
139+
if (allResources.isEmpty()) {
140+
clientSession.close();
141+
System.err.println("The ETP dataspace has no resource.");
142+
return;
143+
}
144+
// Get dataobjects from the resources to the DataObjectRepository
145+
MapStringString uriMap = new MapStringString();
146+
long index = 0;
147+
for (Resource resource : allResources) {
148+
uriMap.put(Long.toString(index++), resource.getUri());
149+
}
150+
MapStringDataObject allDataObjects = clientSession.getDataObjects(uriMap);
151+
for (DataObject dataObject : allDataObjects.values()) {
152+
repo.addOrReplaceGsoapProxy(dataObject.getData(), fetpapi.getDataObjectType(dataObject.getResource().getUri()), fetpapi.getDataspaceUri(dataObject.getResource().getUri()));
153+
}
154+
// ****** We have now in the DataObjectRepository the same content as if we would have deserialized and EPC file looking like the dataspace ******
155+
156+
// ****** Use the DataObjectRepository exactly as you are used to do with FESAPI ******
157+
if (repo.getIjkGridRepresentationCount() > 0) {
158+
IjkGridExplicitRepresentation ijkGrid = repo.getIjkGridExplicitRepresentation(0);
159+
ijkGrid.loadSplitInformation();
160+
long originIndex = ijkGrid.getXyzPointIndexFromCellCorner(0, 0, 0, 0);
161+
System.out.println("The index of the grid origin in XYZ points is : " + originIndex);
162+
ijkGrid.unloadSplitInformation();
163+
if (ijkGrid.getValuesPropertyCount() > 0) {
164+
AbstractValuesProperty prop = ijkGrid.getValuesProperty(0);
165+
SWIGTYPE_p_double propValues = fesapi.new_DoubleArray(prop.getValuesCountOfPatch(0));
166+
try {
167+
prop.getDoubleValuesOfPatch(0, propValues);
168+
System.out.println("The first cell value of prop " + prop.getTitle() + " is " + fesapi.DoubleArray_getitem(propValues, 0));
169+
}
170+
finally {
171+
fesapi.delete_DoubleArray(propValues);
172+
}
173+
}
174+
}
175+
else {
176+
System.out.println("This dataspace has no IJK Grid");
177+
}
178+
179+
// Do not forget to close session once you have processed all the dataobject repository.
180+
System.out.println("Closing the session...");
181+
clientSession.close();
182+
} catch (InterruptedException e) {
183+
e.printStackTrace();
184+
}
185+
186+
System.out.println("FINISHED");
187+
}
188+
}

cmake/modules/FindAVRO.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ set(_AVRO_SEARCH_NORMAL
4949
unset(_AVRO_x86)
5050
list(APPEND _AVRO_SEARCHES _AVRO_SEARCH_NORMAL)
5151

52-
set(AVRO_NAMES avrocpp avrocpp_s)
53-
set(AVRO_NAMES_DEBUG avrod avrocpp_d avrocpp_s_d)
52+
if(AVRO_USE_STATIC_LIBS)
53+
set(AVRO_NAMES avrocpp_s)
54+
set(AVRO_NAMES_DEBUG avrocpp_s_d)
55+
else()
56+
set(AVRO_NAMES avrocpp)
57+
set(AVRO_NAMES_DEBUG avrod avrocpp_d)
58+
endif()
5459

5560
# Try each search configuration.
5661
foreach(search ${_AVRO_SEARCHES})

0 commit comments

Comments
 (0)