[ignite] branch master updated: IGNITE-13174 C++: Add CMake support for Windows
This is an automated email from the ASF dual-hosted git repository. isapego pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new f37ec9e IGNITE-13174 C++: Add CMake support for Windows f37ec9e is described below commit f37ec9eece4db627f2d5190e589f0522e445a251 Author: Igor Sapego AuthorDate: Fri Sep 25 02:20:10 2020 +0300 IGNITE-13174 C++: Add CMake support for Windows --- modules/platforms/cpp/CMakeLists.txt | 4 ++ modules/platforms/cpp/binary/CMakeLists.txt| 2 + .../include/ignite/impl/binary/binary_field_meta.h | 4 +- .../ignite/impl/binary/binary_object_impl.h| 2 +- .../include/ignite/impl/binary/binary_type_impl.h | 2 +- .../ignite/impl/binary/binary_type_snapshot.h | 4 +- .../binary/src/impl/binary/binary_field_meta.cpp | 4 +- .../binary/src/impl/binary/binary_object_impl.cpp | 2 +- .../src/impl/binary/binary_type_snapshot.cpp | 4 +- modules/platforms/cpp/cmake/FindIgnite.cmake | 27 modules/platforms/cpp/cmake/FindODBC.cmake | 9 +++- modules/platforms/cpp/common/CMakeLists.txt| 2 + .../cpp/common/include/ignite/common/big_integer.h | 14 +++ .../cpp/common/include/ignite/common/decimal.h | 14 +++ .../common/include/ignite/common/platform_utils.h | 2 +- .../cpp/common/include/ignite/common/utils.h | 12 +++--- .../common/os/linux/src/common/platform_utils.cpp | 2 +- .../os/win/include/ignite/common/concurrent_os.h | 2 +- .../common/os/win/src/common/platform_utils.cpp| 2 +- modules/platforms/cpp/common/src/common/utils.cpp | 14 +++ modules/platforms/cpp/core-test/CMakeLists.txt | 4 +- modules/platforms/cpp/core/CMakeLists.txt | 4 ++ modules/platforms/cpp/examples/CMakeLists.txt | 2 + .../cpp/examples/compute-example/CMakeLists.txt| 3 +- .../continuous-query-example/CMakeLists.txt| 3 +- .../cpp/examples/odbc-example/CMakeLists.txt | 8 +++- .../cpp/examples/put-get-example/CMakeLists.txt| 3 +- .../cpp/examples/query-example/CMakeLists.txt | 3 +- .../examples/query-example/src/query_example.cpp | 48 ++ .../thin-client-put-get-example/CMakeLists.txt | 3 +- modules/platforms/cpp/jni/CMakeLists.txt | 10 - modules/platforms/cpp/network/CMakeLists.txt | 5 ++- .../cpp/network/include/ignite/network/network.h | 7 ++-- .../cpp/network/include/ignite/network/utils.h | 4 +- .../cpp/network/os/win/src/network/utils.cpp | 2 +- .../platforms/cpp/network/src/network/network.cpp | 6 +-- modules/platforms/cpp/odbc-test/CMakeLists.txt | 4 +- modules/platforms/cpp/odbc/CMakeLists.txt | 12 +++--- modules/platforms/cpp/thin-client/CMakeLists.txt | 4 ++ 39 files changed, 168 insertions(+), 95 deletions(-) diff --git a/modules/platforms/cpp/CMakeLists.txt b/modules/platforms/cpp/CMakeLists.txt index 4492f04..cfebc78 100644 --- a/modules/platforms/cpp/CMakeLists.txt +++ b/modules/platforms/cpp/CMakeLists.txt @@ -42,6 +42,10 @@ if (WIN32) add_definitions(-DUNICODE=1) add_compile_options(/source-charset:utf-8) + +set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) endif() option (WITH_ODBC OFF) diff --git a/modules/platforms/cpp/binary/CMakeLists.txt b/modules/platforms/cpp/binary/CMakeLists.txt index e1f5fad..c69d6e3 100644 --- a/modules/platforms/cpp/binary/CMakeLists.txt +++ b/modules/platforms/cpp/binary/CMakeLists.txt @@ -50,6 +50,8 @@ if (WIN32) add_library(${TARGET} SHARED $) list(APPEND _target_libs ${TARGET}-objlib) + + set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "ignite.binary") else() add_library(${TARGET} SHARED ${SOURCES}) endif() diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_field_meta.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_field_meta.h index 73864eb..70982f0 100644 --- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_field_meta.h +++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_field_meta.h @@ -87,14 +87,14 @@ namespace ignite * * @param writer Writer. */ -void Write(ignite::binary::BinaryRawWriter& writer) const; +IGNITE_IMPORT_EXPORT void Write(ignite::binary::BinaryRawWriter& writer) const; /** * Read from data stream. * * @param reader reader. */ -void Read(ignite::binary::BinaryRawReader& reader); +IGNITE_IMPORT_EXPORT void Read(ignite::binary::BinaryRawReader& reader); private: /** Type ID. */ diff --git a/modules/platf
[ignite] branch IGNITE-7595 updated: ported the MyBatis integration docs
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/IGNITE-7595 by this push: new cebacad ported the MyBatis integration docs cebacad is described below commit cebacad1f46d20b9a1030efc0163be09b97bd7f1 Author: Denis Magda AuthorDate: Thu Sep 24 16:12:35 2020 -0700 ported the MyBatis integration docs --- docs/_data/toc.yaml| 2 ++ .../mybatis-l2-cache.adoc | 41 ++ 2 files changed, 43 insertions(+) diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml index 1d32928..356bbc8 100644 --- a/docs/_data/toc.yaml +++ b/docs/_data/toc.yaml @@ -397,6 +397,8 @@ url: extensions-and-integrations/ignite-for-spark/troubleshooting - title: Hibernate L2 Cache url: extensions-and-integrations/hibernate-l2-cache +- title: MyBatis L2 Cache + url: extensions-and-integrations/mybatis-l2-cache - title: Plugins url: plugins - title: SQL Reference diff --git a/docs/_docs/extensions-and-integrations/mybatis-l2-cache.adoc b/docs/_docs/extensions-and-integrations/mybatis-l2-cache.adoc new file mode 100644 index 000..a2eb81e --- /dev/null +++ b/docs/_docs/extensions-and-integrations/mybatis-l2-cache.adoc @@ -0,0 +1,41 @@ += Apache Ignite as MyBatis L2 Cache + +Apache Ignite can be used as a MyBatis L2 cache that distributes and caches data across a cluster of machines. + +If you are an Apache Maven user, simply add the following dependency to the `pom.xml`: + +[tabs] +-- +tab:pom.xml[] +[source,xml] + + + ... + +org.mybatis.caches +mybatis-ignite +1.0.5 + + ... + + +-- + +Alternatively, you can also download the https://github.com/mybatis/ignite-cache/releases[zip bundle, window=_blank], +decompress it and add the jars in the classpath. + +Then, just specify it in the mapper XML as follows: + +[tabs] +-- +tab:XML[] +[source,xml] + + + + + +-- + +and configure your Ignite cache in `config/default-config.xml`. (Simple reference configurations are available on +https://github.com/mybatis/ignite-cache/tree/master/config[Github, window=_blank])
[ignite] branch IGNITE-7595 updated: ported the Spring-related docs
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/IGNITE-7595 by this push: new 7f82c5d ported the Spring-related docs 7f82c5d is described below commit 7f82c5dab5abd7db0323163d13d023d60305cbdc Author: Denis Magda AuthorDate: Thu Sep 24 16:03:19 2020 -0700 ported the Spring-related docs --- docs/_data/toc.yaml| 8 + .../spring/spring-boot.adoc| 196 ++ .../spring/spring-caching.adoc | 218 + .../spring/spring-data.adoc| 214 4 files changed, 636 insertions(+) diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml index 9489c96..1d32928 100644 --- a/docs/_data/toc.yaml +++ b/docs/_data/toc.yaml @@ -373,6 +373,14 @@ url: sqlline - title: Extensions and Integrations items: +- title: Spring + items: +- title: Spring Boot + url: extensions-and-integrations/spring/spring-boot +- title: Spring Data + url: extensions-and-integrations/spring/spring-data +- title: Spring Caching + url: extensions-and-integrations/spring/spring-caching - title: Ignite for Spark items: - title: Overview diff --git a/docs/_docs/extensions-and-integrations/spring/spring-boot.adoc b/docs/_docs/extensions-and-integrations/spring/spring-boot.adoc new file mode 100644 index 000..ee7207f --- /dev/null +++ b/docs/_docs/extensions-and-integrations/spring/spring-boot.adoc @@ -0,0 +1,196 @@ += Apache Ignite With Spring Boot + +== Overview + +https://spring.io/projects/spring-boot[Spring Boot, window="_blank"] is a widely used Java framework that makes it easy +to create stand-alone Spring-based applications. + +Apache Ignite provides two extensions that automate Ignite configuration withing the Spring Boot environment: + +* `ignite-spring-boot-autoconfigure-ext` - autoconfigures ignite server and client nodes within Spring Boot. +* `ignite-spring-boot-thin-client-autoconfigure-ext` - autoconfigures link:thin-clients/java-thin-client[Ignite Thin Client] with Spring Boot. + +== Autoconfiguration of Apache Ignite Servers and Clients + +You need to use `ignite-spring-boot-autoconfigure-ext` extension to autoconfigure Ignite servers or clients (aka. thick clients) with Spring Boot. + +The extension can be added with Maven as follows: + +[tabs] +-- +tab:pom.xml[] +[source,xml] + + + org.apache.ignite + ignite-spring-boot-autoconfigure-ext + 1.0.0 + + +-- + +Once added, Spring will create an Ignite instance on start-up automatically. + +=== Set Ignite Up Via Spring Boot Configuration + +You can use a regular Spring Boot configuration to set Ignite-specific settings. Use `ignite` as a prefix: + +[tabs] +-- +tab:application.yml[] +[source,yaml] + +ignite: + igniteInstanceName: properties-instance-name + communicationSpi: +localPort: + dataStorageConfiguration: +defaultDataRegionConfiguration: + initialSize: 10485760 #10MB +dataRegionConfigurations: + - name: my-dataregion +initialSize: 104857600 #100MB + cacheConfiguration: +- name: accounts + queryEntities: + - tableName: ACCOUNTS +keyFieldName: ID +keyType: java.lang.Long +valueType: java.lang.Object +fields: + ID: java.lang.Long + amount: java.lang.Double + updateDate: java.util.Date +- name: my-cache2 + +-- + +=== Set Ignite Up Programmatically + +There are two ways to configure Ignite programmatically. + +**1. Create IgniteConfiguration Bean** + +Just create a method that returns `IgniteConfiguration` bean that will be used to initialize an Ignite node with the settings you set: + +[tabs] +-- +tab:Java[] +[source,java] + +@Bean + public IgniteConfiguration igniteConfiguration() { + // If you provide a whole ClientConfiguration bean then configuration properties will not be used. +IgniteConfiguration cfg = new IgniteConfiguration(); +cfg.setIgniteInstanceName("my-ignite"); +return cfg; + } + +-- + +**2. Customize IgniteConfiguration Created With Spring Boot Configuration** + +If you want to customize `IgniteConfiguration` that was initially created with Spring Boot configuration file, then +provide an implementation of `IgniteConfigurer` interface for your application context. + +First, `IgniteConfiguration` will be loaded from the Spring Boot configuration and then that instance will be passed to the configurer for extra settings. + +[tabs] +-- +tab:Java[] +[source,java] + +@Bean + public IgniteConfigurer nodeConfigurer() { +return cfg -> { + //Setting some property. + //Other will come from `application.yml` + cfg.setIgniteInstanceName("my-ignite"); +}; + } + +-
[ignite] branch IGNITE-7595 updated: ported the hibernate l2 cache docs
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/IGNITE-7595 by this push: new 22a129c ported the hibernate l2 cache docs 22a129c is described below commit 22a129c9465a5b60e08b0c12d9c91bf7bb7753db Author: Denis Magda AuthorDate: Thu Sep 24 15:00:08 2020 -0700 ported the hibernate l2 cache docs --- docs/_data/toc.yaml| 378 +++-- .../hibernate-l2-cache.adoc| 294 .../ignite-for-spark/ignite-dataframe.adoc | 0 .../ignite-for-spark/ignitecontext-and-rdd.adoc| 0 .../ignite-for-spark/installation.adoc | 0 .../ignite-for-spark/overview.adoc | 0 .../ignite-for-spark/spark-shell.adoc | 0 .../ignite-for-spark/troubleshooting.adoc | 0 .../images/integrations/hibernate-l2-cache.png | Bin 0 -> 135173 bytes 9 files changed, 485 insertions(+), 187 deletions(-) diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml index 4bf3950..9489c96 100644 --- a/docs/_data/toc.yaml +++ b/docs/_data/toc.yaml @@ -1,414 +1,418 @@ - title: Preface - url: /preface + url: preface - title: Quick Start Guides items: - title: Java - url: /quick-start/java + url: quick-start/java - title: .NET/C# - url: /quick-start/dotnet + url: quick-start/dotnet - title: C++ - url: /quick-start/cpp + url: quick-start/cpp - title: Python - url: /quick-start/python + url: quick-start/python - title: Node.JS - url: /quick-start/nodejs + url: quick-start/nodejs - title: SQL - url: /quick-start/sql + url: quick-start/sql - title: PHP - url: /quick-start/php + url: quick-start/php - title: REST API - url: /quick-start/restapi + url: quick-start/restapi - title: Installation - url: /installation + url: installation items: - title: Installing Using ZIP Archive -url: /installation/installing-using-zip +url: installation/installing-using-zip - title: Installing Using Docker -url: /installation/installing-using-docker +url: installation/installing-using-docker - title: Installing DEB or RPM package -url: /installation/deb-rpm +url: installation/deb-rpm - title: Kubernetes items: - title: Amazon EKS -url: /installation/kubernetes/amazon-eks-deployment +url: installation/kubernetes/amazon-eks-deployment - title: Azure Kubernetes Service -url: /installation/kubernetes/azure-deployment +url: installation/kubernetes/azure-deployment - title: Google Kubernetes Engine -url: /installation/kubernetes/gke-deployment +url: installation/kubernetes/gke-deployment - title: Setting Up items: - title: Setting Up Ignite for Java - url: /setup + url: setup - title: Setting Up Ignite for .NET/C# - url: /setup-dotnet + url: setup-dotnet - title: Understanding Configuration - url: /understanding-configuration + url: understanding-configuration - title: Configuring Logging - url: /logging + url: logging - title: Starting and Stopping Nodes - url: /starting-nodes + url: starting-nodes - title: Clustering items: - title: Overview - url: /clustering/clustering + url: clustering/clustering - title: TCP/IP Discovery - url: /clustering/tcp-ip-discovery + url: clustering/tcp-ip-discovery - title: ZooKeeper Discovery - url: /clustering/zookeeper-discovery + url: clustering/zookeeper-discovery - title: Discovery in the Cloud - url: /clustering/discovery-in-the-cloud + url: clustering/discovery-in-the-cloud - title: Network Configuration - url: /clustering/network-configuration + url: clustering/network-configuration - title: Connecting Client Nodes - url: /clustering/connect-client-nodes + url: clustering/connect-client-nodes - title: Running Client Nodes Behind NAT - url: /clustering/running-client-nodes-behind-nat + url: clustering/running-client-nodes-behind-nat - title: Data Modeling items: - title: Introduction - url: /data-modeling/data-modeling + url: data-modeling/data-modeling - title: Data Partitioning - url: /data-modeling/data-partitioning + url: data-modeling/data-partitioning - title: Affinity Colocation - url: /data-modeling/affinity-collocation + url: data-modeling/affinity-collocation - title: Configuring Memory items: - title: Memory Architecture - url: /memory-architecture + url: memory-architecture - title: Configuring Data Regions - url: /memory-configuration/data-regions + url: memory-configuration/data-regions - title: Eviction
[ignite] branch IGNITE-7595 updated: cosmetic changes in the sandbox and cpp installation instructions
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/IGNITE-7595 by this push: new 385b68d cosmetic changes in the sandbox and cpp installation instructions 385b68d is described below commit 385b68d5985d25604c46ec39a6127a592d8ebb3b Author: Denis Magda AuthorDate: Thu Sep 24 12:29:07 2020 -0700 cosmetic changes in the sandbox and cpp installation instructions --- docs/_data/toc.yaml| 2 +- docs/_docs/includes/cpp-prerequisites.adoc | 8 ++-- docs/_docs/quick-start/cpp.adoc| 2 +- docs/_docs/security/sandbox.adoc | 29 +++-- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml index 8f124c2..4bf3950 100644 --- a/docs/_data/toc.yaml +++ b/docs/_data/toc.yaml @@ -319,7 +319,7 @@ url: /security/tde - title: Master key rotation url: /security/master-key-rotation -- titel: Sandbox +- title: Sandbox url: /security/sandbox - title: Thin Clients items: diff --git a/docs/_docs/includes/cpp-prerequisites.adoc b/docs/_docs/includes/cpp-prerequisites.adoc index de5bf5b..83f3a19 100644 --- a/docs/_docs/includes/cpp-prerequisites.adoc +++ b/docs/_docs/includes/cpp-prerequisites.adoc @@ -1,11 +1,7 @@ [width="100%",cols="1,3"] |=== -.3+|JDK|Oracle JDK 8 and later -|Open JDK 8 and later -|IBM JDK 8 and later -.3+|OS|Windows (Vista and up), -|Windows Server (2008 and up) -|Ubuntu (18.04 64 bit) +|JDK|Oracle JDK 8 and later, Open JDK 8 and later, IBM JDK 8 and later +|OS|Windows Vista, Windows Server 2008 and later versions, Ubuntu (18.04 64 bit) |Network|No restrictions (10G recommended) |Hardware|No restrictions |C++ compiler|MS Visual C++ (10.0 and up), g++ (4.4.0 and up) diff --git a/docs/_docs/quick-start/cpp.adoc b/docs/_docs/quick-start/cpp.adoc index 67d692d..7de361f 100644 --- a/docs/_docs/quick-start/cpp.adoc +++ b/docs/_docs/quick-start/cpp.adoc @@ -49,7 +49,7 @@ include::includes/cpp-linux-build-prerequisites.adoc[] === Building C++ Ignite - Download and unzip the Ignite binary release. We'll refer to a resulting directory as to `${IGNITE_HOME}`. -- Create build directory for CMake. We'll refer to this as `${CPP_BUILD_DIR}` +- Create a build directory for CMake. We'll refer to this as `${CPP_BUILD_DIR}` - Build and install Ignite.C++ by executing the following commands: [tabs] diff --git a/docs/_docs/security/sandbox.adoc b/docs/_docs/security/sandbox.adoc index 04edc00..fa59cfd 100644 --- a/docs/_docs/security/sandbox.adoc +++ b/docs/_docs/security/sandbox.adoc @@ -9,34 +9,34 @@ and allows you to restrict the scope of user-defined logic executed via Ignite A == Ignite Sandbox Activation -Follow the steps below to activate Ignite Sandbox. +The activation of Ignite Sandbox involves the configuration of an `SecurityManager` instance and creation of an +`GridSecurityProcessor` implementation. -- Install the SecurityManager. +=== Install SecurityManager -Due to the fact, that Ignite Sandbox is based on the Java Sandbox model, and the SecurityManager is an important part of that model, you need to have it installed. +Due to the fact, that Ignite Sandbox is based on the Java Sandbox model, and +link:https://docs.oracle.com/javase/8/docs/technotes/guides/security/spec/security-spec.doc6.html#a19349[SecurityManager,window=_blank] +is an important part of that model, you need to have it installed. The SecurityManager is responsible for checking, which security policy is currently in effect. It also performs access control checks. The security manager is not automatically installed when an application is running. If you run Ignite as a separate application, you must invoke the Java Virtual Machine with the `-Djava.security.manager` command-line argument (which sets the value of the `java.security.manager property`). -There is also a -Djava.security.policy command-line argument, defining, which policy files are utilized. +There is also a `-Djava.security.policy` command-line argument, defining, which policy files are utilized. If you don't include `-Djava.security.policy` into the command line, then the policy files specified in the security properties file will be used. -You can read more about Security Management link:https://docs.oracle.com/javase/8/docs/technotes/guides/security/spec/security-spec.doc6.html#a19349[here,window=_blank]. - NOTE: It may be convenient adding the security manager and the policy command-line arguments to `{IGNITE-HOME}/bin/ignite.sh|ignite.bat` script. -Read more about link:/quick-start/java#starting_a_node[starting a node]. NOTE: Ignite should have enough permissions to work correctly. You may apply the most straightforward way that is granting to Ignite the `java.security.AllPermis
[ignite] branch IGNITE-7595 updated: IGNITE-13459 Document new building process of Ignite C++ (CMake) (#8269)
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/IGNITE-7595 by this push: new 67db5ef IGNITE-13459 Document new building process of Ignite C++ (CMake) (#8269) 67db5ef is described below commit 67db5ef43f9600b8ffdaf64c9a5389f619ee0439 Author: Ivan Daschinskiy AuthorDate: Thu Sep 24 22:06:41 2020 +0300 IGNITE-13459 Document new building process of Ignite C++ (CMake) (#8269) * IGNITE-13459 Document new build process on linux (CMake) --- docs/_docs/SQL/ODBC/odbc-driver.adoc | 45 .../includes/cpp-linux-build-prerequisites.adoc| 31 docs/_docs/includes/cpp-prerequisites.adoc | 13 docs/_docs/quick-start/cpp.adoc| 83 ++ docs/_docs/thin-clients/cpp-thin-client.adoc | 44 5 files changed, 143 insertions(+), 73 deletions(-) diff --git a/docs/_docs/SQL/ODBC/odbc-driver.adoc b/docs/_docs/SQL/ODBC/odbc-driver.adoc index 4833c27..21149ff 100644 --- a/docs/_docs/SQL/ODBC/odbc-driver.adoc +++ b/docs/_docs/SQL/ODBC/odbc-driver.adoc @@ -136,7 +136,7 @@ Apache Ignite ODBC Driver was officially tested on: |OS |- Windows (XP and up, both 32-bit and 64-bit versions) - Windows Server (2008 and up, both 32-bit and 64-bit versions) -- Ubuntu (14.x and 15.x 64-bit) +- Ubuntu (18.04 64-bit) |C++ compiler @@ -201,21 +201,38 @@ As a result, `ignite-odbc-amd64.msi` and `ignite-odbc-x86.msi` files should appe On a Linux-based operating system, you will need to install an ODBC Driver Manager of your choice to be able to build and use the Ignite ODBC Driver. The ODBC Driver has been tested with link:http://www.unixodbc.org[UnixODBC]. -Additionally, you will need `GCC`, `G++`, and `make` to build the driver and its dependencies. + Prerequisites +include::includes/cpp-linux-build-prerequisites.adoc[] -Once all the above mentioned are installed, you can build the Ignite ODBC driver: +NOTE: The JDK is used only during the build process and not by the ODBC driver itself. -[source,shell] + Building ODBC driver +- Create a build directory for cmake. We'll refer to it as `${CPP_BUILD_DIR}` +- (Optional) Choose installation directory prefix (by default `/usr/local`). We'll refer to it as `${CPP_INSTALL_DIR}` +- Build and install the driver by executing the following commands: + +[tabs] +-- +tab:Ubuntu[] +[source,bash,subs="attributes,specialchars"] -cd $IGNITE_HOME/platforms/cpp -libtoolize && aclocal && autoheader && automake --add-missing && autoreconf -./configure --enable-odbc --disable-node --disable-core +cd ${CPP_BUILD_DIR} +cmake -DCMAKE_BUILD_TYPE=Release -DWITH_ODBC=ON ${IGNITE_HOME}/platforms/cpp -DCMAKE_INSTALL_PREFIX=${CPP_INSTALL_DIR} make +sudo make install + -#The following step will most probably require root privileges: -make install +tab:CentOS/RHEL[] +[source,shell,subs="attributes,specialchars"] + +cd ${CPP_BUILD_DIR} +cmake3 -DCMAKE_BUILD_TYPE=Release -DWITH_ODBC=ON ${IGNITE_HOME}/platforms/cpp -DCMAKE_INSTALL_PREFIX=${CPP_INSTALL_DIR} +make +sudo make install +-- + After the build process is over, you can find out where your ODBC driver has been placed by running the following command: [source,shell] @@ -284,12 +301,14 @@ Once you have built the driver and performed the `make install` command, the ODB + If there are unresolved links to other libraries, you may want to add directories with these libraries to the `LD_LIBRARY_PATH`. -- Edit file `$IGNITE_HOME/platforms/cpp/odbc/install/ignite-odbc-install.ini` and ensure that Driver parameter of the Apache Ignite section points to where `libignite-odbc.so` is located. +- Edit file `${IGNITE_HOME}/platforms/cpp/odbc/install/ignite-odbc-install.ini` and ensure that Driver parameter of the Apache Ignite section points to where `libignite-odbc.so` is located. - To install the ODBC driver, use the following command: -+ -`odbcinst -i -d -f $IGNITE_HOME/platforms/cpp/odbc/install/ignite-odbc-install.ini` -+ + +[source,shell] + +odbcinst -i -d -f ${IGNITE_HOME}/platforms/cpp/odbc/install/ignite-odbc-install.ini + To perform this command, you may need root privileges. Now the Apache Ignite ODBC driver is installed and ready for use. You can connect to it and use it just like any other ODBC driver. diff --git a/docs/_docs/includes/cpp-linux-build-prerequisites.adoc b/docs/_docs/includes/cpp-linux-build-prerequisites.adoc new file mode 100644 index 000..28c8f98 --- /dev/null +++ b/docs/_docs/includes/cpp-linux-build-prerequisites.adoc @@ -0,0 +1,31 @@ +The following packages need to be installed: + +- C++ compiler +- cmake 3.6+ +- jdk +- openssl, including header files +- unixODBC + +Installation instructions for several popular distributions are listed below: +[tabs] +-- +tab:
[ignite] branch IGNITE-7595 updated (5e1ce17 -> 111cdef)
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a change to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git. from 5e1ce17 IGNITE-12968 Fix snapshot documentation issues (#8258) add 111cdef IGNITE-12443 Document the Ignite Sandbox (#8237) No new revisions were added by this update. Summary of changes: docs/_data/toc.yaml | 2 + docs/_docs/security/sandbox.adoc | 79 2 files changed, 81 insertions(+) create mode 100644 docs/_docs/security/sandbox.adoc
[ignite] branch ignite-ducktape updated: IGNITE-13434 add assertion test (#8259)
This is an automated email from the ASF dual-hosted git repository. nizhikov pushed a commit to branch ignite-ducktape in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-ducktape by this push: new cb0b247 IGNITE-13434 add assertion test (#8259) cb0b247 is described below commit cb0b2475249c419bc720ca1d7c4b0c2b06565965 Author: oleg-ostanin <48506823+oleg-osta...@users.noreply.github.com> AuthorDate: Thu Sep 24 11:20:44 2020 +0300 IGNITE-13434 add assertion test (#8259) --- .../tests/smoke_test/AssertionApplication.java | 35 ++ .../tests/ignitetest/services/ignite_app.py| 3 +- .../services/ignite_execution_exception.py | 24 ++ .../tests/ignitetest/tests/assertion_test.py | 55 ++ 4 files changed, 116 insertions(+), 1 deletion(-) diff --git a/modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/smoke_test/AssertionApplication.java b/modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/smoke_test/AssertionApplication.java new file mode 100644 index 000..0cb0d20 --- /dev/null +++ b/modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/smoke_test/AssertionApplication.java @@ -0,0 +1,35 @@ +/* + * 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.ducktest.tests.smoke_test; + +import com.fasterxml.jackson.databind.JsonNode; +import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication; + +/** + * Application to check java assertions to python exception conversion + */ +public class AssertionApplication extends IgniteAwareApplication { +/** {@inheritDoc} */ +@Override public void run(JsonNode jsonNode) { +assert false; + +markInitialized(); + +markFinished(); +} +} diff --git a/modules/ducktests/tests/ignitetest/services/ignite_app.py b/modules/ducktests/tests/ignitetest/services/ignite_app.py index 74b7fba..8fbf035 100644 --- a/modules/ducktests/tests/ignitetest/services/ignite_app.py +++ b/modules/ducktests/tests/ignitetest/services/ignite_app.py @@ -22,6 +22,7 @@ import re # pylint: disable=W0622 from ducktape.errors import TimeoutError +from ignitetest.services.ignite_execution_exception import IgniteExecutionException from ignitetest.services.utils.ignite_aware import IgniteAwareService @@ -81,7 +82,7 @@ class IgniteApplicationService(IgniteAwareService): try: self.await_event("IGNITE_APPLICATION_BROKEN", 1, from_the_beginning=True) -raise Exception("Java application execution failed. %s" % self.extract_result("ERROR")) +raise IgniteExecutionException("Java application execution failed. %s" % self.extract_result("ERROR")) except TimeoutError: pass diff --git a/modules/ducktests/tests/ignitetest/services/ignite_execution_exception.py b/modules/ducktests/tests/ignitetest/services/ignite_execution_exception.py new file mode 100644 index 000..ce6cb56 --- /dev/null +++ b/modules/ducktests/tests/ignitetest/services/ignite_execution_exception.py @@ -0,0 +1,24 @@ +# 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. + +""" +Ignite execution exception +""" + + +class IgniteExecutionException(Exception): +""" +Ignite execution exception implementation +""" diff --git a/modules/ducktests/tests/ignitetest/tests/assertion_test.py b/modules/duckte
[ignite] branch master updated: IGNITE-13458 Added RebalancingPartitionsTotal metric. - Fixes #8254.
This is an automated email from the ASF dual-hosted git repository. ascherbakov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new eabe50d IGNITE-13458 Added RebalancingPartitionsTotal metric. - Fixes #8254. eabe50d is described below commit eabe50d90d5db2d363da36393cd957ff54a18d90 Author: mstepachev AuthorDate: Thu Sep 24 10:15:46 2020 +0300 IGNITE-13458 Added RebalancingPartitionsTotal metric. - Fixes #8254. Signed-off-by: Alexey Scherbakov --- .../distributed/dht/preloader/GridDhtPartitionDemander.java | 11 ++- .../processors/cache/CacheGroupsMetricsRebalanceTest.java| 12 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java index 624ee06..bae41ca 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java @@ -164,6 +164,10 @@ public class GridDhtPartitionDemander { mreg.register("RebalancingPartitionsLeft", () -> rebalanceFut.partitionsLeft.get(), "The number of cache group partitions left to be rebalanced."); +mreg.register("RebalancingPartitionsTotal", +() -> rebalanceFut.partitionsTotal, +"The total number of cache group partitions to be rebalanced."); + mreg.register("RebalancingReceivedKeys", () -> rebalanceFut.receivedKeys.get(), "The number of currently rebalanced keys for the whole cache group."); @@ -1139,6 +1143,9 @@ public class GridDhtPartitionDemander { /** The number of cache group partitions left to be rebalanced. */ private final AtomicLong partitionsLeft = new AtomicLong(0); +/** The number of cache group partitions total to be rebalanced. */ +private final int partitionsTotal; + /** Rebalancing start time. */ private volatile long startTime = -1; @@ -1192,7 +1199,7 @@ public class GridDhtPartitionDemander { ) { assert assignments != null : "Asiignments must not be null."; -this.rebalancingParts = U.newHashMap(assignments.size()); +rebalancingParts = U.newHashMap(assignments.size()); this.assignments = assignments; exchId = assignments.exchangeId(); topVer = assignments.topologyVersion(); @@ -1229,6 +1236,7 @@ public class GridDhtPartitionDemander { this.routines = remaining.size(); +partitionsTotal = rebalancingParts.values().stream().mapToInt(Set::size).sum(); this.grp = grp; this.log = log; this.rebalanceId = rebalanceId; @@ -1243,6 +1251,7 @@ public class GridDhtPartitionDemander { */ RebalanceFuture() { this.rebalancingParts = null; +this.partitionsTotal = 0; this.assignments = null; this.exchId = null; this.topVer = null; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java index 66e6ae2..43a873c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupsMetricsRebalanceTest.java @@ -60,6 +60,7 @@ import org.apache.ignite.internal.visor.node.VisorNodeDataCollectorTaskResult; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.plugin.extensions.communication.Message; +import org.apache.ignite.spi.metric.IntMetric; import org.apache.ignite.spi.metric.LongMetric; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; @@ -270,6 +271,7 @@ public class CacheGroupsMetricsRebalanceTest extends GridCommonAbstractTest { LongMetric lastCancelledTime = mreg.findMetric("RebalancingLastCancelledTime"); LongMetric endTime = mreg.findMetric("RebalancingEndTime"); LongMetric partitionsLeft = mreg.findMetric("RebalancingPartitionsLeft"); +IntMetric partitionsTotal = mreg.findMetric("RebalancingPartitionsTotal"); LongMetric receivedKeys = mreg.findMetric("RebalancingReceivedKeys"); LongMetric receivedBytes = mreg.findMetric("RebalancingReceivedBytes");