You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2016/05/05 19:38:08 UTC
[34/40] ignite git commit: IGNITE-1786: Implemented ODBC driver.
IGNITE-1786: Implemented ODBC driver.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/764c97b9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/764c97b9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/764c97b9
Branch: refs/heads/ignite-2947
Commit: 764c97b9014b2ea3bac8a99aa7f5d165c196ace9
Parents: a3566b8
Author: isapego <is...@gridgain.com>
Authored: Thu May 5 16:46:15 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu May 5 16:46:17 2016 +0300
----------------------------------------------------------------------
assembly/release-fabric-base.xml | 30 +
.../ignite/configuration/OdbcConfiguration.java | 267 +-
.../processors/odbc/OdbcNioListener.java | 16 +-
.../internal/processors/odbc/OdbcProcessor.java | 115 +-
.../processors/odbc/OdbcRequestHandler.java | 16 +-
.../ignite/internal/util/HostAndPortRange.java | 205 ++
.../odbc/OdbcProcessorValidationSelfTest.java | 144 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 3 +
modules/platforms/cpp/DEVNOTES.txt | 64 +-
modules/platforms/cpp/Makefile.am | 58 +
modules/platforms/cpp/Makefile.amrel | 46 +
modules/platforms/cpp/README.txt | 29 +-
modules/platforms/cpp/binary/Makefile.am | 69 +
.../platforms/cpp/binary/include/Makefile.am | 46 +
.../cpp/binary/include/ignite/binary/binary.h | 34 +
.../include/ignite/binary/binary_consts.h | 86 +
.../include/ignite/binary/binary_containers.h | 531 ++++
.../include/ignite/binary/binary_raw_reader.h | 395 +++
.../include/ignite/binary/binary_raw_writer.h | 363 +++
.../include/ignite/binary/binary_reader.h | 433 +++
.../binary/include/ignite/binary/binary_type.h | 310 ++
.../include/ignite/binary/binary_writer.h | 401 +++
.../include/ignite/impl/binary/binary_common.h | 194 ++
.../ignite/impl/binary/binary_id_resolver.h | 106 +
.../ignite/impl/binary/binary_reader_impl.h | 1422 +++++++++
.../include/ignite/impl/binary/binary_schema.h | 136 +
.../ignite/impl/binary/binary_type_handler.h | 102 +
.../ignite/impl/binary/binary_type_manager.h | 120 +
.../ignite/impl/binary/binary_type_snapshot.h | 122 +
.../ignite/impl/binary/binary_type_updater.h | 53 +
.../include/ignite/impl/binary/binary_utils.h | 546 ++++
.../ignite/impl/binary/binary_writer_impl.h | 985 ++++++
.../include/ignite/impl/interop/interop.h | 25 +
.../ignite/impl/interop/interop_input_stream.h | 250 ++
.../ignite/impl/interop/interop_memory.h | 269 ++
.../ignite/impl/interop/interop_output_stream.h | 250 ++
.../interop/interop_stream_position_guard.h | 79 +
.../cpp/binary/project/vs/binary.vcxproj | 233 ++
.../binary/project/vs/binary.vcxproj.filters | 145 +
.../cpp/binary/src/binary/binary_containers.cpp | 76 +
.../cpp/binary/src/binary/binary_raw_reader.cpp | 166 +
.../cpp/binary/src/binary/binary_raw_writer.cpp | 167 ++
.../cpp/binary/src/binary/binary_reader.cpp | 173 ++
.../cpp/binary/src/binary/binary_type.cpp | 51 +
.../cpp/binary/src/binary/binary_writer.cpp | 174 ++
.../src/impl/binary/binary_reader_impl.cpp | 907 ++++++
.../binary/src/impl/binary/binary_schema.cpp | 135 +
.../src/impl/binary/binary_type_handler.cpp | 78 +
.../src/impl/binary/binary_type_manager.cpp | 201 ++
.../src/impl/binary/binary_type_snapshot.cpp | 70 +
.../src/impl/binary/binary_type_updater.cpp | 32 +
.../cpp/binary/src/impl/binary/binary_utils.cpp | 303 ++
.../src/impl/binary/binary_writer_impl.cpp | 770 +++++
.../src/impl/interop/interop_input_stream.cpp | 236 ++
.../binary/src/impl/interop/interop_memory.cpp | 171 ++
.../src/impl/interop/interop_output_stream.cpp | 234 ++
modules/platforms/cpp/common/Makefile.am | 50 +-
modules/platforms/cpp/common/configure.ac | 62 -
.../platforms/cpp/common/ignite-common.pc.in | 9 -
.../platforms/cpp/common/include/Makefile.am | 15 +-
.../common/include/ignite/common/concurrent.h | 2 +-
.../cpp/common/include/ignite/common/exports.h | 185 --
.../cpp/common/include/ignite/common/java.h | 750 -----
.../cpp/common/include/ignite/common/utils.h | 208 +-
.../platforms/cpp/common/include/ignite/date.h | 138 +
.../platforms/cpp/common/include/ignite/guid.h | 172 ++
.../cpp/common/include/ignite/ignite_error.h | 284 ++
.../cpp/common/include/ignite/timestamp.h | 166 +
.../cpp/common/os/linux/include/Makefile.am | 9 +-
.../os/linux/include/ignite/common/common.h | 37 +-
.../linux/include/ignite/common/concurrent_os.h | 2 +-
.../cpp/common/os/linux/src/common.cpp | 59 -
.../os/linux/src/common/concurrent_os.cpp | 175 ++
.../cpp/common/os/linux/src/common/utils.cpp | 136 +
.../cpp/common/os/linux/src/concurrent_os.cpp | 175 --
.../os/win/include/ignite/common/common.h | 20 +-
.../win/include/ignite/common/concurrent_os.h | 4 +-
.../platforms/cpp/common/os/win/src/common.cpp | 65 -
.../common/os/win/src/common/concurrent_os.cpp | 175 ++
.../cpp/common/os/win/src/common/utils.cpp | 143 +
.../cpp/common/os/win/src/concurrent_os.cpp | 175 --
.../cpp/common/project/vs/common.vcxproj | 61 +-
.../common/project/vs/common.vcxproj.filters | 50 +-
.../platforms/cpp/common/project/vs/module.def | 135 -
.../cpp/common/src/common/concurrent.cpp | 105 +
modules/platforms/cpp/common/src/concurrent.cpp | 105 -
modules/platforms/cpp/common/src/date.cpp | 83 +
modules/platforms/cpp/common/src/exports.cpp | 557 ----
modules/platforms/cpp/common/src/guid.cpp | 65 +
.../platforms/cpp/common/src/ignite_error.cpp | 230 ++
modules/platforms/cpp/common/src/java.cpp | 2820 -----------------
modules/platforms/cpp/common/src/timestamp.cpp | 117 +
modules/platforms/cpp/configure.ac | 108 +
modules/platforms/cpp/configure.acrel | 93 +
modules/platforms/cpp/core-test/Makefile.am | 62 +-
.../cpp/core-test/config/cache-query.xml | 2 +
modules/platforms/cpp/core-test/configure.ac | 62 -
.../platforms/cpp/core-test/include/Makefile.am | 10 +-
.../include/ignite/binary_test_utils.h | 96 +
.../cpp/core-test/project/vs/core-test.vcxproj | 15 +-
.../src/binary_reader_writer_raw_test.cpp | 124 +
.../core-test/src/binary_reader_writer_test.cpp | 192 ++
.../cpp/core-test/src/binary_session_test.cpp | 36 +
.../cpp/core-test/src/cache_query_test.cpp | 462 ++-
.../platforms/cpp/core-test/src/cache_test.cpp | 24 +
modules/platforms/cpp/core/Makefile.am | 81 +-
modules/platforms/cpp/core/configure.ac | 62 -
modules/platforms/cpp/core/include/Makefile.am | 76 +-
.../cpp/core/include/ignite/binary/binary.h | 34 -
.../core/include/ignite/binary/binary_consts.h | 86 -
.../include/ignite/binary/binary_containers.h | 530 ----
.../include/ignite/binary/binary_raw_reader.h | 355 ---
.../include/ignite/binary/binary_raw_writer.h | 331 --
.../core/include/ignite/binary/binary_reader.h | 389 ---
.../core/include/ignite/binary/binary_type.h | 310 --
.../core/include/ignite/binary/binary_writer.h | 367 ---
.../cpp/core/include/ignite/cache/cache.h | 8 +-
.../cpp/core/include/ignite/cache/cache_entry.h | 6 +-
.../core/include/ignite/cache/cache_peek_mode.h | 6 +-
.../cpp/core/include/ignite/cache/query/query.h | 6 +-
.../include/ignite/cache/query/query_argument.h | 6 +-
.../include/ignite/cache/query/query_cursor.h | 8 +-
.../ignite/cache/query/query_fields_cursor.h | 8 +-
.../ignite/cache/query/query_fields_row.h | 8 +-
.../include/ignite/cache/query/query_scan.h | 6 +-
.../core/include/ignite/cache/query/query_sql.h | 6 +-
.../ignite/cache/query/query_sql_fields.h | 6 +-
.../include/ignite/cache/query/query_text.h | 6 +-
.../platforms/cpp/core/include/ignite/guid.h | 117 -
.../platforms/cpp/core/include/ignite/ignite.h | 6 +-
.../core/include/ignite/ignite_configuration.h | 8 +-
.../cpp/core/include/ignite/ignite_error.h | 275 --
.../cpp/core/include/ignite/ignition.h | 5 +-
.../include/ignite/impl/binary/binary_common.h | 188 --
.../ignite/impl/binary/binary_id_resolver.h | 106 -
.../ignite/impl/binary/binary_reader_impl.h | 1309 --------
.../include/ignite/impl/binary/binary_schema.h | 136 -
.../ignite/impl/binary/binary_type_handler.h | 102 -
.../ignite/impl/binary/binary_type_manager.h | 120 -
.../ignite/impl/binary/binary_type_snapshot.h | 122 -
.../ignite/impl/binary/binary_type_updater.h | 53 -
.../impl/binary/binary_type_updater_impl.h | 8 +-
.../include/ignite/impl/binary/binary_utils.h | 344 ---
.../ignite/impl/binary/binary_writer_impl.h | 913 ------
.../core/include/ignite/impl/cache/cache_impl.h | 4 +-
.../impl/cache/query/query_fields_row_impl.h | 8 +-
.../ignite/impl/cache/query/query_impl.h | 9 +-
.../core/include/ignite/impl/handle_registry.h | 6 +-
.../include/ignite/impl/ignite_environment.h | 18 +-
.../cpp/core/include/ignite/impl/ignite_impl.h | 24 +-
.../core/include/ignite/impl/interop/interop.h | 25 -
.../impl/interop/interop_external_memory.h | 54 +
.../ignite/impl/interop/interop_input_stream.h | 250 --
.../ignite/impl/interop/interop_memory.h | 280 --
.../ignite/impl/interop/interop_output_stream.h | 250 --
.../interop/interop_stream_position_guard.h | 79 -
.../cpp/core/include/ignite/impl/operations.h | 6 +-
.../cpp/core/os/linux/include/Makefile.am | 23 -
.../core/os/linux/include/ignite/impl/utils.h | 155 -
.../cpp/core/os/linux/src/impl/utils.cpp | 439 ---
.../cpp/core/os/win/include/ignite/impl/utils.h | 155 -
.../cpp/core/os/win/src/impl/utils.cpp | 453 ---
.../platforms/cpp/core/project/vs/core.vcxproj | 78 +-
.../cpp/core/project/vs/core.vcxproj.filters | 157 +-
.../cpp/core/src/binary/binary_containers.cpp | 76 -
.../cpp/core/src/binary/binary_raw_reader.cpp | 145 -
.../cpp/core/src/binary/binary_raw_writer.cpp | 147 -
.../cpp/core/src/binary/binary_reader.cpp | 152 -
.../cpp/core/src/binary/binary_type.cpp | 51 -
.../cpp/core/src/binary/binary_writer.cpp | 154 -
modules/platforms/cpp/core/src/guid.cpp | 65 -
modules/platforms/cpp/core/src/ignite.cpp | 2 +-
modules/platforms/cpp/core/src/ignite_error.cpp | 232 --
modules/platforms/cpp/core/src/ignition.cpp | 16 +-
.../core/src/impl/binary/binary_reader_impl.cpp | 760 -----
.../cpp/core/src/impl/binary/binary_schema.cpp | 135 -
.../src/impl/binary/binary_type_handler.cpp | 78 -
.../src/impl/binary/binary_type_manager.cpp | 201 --
.../src/impl/binary/binary_type_snapshot.cpp | 70 -
.../src/impl/binary/binary_type_updater.cpp | 32 -
.../impl/binary/binary_type_updater_impl.cpp | 3 +-
.../cpp/core/src/impl/binary/binary_utils.cpp | 211 --
.../core/src/impl/binary/binary_writer_impl.cpp | 623 ----
.../cpp/core/src/impl/cache/cache_impl.cpp | 10 +-
.../core/src/impl/cache/query/query_impl.cpp | 3 +-
.../cpp/core/src/impl/ignite_environment.cpp | 3 +-
.../platforms/cpp/core/src/impl/ignite_impl.cpp | 2 +-
.../impl/interop/interop_external_memory.cpp | 45 +
.../src/impl/interop/interop_input_stream.cpp | 235 --
.../core/src/impl/interop/interop_memory.cpp | 182 --
.../src/impl/interop/interop_output_stream.cpp | 233 --
modules/platforms/cpp/cpp.dxg | 6 +-
modules/platforms/cpp/examples/Makefile.am | 25 +-
modules/platforms/cpp/examples/README.txt | 14 +-
.../cpp/examples/config/example-cache.xml | 77 -
modules/platforms/cpp/examples/configure.ac | 43 +-
.../platforms/cpp/examples/include/Makefile.am | 9 +-
.../examples/include/ignite/examples/address.h | 17 +-
.../include/ignite/examples/organization.h | 15 +-
.../examples/include/ignite/examples/person.h | 110 +
.../cpp/examples/odbc-example/Makefile.am | 57 +
.../odbc-example/config/example-odbc.xml | 113 +
.../project/vs/odbc-example.vcxproj | 108 +
.../project/vs/odbc-example.vcxproj.filters | 28 +
.../examples/odbc-example/src/odbc_example.cpp | 286 ++
.../cpp/examples/project/vs/ignite-examples.sln | 11 +-
.../examples/project/vs/ignite-examples.vcxproj | 107 -
.../project/vs/ignite-examples.vcxproj.filters | 30 -
.../cpp/examples/putget-example/Makefile.am | 56 +
.../putget-example/config/example-cache.xml | 75 +
.../project/vs/putget-example.vcxproj | 107 +
.../project/vs/putget-example.vcxproj.filters | 30 +
.../putget-example/src/putget_example.cpp | 126 +
.../cpp/examples/src/putgetexample.cpp | 126 -
modules/platforms/cpp/ignite/Makefile.am | 40 +-
modules/platforms/cpp/ignite/configure.ac | 62 -
.../cpp/ignite/project/vs/ignite.vcxproj | 47 +-
.../ignite/project/vs/ignite.vcxproj.filters | 8 -
modules/platforms/cpp/ignite/src/ignite.cpp | 10 +-
modules/platforms/cpp/jni/Makefile.am | 62 +
modules/platforms/cpp/jni/include/Makefile.am | 25 +
.../cpp/jni/include/ignite/jni/exports.h | 185 ++
.../platforms/cpp/jni/include/ignite/jni/java.h | 745 +++++
.../cpp/jni/include/ignite/jni/utils.h | 101 +
.../platforms/cpp/jni/os/linux/src/utils.cpp | 417 +++
modules/platforms/cpp/jni/os/win/src/utils.cpp | 428 +++
modules/platforms/cpp/jni/project/README.TXT | 1 +
modules/platforms/cpp/jni/project/vs/README.TXT | 1 +
.../platforms/cpp/jni/project/vs/jni.vcxproj | 205 ++
.../cpp/jni/project/vs/jni.vcxproj.filters | 42 +
modules/platforms/cpp/jni/project/vs/module.def | 135 +
.../platforms/cpp/jni/project/vs/targetver.h | 25 +
modules/platforms/cpp/jni/src/exports.cpp | 557 ++++
modules/platforms/cpp/jni/src/java.cpp | 2823 ++++++++++++++++++
modules/platforms/cpp/odbc-test/Makefile.am | 81 +
modules/platforms/cpp/odbc-test/README.TXT | 1 +
.../cpp/odbc-test/config/queries-test.xml | 95 +
.../platforms/cpp/odbc-test/include/Makefile.am | 23 +
.../include/teamcity/teamcity_messages.h | 55 +
.../platforms/cpp/odbc-test/include/test_type.h | 130 +
.../cpp/odbc-test/project/vs/odbc-test.vcxproj | 200 ++
.../project/vs/odbc-test.vcxproj.filters | 96 +
.../src/application_data_buffer_test.cpp | 1001 +++++++
.../platforms/cpp/odbc-test/src/column_test.cpp | 290 ++
.../cpp/odbc-test/src/configuration_test.cpp | 224 ++
.../cpp/odbc-test/src/connection_info_test.cpp | 219 ++
.../platforms/cpp/odbc-test/src/cursor_test.cpp | 205 ++
.../platforms/cpp/odbc-test/src/parser_test.cpp | 87 +
.../cpp/odbc-test/src/queries_test.cpp | 516 ++++
.../platforms/cpp/odbc-test/src/row_test.cpp | 208 ++
.../odbc-test/src/teamcity/teamcity_boost.cpp | 159 +
.../src/teamcity/teamcity_messages.cpp | 150 +
.../cpp/odbc-test/src/utility_test.cpp | 81 +
modules/platforms/cpp/odbc/Makefile.am | 84 +
modules/platforms/cpp/odbc/README.txt | 88 +
modules/platforms/cpp/odbc/include/Makefile.am | 58 +
.../platforms/cpp/odbc/include/ignite/odbc.h | 257 ++
.../ignite/odbc/app/application_data_buffer.h | 379 +++
.../odbc/include/ignite/odbc/app/parameter.h | 113 +
.../cpp/odbc/include/ignite/odbc/column.h | 149 +
.../cpp/odbc/include/ignite/odbc/common_types.h | 225 ++
.../include/ignite/odbc/config/configuration.h | 164 +
.../ignite/odbc/config/connection_info.h | 98 +
.../cpp/odbc/include/ignite/odbc/connection.h | 281 ++
.../cpp/odbc/include/ignite/odbc/cursor.h | 114 +
.../cpp/odbc/include/ignite/odbc/decimal.h | 137 +
.../ignite/odbc/diagnostic/diagnosable.h | 82 +
.../odbc/diagnostic/diagnosable_adapter.h | 107 +
.../ignite/odbc/diagnostic/diagnostic_record.h | 165 +
.../odbc/diagnostic/diagnostic_record_storage.h | 198 ++
.../cpp/odbc/include/ignite/odbc/environment.h | 137 +
.../cpp/odbc/include/ignite/odbc/message.h | 751 +++++
.../odbc/include/ignite/odbc/meta/column_meta.h | 195 ++
.../include/ignite/odbc/meta/primary_key_meta.h | 188 ++
.../odbc/include/ignite/odbc/meta/table_meta.h | 166 +
.../cpp/odbc/include/ignite/odbc/parser.h | 137 +
.../ignite/odbc/query/column_metadata_query.h | 146 +
.../odbc/include/ignite/odbc/query/data_query.h | 152 +
.../ignite/odbc/query/foreign_keys_query.h | 143 +
.../ignite/odbc/query/primary_keys_query.h | 137 +
.../cpp/odbc/include/ignite/odbc/query/query.h | 119 +
.../ignite/odbc/query/special_columns_query.h | 142 +
.../ignite/odbc/query/table_metadata_query.h | 150 +
.../include/ignite/odbc/query/type_info_query.h | 118 +
.../cpp/odbc/include/ignite/odbc/result_page.h | 101 +
.../cpp/odbc/include/ignite/odbc/row.h | 132 +
.../cpp/odbc/include/ignite/odbc/statement.h | 525 ++++
.../include/ignite/odbc/system/odbc_constants.h | 45 +
.../include/ignite/odbc/system/socket_client.h | 92 +
.../cpp/odbc/include/ignite/odbc/type_traits.h | 316 ++
.../cpp/odbc/include/ignite/odbc/utility.h | 180 ++
.../cpp/odbc/install/ignite-odbc-install.ini | 5 +
.../cpp/odbc/install/install_amd64.cmd | 29 +
.../platforms/cpp/odbc/install/install_x86.cmd | 16 +
.../odbc/os/linux/src/system/socket_client.cpp | 120 +
.../odbc/os/win/src/system/socket_client.cpp | 133 +
modules/platforms/cpp/odbc/project/README.TXT | 1 +
.../platforms/cpp/odbc/project/vs/README.TXT | 1 +
.../platforms/cpp/odbc/project/vs/module.def | 69 +
.../platforms/cpp/odbc/project/vs/odbc.vcxproj | 239 ++
.../cpp/odbc/project/vs/odbc.vcxproj.filters | 235 ++
.../odbc/src/app/application_data_buffer.cpp | 1216 ++++++++
.../platforms/cpp/odbc/src/app/parameter.cpp | 175 ++
modules/platforms/cpp/odbc/src/column.cpp | 488 +++
modules/platforms/cpp/odbc/src/common_types.cpp | 120 +
.../cpp/odbc/src/config/configuration.cpp | 251 ++
.../cpp/odbc/src/config/connection_info.cpp | 428 +++
modules/platforms/cpp/odbc/src/connection.cpp | 347 +++
modules/platforms/cpp/odbc/src/cursor.cpp | 82 +
modules/platforms/cpp/odbc/src/decimal.cpp | 135 +
.../odbc/src/diagnostic/diagnosable_adapter.cpp | 51 +
.../odbc/src/diagnostic/diagnostic_record.cpp | 241 ++
.../diagnostic/diagnostic_record_storage.cpp | 242 ++
modules/platforms/cpp/odbc/src/entry_points.cpp | 694 +++++
modules/platforms/cpp/odbc/src/environment.cpp | 172 ++
.../platforms/cpp/odbc/src/meta/column_meta.cpp | 274 ++
.../platforms/cpp/odbc/src/meta/table_meta.cpp | 50 +
modules/platforms/cpp/odbc/src/odbc.cpp | 1364 +++++++++
.../odbc/src/query/column_metadata_query.cpp | 318 ++
.../platforms/cpp/odbc/src/query/data_query.cpp | 278 ++
.../cpp/odbc/src/query/foreign_keys_query.cpp | 131 +
.../cpp/odbc/src/query/primary_keys_query.cpp | 210 ++
.../odbc/src/query/special_columns_query.cpp | 121 +
.../cpp/odbc/src/query/table_metadata_query.cpp | 244 ++
.../cpp/odbc/src/query/type_info_query.cpp | 394 +++
modules/platforms/cpp/odbc/src/result_page.cpp | 58 +
modules/platforms/cpp/odbc/src/row.cpp | 120 +
modules/platforms/cpp/odbc/src/statement.cpp | 524 ++++
modules/platforms/cpp/odbc/src/type_traits.cpp | 669 +++++
modules/platforms/cpp/odbc/src/utility.cpp | 130 +
modules/platforms/cpp/project/vs/ignite.sln | 69 +-
modules/platforms/cpp/project/vs/ignite.slnrel | 49 +-
.../platforms/cpp/project/vs/ignite_x86.slnrel | 49 +-
.../Apache.Ignite.Core.csproj | 39 +-
.../Apache.Ignite.Core/Impl/IgniteUtils.cs | 4 +-
.../dotnet/Apache.Ignite.Core/build-common.ps1 | 13 +
modules/platforms/dotnet/Apache.Ignite.sln | 33 +-
parent/pom.xml | 3 +
338 files changed, 44211 insertions(+), 18834 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/assembly/release-fabric-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric-base.xml b/assembly/release-fabric-base.xml
index 9f9d310..7b3d8cf 100644
--- a/assembly/release-fabric-base.xml
+++ b/assembly/release-fabric-base.xml
@@ -35,6 +35,18 @@
<destName>ignite_x86.sln</destName>
</file>
+ <file>
+ <source>modules/platforms/cpp/configure.acrel</source>
+ <outputDirectory>/platforms/cpp</outputDirectory>
+ <destName>configure.ac</destName>
+ </file>
+
+ <file>
+ <source>modules/platforms/cpp/Makefile.amrel</source>
+ <outputDirectory>/platforms/cpp</outputDirectory>
+ <destName>Makefile.am</destName>
+ </file>
+
<!-- Other files. -->
<file>
<source>assembly/LICENSE_FABRIC</source>
@@ -114,6 +126,12 @@
<outputDirectory>/platforms/cpp/common</outputDirectory>
</fileSet>
+ <!-- Move CPP "jni" module. -->
+ <fileSet>
+ <directory>modules/platforms/cpp/jni</directory>
+ <outputDirectory>/platforms/cpp/jni</outputDirectory>
+ </fileSet>
+
<!-- Move CPP "core" module. -->
<fileSet>
<directory>modules/platforms/cpp/core</directory>
@@ -132,6 +150,18 @@
<outputDirectory>/platforms/cpp/examples</outputDirectory>
</fileSet>
+ <!-- Move CPP "odbc" module. -->
+ <fileSet>
+ <directory>modules/platforms/cpp/odbc</directory>
+ <outputDirectory>/platforms/cpp/odbc</outputDirectory>
+ </fileSet>
+
+ <!-- Move CPP "binary" module. -->
+ <fileSet>
+ <directory>modules/platforms/cpp/binary</directory>
+ <outputDirectory>/platforms/cpp/binary</outputDirectory>
+ </fileSet>
+
<!-- Move CPP licenses. -->
<fileSet>
<directory>modules/platforms/licenses</directory>
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/main/java/org/apache/ignite/configuration/OdbcConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/OdbcConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/OdbcConfiguration.java
index 8f0a0fb..3746995 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/OdbcConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/OdbcConfiguration.java
@@ -17,56 +17,24 @@
package org.apache.ignite.configuration;
-import java.net.Socket;
-
/**
* ODBC configuration.
*/
public class OdbcConfiguration {
- /** Default TCP server port. */
- public static final int DFLT_TCP_PORT = 11443;
-
- /** Default TCP_NODELAY flag. */
- public static final boolean DFLT_TCP_NODELAY = true;
-
- /** Default TCP direct buffer flag. */
- public static final boolean DFLT_TCP_DIRECT_BUF = false;
+ /** Default TCP host. */
+ public static final String DFLT_TCP_HOST = "0.0.0.0";
- /** Default ODBC idle timeout. */
- public static final int DFLT_IDLE_TIMEOUT = 7000;
+ /** Default minimum TCP port range value. */
+ public static final int DFLT_TCP_PORT_FROM = 10800;
- /** Default socket send and receive buffer size. */
- public static final int DFLT_SOCK_BUF_SIZE = 32 * 1024;
+ /** Default maximum TCP port range value. */
+ public static final int DFLT_TCP_PORT_TO = 10810;
/** Default max number of open cursors per connection. */
public static final int DFLT_MAX_OPEN_CURSORS = 128;
- /** TCP port. */
- private int port = DFLT_TCP_PORT;
-
- /** TCP host. */
- private String host;
-
- /** TCP no delay flag. */
- private boolean noDelay = DFLT_TCP_NODELAY;
-
- /** ODBC TCP direct buffer flag. */
- private boolean directBuf = DFLT_TCP_DIRECT_BUF;
-
- /** ODBC TCP send buffer size. */
- private int sndBufSize = DFLT_SOCK_BUF_SIZE;
-
- /** ODBC TCP receive buffer size. */
- private int rcvBufSize = DFLT_SOCK_BUF_SIZE;
-
- /** ODBC TCP send queue limit. */
- private int sndQueueLimit;
-
- /** ODBC TCP selector count. */
- private int selectorCnt = Math.min(4, Runtime.getRuntime().availableProcessors());
-
- /** Idle timeout. */
- private long idleTimeout = DFLT_IDLE_TIMEOUT;
+ /** Endpoint address. */
+ private String endpointAddr;
/** Max number of opened cursors per connection. */
private int maxOpenCursors = DFLT_MAX_OPEN_CURSORS;
@@ -87,214 +55,42 @@ public class OdbcConfiguration {
public OdbcConfiguration(OdbcConfiguration cfg) {
assert cfg != null;
- directBuf = cfg.isDirectBuffer();
- host = cfg.getHost();
- idleTimeout = cfg.getIdleTimeout();
+ endpointAddr = cfg.getEndpointAddress();
maxOpenCursors = cfg.getMaxOpenCursors();
- noDelay = cfg.isNoDelay();
- port = cfg.getPort();
- rcvBufSize = cfg.getReceiveBufferSize();
- selectorCnt = cfg.getSelectorCount();
- sndBufSize = cfg.getSendBufferSize();
- sndQueueLimit = cfg.getSendQueueLimit();
}
/**
- * Gets port for TCP ODBC server.
+ * Get ODBC endpoint address. Ignite will listen for incoming TCP connections on this address. Either single port
+ * or port range could be used. In the latter case Ignite will start listening on the first available port
+ * form the range.
* <p>
- * Default is {@link #DFLT_TCP_PORT}.
- *
- * @return TCP port.
- */
- public int getPort() {
- return port;
- }
-
- /**
- * Sets port for TCP ODBC server.
- *
- * @param port TCP port.
- */
- public void setPort(int port) {
- this.port = port;
- }
-
- /**
- * Gets host for TCP ODBC server. This can be either an
- * IP address or a domain name.
+ * The following address formats are permitted:
+ * <ul>
+ * <li>{@code hostname} - will use provided hostname and default port range;</li>
+ * <li>{@code hostname:port} - will use provided hostname and port;</li>
+ * <li>{@code hostname:port_from..port_to} - will use provided hostname and port range.</li>
+ * </ul>
* <p>
- * If not defined, system-wide local address will be used
- * (see {@link IgniteConfiguration#getLocalHost()}.
+ * When set to {@code null}, ODBC processor will be bound to {@link #DFLT_TCP_HOST} host and default port range.
* <p>
- * You can also use {@code 0.0.0.0} value to bind to all
- * locally-available IP addresses.
- *
- * @return TCP host.
- */
- public String getHost() {
- return host;
- }
-
- /**
- * Sets host for TCP ODBC server.
- *
- * @param host TCP host.
- */
- public void setHost(String host) {
- this.host = host;
- }
-
- /**
- * Gets flag indicating whether {@code TCP_NODELAY} option should be set for accepted client connections.
- * Setting this option reduces network latency and should be set to {@code true} in majority of cases.
- * For more information, see {@link Socket#setTcpNoDelay(boolean)}
- * <p/>
- * If not specified, default value is {@link #DFLT_TCP_NODELAY}.
- *
- * @return Whether {@code TCP_NODELAY} option should be enabled.
- */
- public boolean isNoDelay() {
- return noDelay;
- }
-
- /**
- * Sets whether {@code TCP_NODELAY} option should be set for all accepted ODBC client connections.
- *
- * @param noDelay {@code True} if option should be enabled.
- * @see #isNoDelay()
- */
- public void setNoDelay(boolean noDelay) {
- this.noDelay = noDelay;
- }
-
- /**
- * Gets flag indicating whether ODBC TCP server should use direct buffers. A direct buffer is a buffer
- * that is allocated and accessed using native system calls, without using JVM heap. Enabling direct
- * buffer <em>may</em> improve performance and avoid memory issues (long GC pauses due to huge buffer
- * size).
- * <p/>
- * If not specified, default value is {@link #DFLT_TCP_DIRECT_BUF}.
- *
- * @return Whether direct buffer should be used.
- */
- public boolean isDirectBuffer() {
- return directBuf;
- }
-
- /**
- * Sets whether to use direct buffer for ODBC TCP server.
+ * Default port range is from {@link #DFLT_TCP_PORT_FROM} to {@link #DFLT_TCP_PORT_TO}.
*
- * @param directBuf {@code True} if option should be enabled.
- * @see #isDirectBuffer()
+ * @return ODBC endpoint address.
*/
- public void setDirectBuffer(boolean directBuf) {
- this.directBuf = directBuf;
+ public String getEndpointAddress() {
+ return endpointAddr;
}
/**
- * Gets ODBC TCP server send buffer size.
- * <p/>
- * If not specified, default value is {@link #DFLT_SOCK_BUF_SIZE}.
+ * Set ODBC endpoint address. See {@link #getEndpointAddress()} for more information.
*
- * @return ODBC TCP server send buffer size (0 for default).
+ * @param addr ODBC endpoint address.
+ * @return This instance for chaining.
*/
- public int getSendBufferSize() {
- return sndBufSize;
- }
-
- /**
- * Sets ODBC TCP server send buffer size.
- *
- * @param sndBufSize Send buffer size.
- * @see #getSendBufferSize()
- */
- public void setSendBufferSize(int sndBufSize) {
- this.sndBufSize = sndBufSize;
- }
-
- /**
- * Gets ODBC TCP server receive buffer size.
- * <p/>
- * If not specified, default value is {@link #DFLT_SOCK_BUF_SIZE}.
- *
- * @return ODBC TCP server receive buffer size (0 for default).
- */
- public int getReceiveBufferSize() {
- return rcvBufSize;
- }
-
- /**
- * Sets ODBC TCP server receive buffer size.
- *
- * @param rcvBufSize Receive buffer size.
- * @see #getReceiveBufferSize()
- */
- public void setReceiveBufferSize(int rcvBufSize) {
- this.rcvBufSize = rcvBufSize;
- }
-
- /**
- * Gets ODBC TCP server send queue limit. If the limit exceeds, all successive writes will
- * block until the queue has enough capacity.
- *
- * @return ODBC TCP server send queue limit (0 for unlimited).
- */
- public int getSendQueueLimit() {
- return sndQueueLimit;
- }
-
- /**
- * Sets ODBC TCP server send queue limit.
- *
- * @param sndQueueLimit ODBC TCP server send queue limit (0 for unlimited).
- * @see #getSendQueueLimit()
- */
- public void setSendQueueLimit(int sndQueueLimit) {
- this.sndQueueLimit = sndQueueLimit;
- }
-
- /**
- * Gets number of selector threads in ODBC TCP server. Higher value for this parameter
- * may increase throughput, but also increases context switching.
- *
- * @return Number of selector threads for ODBC TCP server.
- */
- public int getSelectorCount() {
- return selectorCnt;
- }
+ public OdbcConfiguration setEndpointAddress(String addr) {
+ this.endpointAddr = addr;
- /**
- * Sets number of selector threads for ODBC TCP server.
- *
- * @param selectorCnt Number of selector threads for ODBC TCP server.
- * @see #getSelectorCount()
- */
- public void setSelectorCount(int selectorCnt) {
- this.selectorCnt = selectorCnt;
- }
-
- /**
- * Gets idle timeout for ODBC TCP server.
- * <p>
- * This setting is used to reject half-opened sockets. If no packets
- * come within idle timeout, the connection is closed.
- * <p/>
- * If not specified, default value is {@link #DFLT_IDLE_TIMEOUT}.
- *
- * @return Idle timeout in milliseconds.
- */
- public long getIdleTimeout() {
- return idleTimeout;
- }
-
- /**
- * Sets idle timeout for ODBC TCP server.
- *
- * @param idleTimeout Idle timeout in milliseconds.
- * @see #getIdleTimeout()
- */
- public void setIdleTimeout(long idleTimeout) {
- this.idleTimeout = idleTimeout;
+ return this;
}
/**
@@ -312,8 +108,11 @@ public class OdbcConfiguration {
* Sets maximum number of opened cursors per connection. See {@link #getMaxOpenCursors()}.
*
* @param maxOpenCursors Maximum number of opened cursors.
+ * @return This instance for chaining.
*/
- public void setMaxOpenCursors(int maxOpenCursors) {
+ public OdbcConfiguration setMaxOpenCursors(int maxOpenCursors) {
this.maxOpenCursors = maxOpenCursors;
+
+ return this;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcNioListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcNioListener.java
index 28b2b5a..f720096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcNioListener.java
@@ -43,17 +43,25 @@ public class OdbcNioListener extends GridNioServerListenerAdapter<byte[]> {
/** Kernal context. */
private final GridKernalContext ctx;
+ /** Maximum allowed cursors. */
+ private final int maxCursors;
+
/** Logger. */
private final IgniteLogger log;
/**
+ * Constructor.
+ *
* @param ctx Context.
* @param busyLock Shutdown busy lock.
+ * @param maxCursors Maximum allowed cursors.
*/
- public OdbcNioListener(GridKernalContext ctx, GridSpinBusyLock busyLock) {
+ public OdbcNioListener(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
this.ctx = ctx;
this.busyLock = busyLock;
- this.log = ctx.log(getClass());
+ this.maxCursors = maxCursors;
+
+ log = ctx.log(getClass());
}
/** {@inheritDoc} */
@@ -136,7 +144,7 @@ public class OdbcNioListener extends GridNioServerListenerAdapter<byte[]> {
/**
* Connection-related data.
*/
- private static class ConnectionData {
+ private class ConnectionData {
/** Request handler. */
private final OdbcRequestHandler handler;
@@ -148,7 +156,7 @@ public class OdbcNioListener extends GridNioServerListenerAdapter<byte[]> {
* @param busyLock Shutdown busy lock.
*/
public ConnectionData(GridKernalContext ctx, GridSpinBusyLock busyLock) {
- handler = new OdbcRequestHandler(ctx, busyLock);
+ handler = new OdbcRequestHandler(ctx, busyLock, maxCursors);
parser = new OdbcMessageParser(ctx);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcProcessor.java
index 87be686..ead8901 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcProcessor.java
@@ -23,9 +23,10 @@ import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.GridProcessorAdapter;
import org.apache.ignite.internal.util.GridSpinBusyLock;
+import org.apache.ignite.internal.util.HostAndPortRange;
import org.apache.ignite.internal.util.nio.GridNioCodecFilter;
import org.apache.ignite.internal.util.nio.GridNioServer;
-import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.spi.IgnitePortProtocol;
@@ -36,6 +37,18 @@ import java.nio.ByteOrder;
* ODBC processor.
*/
public class OdbcProcessor extends GridProcessorAdapter {
+ /** Default number of selectors. */
+ private static final int DFLT_SELECTOR_CNT = Math.min(4, Runtime.getRuntime().availableProcessors());
+
+ /** Default TCP_NODELAY flag. */
+ private static final boolean DFLT_TCP_NODELAY = true;
+
+ /** Default TCP direct buffer flag. */
+ private static final boolean DFLT_TCP_DIRECT_BUF = false;
+
+ /** Default socket send and receive buffer size. */
+ private static final int DFLT_SOCK_BUF_SIZE = 32 * 1024;
+
/** Busy lock. */
private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
@@ -61,38 +74,74 @@ public class OdbcProcessor extends GridProcessorAdapter {
throw new IgniteCheckedException("ODBC can only be used with BinaryMarshaller (please set it " +
"through IgniteConfiguration.setMarshaller())");
- String hostStr = odbcCfg.getHost();
-
- if (hostStr == null)
- hostStr = ctx.config().getLocalHost();
-
- InetAddress host = U.resolveLocalHost(hostStr);
-
- int port = odbcCfg.getPort();
-
- srv = GridNioServer.<byte[]>builder()
- .address(host)
- .port(port)
- .listener(new OdbcNioListener(ctx, busyLock))
- .logger(log)
- .selectorCount(odbcCfg.getSelectorCount())
- .gridName(ctx.gridName())
- .tcpNoDelay(odbcCfg.isNoDelay())
- .directBuffer(odbcCfg.isDirectBuffer())
- .byteOrder(ByteOrder.nativeOrder())
- .socketSendBufferSize(odbcCfg.getSendBufferSize())
- .socketReceiveBufferSize(odbcCfg.getReceiveBufferSize())
- .sendQueueLimit(odbcCfg.getSendQueueLimit())
- .filters(new GridNioCodecFilter(new OdbcBufferedParser(), log, false))
- .directMode(false)
- .idleTimeout(odbcCfg.getIdleTimeout())
- .build();
-
- srv.start();
-
- ctx.ports().registerPort(port, IgnitePortProtocol.TCP, getClass());
-
- log.info("ODBC processor has started on TCP port " + port);
+ HostAndPortRange hostPort;
+
+ if (F.isEmpty(odbcCfg.getEndpointAddress())) {
+ hostPort = new HostAndPortRange(OdbcConfiguration.DFLT_TCP_HOST,
+ OdbcConfiguration.DFLT_TCP_PORT_FROM,
+ OdbcConfiguration.DFLT_TCP_PORT_TO
+ );
+ }
+ else {
+ hostPort = HostAndPortRange.parse(odbcCfg.getEndpointAddress(),
+ OdbcConfiguration.DFLT_TCP_PORT_FROM,
+ OdbcConfiguration.DFLT_TCP_PORT_TO,
+ "Failed to parse ODBC endpoint address"
+ );
+ }
+
+ InetAddress host;
+
+ try {
+ host = InetAddress.getByName(hostPort.host());
+ }
+ catch (Exception e) {
+ throw new IgniteCheckedException("Failed to resolve ODBC host: " + hostPort.host(), e);
+ }
+
+ Exception lastErr = null;
+
+ for (int port = hostPort.portFrom(); port <= hostPort.portTo(); port++) {
+ try {
+ GridNioServer<byte[]> srv0 = GridNioServer.<byte[]>builder()
+ .address(host)
+ .port(port)
+ .listener(new OdbcNioListener(ctx, busyLock, odbcCfg.getMaxOpenCursors()))
+ .logger(log)
+ .selectorCount(DFLT_SELECTOR_CNT)
+ .gridName(ctx.gridName())
+ .tcpNoDelay(DFLT_TCP_NODELAY)
+ .directBuffer(DFLT_TCP_DIRECT_BUF)
+ .byteOrder(ByteOrder.nativeOrder())
+ .socketSendBufferSize(DFLT_SOCK_BUF_SIZE)
+ .socketReceiveBufferSize(DFLT_SOCK_BUF_SIZE)
+ .filters(new GridNioCodecFilter(new OdbcBufferedParser(), log, false))
+ .directMode(false)
+ .idleTimeout(Long.MAX_VALUE)
+ .build();
+
+ srv0.start();
+
+ srv = srv0;
+
+ ctx.ports().registerPort(port, IgnitePortProtocol.TCP, getClass());
+
+ log.info("ODBC processor has started on TCP port " + port);
+
+ lastErr = null;
+
+ break;
+ }
+ catch (Exception e) {
+ lastErr = e;
+ }
+ }
+
+ assert (srv != null && lastErr == null) || (srv == null && lastErr != null);
+
+ if (lastErr != null)
+ throw new IgniteCheckedException("Failed to bind to any [host:port] from the range [" +
+ "address=" + hostPort + ", lastErr=" + lastErr + ']');
}
catch (Exception e) {
throw new IgniteCheckedException("Failed to start ODBC processor.", e);
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
index 9aba295..43a1fa4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.odbc;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.configuration.OdbcConfiguration;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
@@ -49,6 +48,9 @@ public class OdbcRequestHandler {
/** Busy lock. */
private final GridSpinBusyLock busyLock;
+ /** Maximum allowed cursors. */
+ private final int maxCursors;
+
/** Current queries cursors. */
private final ConcurrentHashMap<Long, IgniteBiTuple<QueryCursor, Iterator>> qryCursors = new ConcurrentHashMap<>();
@@ -57,10 +59,12 @@ public class OdbcRequestHandler {
*
* @param ctx Context.
* @param busyLock Shutdown latch.
+ * @param maxCursors Maximum allowed cursors.
*/
- public OdbcRequestHandler(final GridKernalContext ctx, final GridSpinBusyLock busyLock) {
+ public OdbcRequestHandler(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
this.ctx = ctx;
this.busyLock = busyLock;
+ this.maxCursors = maxCursors;
}
/**
@@ -133,16 +137,12 @@ public class OdbcRequestHandler {
* @return Response.
*/
private OdbcResponse executeQuery(OdbcQueryExecuteRequest req) {
- OdbcConfiguration cfg = ctx.config().getOdbcConfiguration();
-
- assert cfg != null;
-
int cursorCnt = qryCursors.size();
- if (cursorCnt >= cfg.getMaxOpenCursors())
+ if (maxCursors > 0 && cursorCnt >= maxCursors)
return new OdbcResponse(OdbcResponse.STATUS_FAILED, "Too many opened cursors (either close other " +
"opened cursors or increase the limit through OdbcConfiguration.setMaxOpenCursors()) " +
- "[maximum=" + cfg.getMaxOpenCursors() + ", current=" + cursorCnt + ']');
+ "[maximum=" + maxCursors + ", current=" + cursorCnt + ']');
long qryId = QRY_ID_GEN.getAndIncrement();
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java b/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
new file mode 100644
index 0000000..60ace9c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
@@ -0,0 +1,205 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.util;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * Represents address along with port range.
+ */
+public class HostAndPortRange {
+ /** Host. */
+ private final String host;
+
+ /** Port from. */
+ private final int portFrom;
+
+ /** Port to. */
+ private final int portTo;
+
+ /**
+ * Parse string into host and port pair.
+ *
+ * @param addrStr String.
+ * @param dfltPortFrom Default port from.
+ * @param dfltPortTo Default port to.
+ * @param errMsgPrefix Error message prefix.
+ * @return Result.
+ * @throws IgniteCheckedException If failed.
+ */
+ public static HostAndPortRange parse(String addrStr, int dfltPortFrom, int dfltPortTo, String errMsgPrefix)
+ throws IgniteCheckedException {
+ assert dfltPortFrom <= dfltPortTo;
+
+ String host;
+
+ int portFrom;
+ int portTo;
+
+ final int colIdx = addrStr.indexOf(':');
+
+ if (colIdx > 0) {
+ String portFromStr;
+ String portToStr;
+
+ host = addrStr.substring(0, colIdx);
+
+ String portStr = addrStr.substring(colIdx + 1, addrStr.length());
+
+ if (F.isEmpty(portStr))
+ throw createParseError(addrStr, errMsgPrefix, "port range is not specified");
+
+ int portRangeIdx = portStr.indexOf("..");
+
+ if (portRangeIdx >= 0) {
+ // Port range is specified.
+ portFromStr = portStr.substring(0, portRangeIdx);
+ portToStr = portStr.substring(portRangeIdx + 2, portStr.length());
+ }
+ else {
+ // Single port is specified.
+ portFromStr = portStr;
+ portToStr = portStr;
+ }
+
+ portFrom = parsePort(portFromStr, addrStr, errMsgPrefix);
+ portTo = parsePort(portToStr, addrStr, errMsgPrefix);
+
+ if (portFrom > portTo)
+ throw createParseError(addrStr, errMsgPrefix, "start port cannot be less than end port");
+ }
+ else {
+ // Port is not specified, use defaults.
+ host = addrStr;
+
+ portFrom = dfltPortFrom;
+ portTo = dfltPortTo;
+ }
+
+ return new HostAndPortRange(host, portFrom, portTo);
+ }
+
+ /**
+ * Parse port.
+ *
+ * @param portStr Port string.
+ * @param addrStr Address string.
+ * @param errMsgPrefix Error message prefix.
+ * @return Parsed port.
+ * @throws IgniteCheckedException If failed.
+ */
+ private static int parsePort(String portStr, String addrStr, String errMsgPrefix) throws IgniteCheckedException {
+ try {
+ int port = Integer.parseInt(portStr);
+
+ if (port < 0 || port > 65535)
+ throw createParseError(addrStr, errMsgPrefix, "port range contains invalid port " + portStr);
+
+ return port;
+ }
+ catch (NumberFormatException e) {
+ throw createParseError(addrStr, errMsgPrefix, "port range contains invalid port " + portStr);
+ }
+ }
+
+ /**
+ * Create parse error.
+ *
+ * @param addrStr Address string.
+ * @param errMsgPrefix Error message prefix.
+ * @param errMsg Error message.
+ * @return Exception.
+ */
+ private static IgniteCheckedException createParseError(String addrStr, String errMsgPrefix, String errMsg) {
+ return new IgniteCheckedException(errMsgPrefix + " (" + errMsg + "): " + addrStr);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param host Host.
+ * @param port Port.
+ */
+ public HostAndPortRange(String host, int port) {
+ this(host, port, port);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param host Host.
+ * @param portFrom Port from.
+ * @param portTo Port to.
+ */
+ public HostAndPortRange(String host, int portFrom, int portTo) {
+ assert !F.isEmpty(host);
+ assert portFrom <= portTo;
+
+ this.host = host;
+ this.portFrom = portFrom;
+ this.portTo = portTo;
+ }
+
+ /**
+ * @return Host.
+ */
+ public String host() {
+ return host;
+ }
+
+ /**
+ * @return Port from.
+ */
+ public int portFrom() {
+ return portFrom;
+ }
+
+ /**
+ * @return Port to.
+ */
+ public int portTo() {
+ return portTo;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ if (o != null && o instanceof HostAndPortRange) {
+ HostAndPortRange other = (HostAndPortRange)o;
+
+ return F.eq(host, other.host) && portFrom == other.portFrom && portTo == other.portTo;
+ }
+ else
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ int res = host.hashCode();
+
+ res = 31 * res + portFrom;
+ res = 31 * res + portTo;
+
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return host + ":" + (portFrom == portTo ? portFrom : portFrom + ".." + portTo);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcProcessorValidationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcProcessorValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcProcessorValidationSelfTest.java
new file mode 100644
index 0000000..751f0ae
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcProcessorValidationSelfTest.java
@@ -0,0 +1,144 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.odbc;
+
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.OdbcConfiguration;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * ODBC configuration validation tests.
+ */
+public class OdbcProcessorValidationSelfTest extends GridCommonAbstractTest {
+ /** Node index generator. */
+ private static final AtomicInteger NODE_IDX_GEN = new AtomicInteger();
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ Ignition.stopAll(true);
+ }
+
+ /**
+ * Ensure we can start with default configuration.
+ *
+ * @throws Exception If failed.
+ */
+ public void testAddressDefault() throws Exception {
+ check(new OdbcConfiguration(), true);
+ }
+
+ /**
+ * Test address where only host is provided.
+ *
+ * @throws Exception If failed.
+ */
+ public void testAddressHostOnly() throws Exception {
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1"), true);
+ }
+
+ /**
+ * Test address with both host and port.
+ *
+ * @throws Exception If failed.
+ */
+ public void testAddressHostAndPort() throws Exception {
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999"), true);
+
+ // Shouldn't fit into range.
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999"), false);
+ }
+
+ /**
+ * Test address with host and port range.
+ *
+ * @throws Exception If failed.
+ */
+ public void testAddressHostAndPortRange() throws Exception {
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..10000"), true);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..10000"), true);
+
+ // Shouldn't fit into range.
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..10000"), false);
+ }
+
+ /**
+ * Test start with invalid host.
+ *
+ * @throws Exception If failed.
+ */
+ public void testAddressInvalidHost() throws Exception {
+ check(new OdbcConfiguration().setEndpointAddress("126.0.0.1"), false);
+ }
+
+ /**
+ * Test start with invalid address format.
+ *
+ * @throws Exception
+ */
+ public void testAddressInvalidFormat() throws Exception {
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:"), false);
+
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:0"), false);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:-1"), false);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:111111"), false);
+
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999.."), false);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999..9998"), false);
+
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:a"), false);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:a.."), false);
+ check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:a..b"), false);
+
+ check(new OdbcConfiguration().setEndpointAddress(":9999"), false);
+ check(new OdbcConfiguration().setEndpointAddress(":9999..10000"), false);
+ }
+
+ /**
+ * Perform check.
+ *
+ * @param odbcCfg ODBC configuration.
+ * @param success Success flag.
+ * @throws Exception If failed.
+ */
+ @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
+ private void check(OdbcConfiguration odbcCfg, boolean success) throws Exception {
+ final IgniteConfiguration cfg = new IgniteConfiguration();
+
+ cfg.setGridName(OdbcProcessorValidationSelfTest.class.getName() + "-" + NODE_IDX_GEN.incrementAndGet());
+ cfg.setLocalHost("127.0.0.1");
+ cfg.setOdbcConfiguration(odbcCfg);
+
+ if (success)
+ Ignition.start(cfg);
+ else {
+ GridTestUtils.assertThrows(log, new Callable<Void>() {
+ @Override public Void call() throws Exception {
+ Ignition.start(cfg);
+
+ return null;
+ }
+ }, IgniteException.class, null);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 6b4ef70..fd6a44a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -41,6 +41,7 @@ import org.apache.ignite.internal.processors.cache.OffHeapTieredTransactionSelfT
import org.apache.ignite.internal.processors.closure.GridClosureProcessorSelfTest;
import org.apache.ignite.internal.processors.continuous.GridEventConsumeSelfTest;
import org.apache.ignite.internal.processors.continuous.GridMessageListenSelfTest;
+import org.apache.ignite.internal.processors.odbc.OdbcProcessorValidationSelfTest;
import org.apache.ignite.internal.processors.service.ClosureServiceClientsNodesTest;
import org.apache.ignite.internal.product.GridProductVersionSelfTest;
import org.apache.ignite.internal.util.nio.IgniteExceptionInNioWorkerSelfTest;
@@ -125,6 +126,8 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTestSuite(IgniteExceptionInNioWorkerSelfTest.class);
+ suite.addTestSuite(OdbcProcessorValidationSelfTest.class);
+
GridTestUtils.addTestIfNeeded(suite, DynamicProxySerializationMultiJvmSelfTest.class, ignoredTests);
// Tests against configuration variations framework.
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/DEVNOTES.txt b/modules/platforms/cpp/DEVNOTES.txt
index 9a09333..81c22db 100644
--- a/modules/platforms/cpp/DEVNOTES.txt
+++ b/modules/platforms/cpp/DEVNOTES.txt
@@ -1,5 +1,9 @@
Apache Ignite C++ Build Instructions
====================================
+Here you can find instruction on how to build Apache Ignite C++ core library and
+stand-alone node binary. To build examples you need to build and install core Apache
+Ignite library then refer to $IGNITE_HOME/platforms/cpp/example/README.txt for
+futher instructions.
Building on Linux With Autotools
----------------------------------
@@ -9,34 +13,31 @@ Common Requirements:
* GCC, g++, autotools, automake, and libtool must be installed
* Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
* JAVA_HOME environment variable must be set pointing to Java installation directory.
-
-Building the library:
-
- * Build Apache Ignite C++ helper "common" library:
- * Navigate to the directory $IGNITE_HOME/platforms/cpp/common
- * Execute the following commands one by one:
- * libtoolize
- * aclocal
- * autoheader
- * automake --add-missing
- * autoreconf
- * ./configure
- * make
- * make install
- * Build Apache Ignite C++ library:
- * Navigate to the directory $IGNITE_HOME/platforms/cpp/core
- * Execute the following commands one by one:
- * libtoolize
- * aclocal
- * autoheader
- * automake --add-missing
- * autoreconf
- * ./configure
- * make
- * make install
-
-NOTE: "make install" command may require superuser privileges. In this case it must be
-executed as "sudo make install".
+ * IGNITE_HOME environment variable must be set to Ignite installation directory.
+ * To build ODBC driver you need to install ODBC Driver Manager on you system.
+ Apache Ignite has been tested with UnixODBC.
+
+Building the Apache Ignite C++ components:
+ * Navigate to the directory $IGNITE_HOME/platforms/cpp
+ * Generate configure file using autotools.
+ * Configure build system using './configure' script. For additional options
+ use './configure --help'
+ * Build enabled components using 'make' command.
+
+Or simply speaking do the following:
+ * cd $IGNITE_HOME/platforms/cpp
+ * libtoolize && aclocal && autoheader && automake --add-missing && autoreconf
+ * ./configure
+ * make
+
+Among standard included by autotools options configure script also include following
+Ignite-specific options:
+ * --enable-odbc - build included ODBC driver. Disabled by default.
+ * --enable-core - build Ignite core library. Enabled by default.
+ * --enable-node - build stand-alone node executable. Enabled by default.
+
+NOTE: You may want to use "make install" command to install Ignite libraries and heasders
+for your operation system. Note however that this action may require superuser privileges.
Building on Windows with Visual Studio (tm)
----------------------------------
@@ -47,13 +48,14 @@ Common Requirements:
* Windows SDK 7.1
* Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
* JAVA_HOME environment variable must be set pointing to Java installation directory.
+ * IGNITE_HOME environment variable must be set to Ignite installation directory.
Building binaries:
- * Open and build %IGNITE_HOME%\platforms\cpp\project\vs\ignite.sln (or ignite_86.sln if you are running
- 32-bit platform).
+ * Open and build %IGNITE_HOME%\platforms\cpp\project\vs\ignite.sln (or ignite_86.sln if
+ you are running 32-bit platform).
Building in later versions of Visual Studio:
* Open project\vs\ignite.sln or project\vs\ignite_86.sln in Visual Studio
* You will be prompted to "Update VC++ Compiler and Libraries", click "Update"
- * Build the solution.
\ No newline at end of file
+ * Build the solution.
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/Makefile.am b/modules/platforms/cpp/Makefile.am
new file mode 100644
index 0000000..5213d0c
--- /dev/null
+++ b/modules/platforms/cpp/Makefile.am
@@ -0,0 +1,58 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+if COND_ODBC
+ MAYBE_ODBC = odbc
+
+if COND_TESTS
+ MAYBE_ODBC_TESTS = odbc-test
+endif
+endif
+
+if COND_CORE
+ MAYBE_CORE = core
+
+if COND_TESTS
+ MAYBE_CORE_TESTS = core-test
+endif
+endif
+
+if COND_NODE
+ MAYBE_NODE = ignite
+endif
+
+SUBDIRS = \
+ common \
+ binary \
+ jni \
+ $(MAYBE_ODBC) \
+ $(MAYBE_CORE) \
+ $(MAYBE_NODE) \
+ $(MAYBE_ODBC_TESTS) \
+ $(MAYBE_CORE_TESTS)
+
+DIST_SUBDIRS = \
+ common \
+ binary \
+ jni \
+ odbc \
+ core \
+ ignite \
+ core-test \
+ odbc-test
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/Makefile.amrel
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/Makefile.amrel b/modules/platforms/cpp/Makefile.amrel
new file mode 100644
index 0000000..6172d06
--- /dev/null
+++ b/modules/platforms/cpp/Makefile.amrel
@@ -0,0 +1,46 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+if COND_ODBC
+ MAYBE_ODBC = odbc
+endif
+
+if COND_CORE
+ MAYBE_CORE = core
+endif
+
+if COND_NODE
+ MAYBE_NODE = ignite
+endif
+
+SUBDIRS = \
+ common \
+ binary \
+ jni \
+ $(MAYBE_ODBC) \
+ $(MAYBE_CORE) \
+ $(MAYBE_NODE)
+
+DIST_SUBDIRS = \
+ common \
+ binary \
+ jni \
+ odbc \
+ core \
+ ignite
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/README.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/README.txt b/modules/platforms/cpp/README.txt
index e542c82..dbde9f0 100644
--- a/modules/platforms/cpp/README.txt
+++ b/modules/platforms/cpp/README.txt
@@ -12,11 +12,12 @@ Support for the following will be added in next releases:
* ACID transactions management.
* Distributed locks.
* Async operations.
- * Cache SQL queries and continuous queries.
+ * Cache SQL continuous queries.
* Event listening.
* Compute grid functionality.
Full source code is provided. Users should build the library for intended platform.
+For build instructions please refer to DEVNOTES.txt.
Linux info
==============
@@ -25,6 +26,7 @@ Files list:
* ignite - executable to start standalone Ignite C++ node.
* libignite.so - Ignite C++ API library.
+ * libignite-odbc.so - Ignite ODBC driver.
Development:
@@ -34,9 +36,10 @@ Development:
* Apache Ignite C++ depends on jni.h file located inside ${JAVA_HOME}/include directory.
Add this directory to headers search path: "-I${JAVA_HOME}/include".
* Library is placed in the "/usr/local/lib" directory. Link it to your project: "-lignite".
- * Ignite depends on "libjvm.so" library shipped with Java. Typically this library is located inside
- $JAVA_HOME/jre/lib/amd64/server directory. Ensure that LD_LIBRARY_PATH environment variable points to this directory.
- * To start Apache Ignite as a standalone node or Windows service use ignite
+ * Ignite depends on "libjvm.so" library shipped with Java. Typically this library is
+ located inside $JAVA_HOME/jre/lib/amd64/server directory. Ensure that LD_LIBRARY_PATH
+ environment variable points to this directory.
+ * To start Apache Ignite as a standalone node use "ignite" binary.
Windows info
@@ -46,22 +49,28 @@ Files list:
* ignite.exe - executable to start standalone Ignite C++ node.
* ignite.core.dll - Ignite C++ API library.
+ * odbc.dll - Ignite ODBC driver.
Development:
* IGNITE_HOME environment variable must be set to Ignite installation directory.
* Update Include Directories in Project Properties with paths to:
- * $(IGNITE_HOME)\platforms\cpp\core\include
- * $(IGNITE_HOME)\platforms\cpp\core\os\win\include
* $(IGNITE_HOME)\platforms\cpp\common\include
* $(IGNITE_HOME)\platforms\cpp\common\os\win\include
+ * $(IGNITE_HOME)\platforms\cpp\jni\include
+ * $(IGNITE_HOME)\platforms\cpp\jni\os\win\include
+ * $(IGNITE_HOME)\platforms\cpp\binary\include
+ * $(IGNITE_HOME)\platforms\cpp\core\include
* $(JAVA_HOME)\include
* $(JAVA_HOME)\include\win32
* Update Library Directories with path to the built binaries
* Update Linker\Input\Additional Dependencies in Project Properties with path to
* ignite.common.lib
+ * ignite.jni.lib
+ * ignite.binary.lib
* ignite.core.lib
- * Make sure that your application is aware about ignite.common.dll and ignite.core.dll libraries. The easiest way
- to achieve this is to either make sure these files are in %PATH%, or to put them into the output directory of
- your project with help of PostBuild events.
- * To start Apache Ignite as a standalone node or Windows service use ignite.exe
\ No newline at end of file
+ * Make sure that your application is aware about ignite.jni.dll and ignite.core.dll
+ libraries. The easiest way to achieve this is to either make sure these files are in
+ %PATH%, or to put them into the output directory of your project with help of
+ PostBuild events.
+ * To start Apache Ignite as a standalone node or Windows service use ignite.exe
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/binary/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/Makefile.am b/modules/platforms/cpp/binary/Makefile.am
new file mode 100644
index 0000000..4876776
--- /dev/null
+++ b/modules/platforms/cpp/binary/Makefile.am
@@ -0,0 +1,69 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+lib_LTLIBRARIES = libignite-binary.la
+
+SUBDIRS = \
+ include
+
+AM_CPPFLAGS = \
+ -I$(srcdir)/include \
+ -I@top_srcdir@/common/include \
+ -I@top_srcdir@/common/os/linux/include \
+ -DIGNITE_IMPL
+
+AM_CXXFLAGS = \
+ -Wall \
+ -std=c++0x
+
+libignite_binary_la_LIBADD = \
+ @top_srcdir@/common/libignite-common.la
+
+libignite_binary_la_LDFLAGS = \
+ -no-undefined \
+ -version-info 0:0:0 \
+ -release $(PACKAGE_VERSION)
+
+libignite_binary_la_DEPENDENCIES = \
+ @top_srcdir@/common/libignite-common.la
+
+libignite_binary_la_SOURCES = \
+ src/binary/binary_containers.cpp \
+ src/binary/binary_raw_writer.cpp \
+ src/binary/binary_writer.cpp \
+ src/binary/binary_reader.cpp \
+ src/binary/binary_type.cpp \
+ src/binary/binary_raw_reader.cpp \
+ src/impl/binary/binary_type_manager.cpp \
+ src/impl/binary/binary_utils.cpp \
+ src/impl/binary/binary_reader_impl.cpp \
+ src/impl/binary/binary_type_handler.cpp \
+ src/impl/binary/binary_writer_impl.cpp \
+ src/impl/binary/binary_type_updater.cpp \
+ src/impl/binary/binary_schema.cpp \
+ src/impl/binary/binary_type_snapshot.cpp \
+ src/impl/interop/interop_memory.cpp \
+ src/impl/interop/interop_output_stream.cpp \
+ src/impl/interop/interop_input_stream.cpp
+
+clean-local:
+ $(RM) *.gcno *.gcda
+
+clean-docs:
+ $(RM) $(DX_CLEANFILES)
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/binary/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/Makefile.am b/modules/platforms/cpp/binary/include/Makefile.am
new file mode 100644
index 0000000..d3211a3
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/Makefile.am
@@ -0,0 +1,46 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+nobase_include_HEADERS = \
+ ignite/binary/binary_raw_reader.h \
+ ignite/binary/binary_reader.h \
+ ignite/binary/binary_writer.h \
+ ignite/binary/binary_raw_writer.h \
+ ignite/binary/binary_containers.h \
+ ignite/binary/binary.h \
+ ignite/binary/binary_consts.h \
+ ignite/binary/binary_type.h \
+ ignite/impl/binary/binary_type_handler.h \
+ ignite/impl/binary/binary_id_resolver.h \
+ ignite/impl/binary/binary_type_manager.h \
+ ignite/impl/binary/binary_type_updater.h \
+ ignite/impl/binary/binary_common.h \
+ ignite/impl/binary/binary_writer_impl.h \
+ ignite/impl/binary/binary_type_snapshot.h \
+ ignite/impl/binary/binary_reader_impl.h \
+ ignite/impl/binary/binary_schema.h \
+ ignite/impl/binary/binary_utils.h \
+ ignite/impl/interop/interop_memory.h \
+ ignite/impl/interop/interop.h \
+ ignite/impl/interop/interop_stream_position_guard.h \
+ ignite/impl/interop/interop_output_stream.h \
+ ignite/impl/interop/interop_input_stream.h
+
+uninstall-hook:
+ if [ -d ${includedir}/ignite ]; then find ${includedir}/ignite -type d -empty -delete; fi
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/binary/include/ignite/binary/binary.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary.h b/modules/platforms/cpp/binary/include/ignite/binary/binary.h
new file mode 100644
index 0000000..bfe23f4
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+/**
+ * @file
+ * Includes all binary API headers.
+ */
+
+#ifndef _IGNITE_BINARY_BINARY
+#define _IGNITE_BINARY_BINARY
+
+#include "ignite/binary/binary_consts.h"
+#include "ignite/binary/binary_containers.h"
+#include "ignite/binary/binary_type.h"
+#include "ignite/binary/binary_raw_reader.h"
+#include "ignite/binary/binary_raw_writer.h"
+#include "ignite/binary/binary_reader.h"
+#include "ignite/binary/binary_writer.h"
+
+#endif //_IGNITE_BINARY_BINARY
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
new file mode 100644
index 0000000..8f3245a
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_consts.h
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+/**
+ * @file
+ * Declares specific binary constatants
+ */
+
+#ifndef _IGNITE_BINARY_BINARY_CONSTS
+#define _IGNITE_BINARY_BINARY_CONSTS
+
+#include <ignite/common/common.h>
+
+namespace ignite
+{
+ namespace binary
+ {
+ /**
+ * Binary collection types.
+ */
+ enum CollectionType
+ {
+ /**
+ * Undefined. Maps to ArrayList in Java.
+ */
+ IGNITE_COLLECTION_UNDEFINED = 0,
+
+ /**
+ * Array list. Maps to ArrayList in Java.
+ */
+ IGNITE_COLLECTION_ARRAY_LIST = 1,
+
+ /**
+ * Linked list. Maps to LinkedList in Java.
+ */
+ IGNITE_COLLECTION_LINKED_LIST = 2,
+
+ /**
+ * Hash set. Maps to HashSet in Java.
+ */
+ IGNITE_COLLECTION_HASH_SET = 3,
+
+ /**
+ * Linked hash set. Maps to LinkedHashSet in Java.
+ */
+ IGNITE_COLLECTION_LINKED_HASH_SET = 4
+ };
+
+ /**
+ * Binary map types.
+ */
+ enum MapType
+ {
+ /**
+ * Undefined. Maps to HashMap in Java.
+ */
+ IGNITE_MAP_UNDEFINED = 0,
+
+ /**
+ * Hash map. Maps to HashMap in Java.
+ */
+ IGNITE_MAP_HASH_MAP = 1,
+
+ /**
+ * Linked hash map. Maps to LinkedHashMap in Java.
+ */
+ IGNITE_MAP_LINKED_HASH_MAP = 2
+ };
+ }
+}
+
+#endif //_IGNITE_BINARY_BINARY_CONSTS
\ No newline at end of file