This is an automated email from the ASF dual-hosted git repository. abudnikov pushed a commit to branch IGNITE-7595 in repository https://gitbox.apache.org/repos/asf/ignite.git
commit eb2b635b6b0e638b683e2e0ba91f1d2f910a0336 Author: abudnikov <[email protected]> AuthorDate: Tue Aug 18 10:32:19 2020 +0300 major updates --- docs/_config.yml | 4 +- docs/_data/toc.yaml | 18 +++++ docs/_docs/SQL/JDBC/jdbc-driver.adoc | 2 +- docs/_docs/SQL/indexes.adoc | 4 +- docs/_docs/SQL/sql-tuning.adoc | 12 ++-- .../java/org/apache/ignite/snippets/Tracing.java | 2 +- docs/_docs/images/ijfull.png | Bin 0 -> 548711 bytes docs/_docs/images/ijimport.png | Bin 0 -> 43919 bytes docs/_docs/images/ijrun.png | Bin 0 -> 50135 bytes docs/_docs/includes/dotnet-prerequisites.adoc | 6 ++ docs/_docs/includes/exampleprojects.adoc | 23 ++++++ .../{installggqsg.adoc => install-ignite.adoc} | 0 docs/_docs/includes/install-nodejs-npm.adoc | 5 ++ docs/_docs/includes/install-php-composer.adoc | 12 ++++ docs/_docs/includes/starting-node.adoc | 79 +++++++++++++++++++++ .../kubernetes/generic-configuration.adoc | 32 ++++----- docs/_docs/key-value-api/with-expiry-policy.adoc | 5 +- docs/_docs/restapi.adoc | 2 - docs/_docs/setup.adoc | 30 +++++++- docs/_docs/thin-clients/python-thin-client.adoc | 4 +- 20 files changed, 202 insertions(+), 38 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index a3d394a..d08b2d4 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,6 @@ exclude: [guidelines.md, "Gemfile", "Gemfile.lock", README.adoc, "_docs/code-snippets", "_docs/includes", '*.sh'] attrs: &asciidoc_attributes - version: 2.9 + version: 2.9.0 base_url: /docs stylesdir: /docs/assets/css imagesdir: /docs/{version} @@ -12,7 +12,7 @@ attrs: &asciidoc_attributes githubUrl: https://github.com/apache/ignite/tree/master collections: docs: - permalink: /docs/2.9/:path:output_ext + permalink: /docs/2.9.0/:path:output_ext output: true defaults: - diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml index 65a5cc3..91c80c6 100644 --- a/docs/_data/toc.yaml +++ b/docs/_data/toc.yaml @@ -1,5 +1,23 @@ - title: Preface url: /preface +- title: Quick Start Guides + items: + - title: Java + url: /quick-start/java + - title: .NET/C# + url: /quick-start/dotnet + - title: C++ + url: /quick-start/cpp + - title: Python + url: /quick-start/python + - title: Node.JS + url: /quick-start/nodejs + - title: SQL + url: /quick-start/sql + - title: PHP + url: /quick-start/php + - title: REST API + url: /quick-start/restapi - title: Installation url: /installation items: diff --git a/docs/_docs/SQL/JDBC/jdbc-driver.adoc b/docs/_docs/SQL/JDBC/jdbc-driver.adoc index e468e9e..b41c8cc 100644 --- a/docs/_docs/SQL/JDBC/jdbc-driver.adoc +++ b/docs/_docs/SQL/JDBC/jdbc-driver.adoc @@ -3,7 +3,7 @@ Ignite is shipped with JDBC drivers that allow processing of distributed data using standard SQL statements like `SELECT`, `INSERT`, `UPDATE` or `DELETE` directly from the JDBC side. -Presently, there are two drivers supported by Ignite: the lightweight and easy to use JDBC Thin Driver described in this document and link:SQL/JDBC/jdbc-client-driver[JDBC Client Driver] that interacts with the cluster by means of a link:clustering/clustering#servers-and-clients[client node]. +Presently, there are two drivers supported by Ignite: the lightweight and easy to use JDBC Thin Driver described in this document and link:SQL/JDBC/jdbc-client-driver[JDBC Client Driver] that interacts with the cluster by means of a client node. == JDBC Thin Driver diff --git a/docs/_docs/SQL/indexes.adoc b/docs/_docs/SQL/indexes.adoc index b764ff5..1121d8b 100644 --- a/docs/_docs/SQL/indexes.adoc +++ b/docs/_docs/SQL/indexes.adoc @@ -280,7 +280,7 @@ include::{csharpFile}[tag=query-entity-with-inline-size,indent=0] tab:C++[unsupported] -- -* If you create indexes using the `CREATE INDEX` command, you can use the `INLINE_SIZE` option to set the inline size. See examples in the link:sql-reference/ddl#examples-4[corresponding section]. +* If you create indexes using the `CREATE INDEX` command, you can use the `INLINE_SIZE` option to set the inline size. See examples in the link:sql-reference/ddl[corresponding section]. + [source, sql] ---- @@ -337,7 +337,7 @@ tab:C++[unsupported] If a custom key can be serialized into a binary form, then Ingnite calculates its hash code and implement the `equals()` method automatically. -However, if the key's type is `Externalizable`, and if it cannot be serialized into the binary form, then you are required to implement the `hashCode` and `equals` methods manually. See the link:advanced-topics/binaryobject[Binary Objects] page for more details. +However, if the key's type is `Externalizable`, and if it cannot be serialized into the binary form, then you are required to implement the `hashCode` and `equals` methods manually. See the link:key-value-api/binary-objects[Binary Objects] page for more details. ==== diff --git a/docs/_docs/SQL/sql-tuning.adoc b/docs/_docs/SQL/sql-tuning.adoc index 72f22d4..5a69d82 100644 --- a/docs/_docs/SQL/sql-tuning.adoc +++ b/docs/_docs/SQL/sql-tuning.adoc @@ -6,8 +6,8 @@ This article outlines basic and advanced optimization techniques for Ignite SQL == Using the EXPLAIN Statement Ignite supports the `EXPLAIN` statement, which could be used to read the execution plan of a query. -Use this command to analyse your queries for possible optimization. -Note that the plan will contain multiple rows: the last one will contain a query for the reducing side (usually your application), others are for map nodes (usually server nodes). +Use this command to analyse your queries for possible optimization. +Note that the plan will contain multiple rows: the last one will contain a query for the reducing side (usually your application), others are for map nodes (usually server nodes). Read the link:SQL/sql-introduction#distributed-queries[Distributed Queries] section to learn how queries are executed in Ignite. [source,sql] @@ -38,7 +38,7 @@ Avoid having too many columns in the result set of a `SELECT` query. Due to limi == Lazy Loading -By default, Ignite attempts to load the whole result set to memory and send it back to the query initiator (which is usually your application). +By default, Ignite attempts to load the whole result set to memory and send it back to the query initiator (which is usually your application). This approach provides optimal performance for queries of small or medium result sets. However, if the result set is too big to fit in the available memory, it can lead to prolonged GC pauses and even `OutOfMemoryError` exceptions. @@ -305,7 +305,7 @@ Note that you will only have to set the inline size for the index on `stringFiel Refer to the link:SQL/indexes#configuring-index-inline-size[Configuring Index Inline Size] section for the information on how to change the inline size. -You can check the inline size of an existing index in the link:monitoring-metrics/system-views#indexes-view[INDEXES] system view. +You can check the inline size of an existing index in the link:monitoring-metrics/system-views#indexes[INDEXES] system view. [WARNING] ==== @@ -352,8 +352,8 @@ WHERE salary > 150000 AND age < 35; == Partition Pruning -Partition pruning is a technique that optimizes queries that use affinity keys in the `WHERE` condition. -When executing such a query, Ignite scans only those partitions where the requested data is stored. +Partition pruning is a technique that optimizes queries that use affinity keys in the `WHERE` condition. +When executing such a query, Ignite scans only those partitions where the requested data is stored. This reduces query time because the query is sent only to the nodes that store the requested partitions. In the following example, the employee objects are colocated by the `id` field (if an affinity key is not set diff --git a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Tracing.java b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Tracing.java index fd404e2..7181ef8 100644 --- a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Tracing.java +++ b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Tracing.java @@ -1,6 +1,7 @@ package org.apache.ignite.snippets; import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.Ignition; import org.apache.ignite.configuration.IgniteConfiguration; import org.junit.jupiter.api.Test; @@ -37,6 +38,5 @@ public class Tracing { //end::config[] //end::export-to-zipkin[] ignite.close(); - } } diff --git a/docs/_docs/images/ijfull.png b/docs/_docs/images/ijfull.png new file mode 100644 index 0000000..99dd5ae Binary files /dev/null and b/docs/_docs/images/ijfull.png differ diff --git a/docs/_docs/images/ijimport.png b/docs/_docs/images/ijimport.png new file mode 100644 index 0000000..72ef2ed Binary files /dev/null and b/docs/_docs/images/ijimport.png differ diff --git a/docs/_docs/images/ijrun.png b/docs/_docs/images/ijrun.png new file mode 100644 index 0000000..dea4aac Binary files /dev/null and b/docs/_docs/images/ijrun.png differ diff --git a/docs/_docs/includes/dotnet-prerequisites.adoc b/docs/_docs/includes/dotnet-prerequisites.adoc new file mode 100644 index 0000000..acad704 --- /dev/null +++ b/docs/_docs/includes/dotnet-prerequisites.adoc @@ -0,0 +1,6 @@ +[width="100%",cols="1,3"] +|=== +|JDK |Oracle JDK 8 and later, Open JDK 8 and later, IBM JDK 8 and later +|.NET Framework |.NET 4.0+, .NET Core 2.0+ +//|IDE |Visual Studio 2010+, Rider, Visual Studio Code +|=== diff --git a/docs/_docs/includes/exampleprojects.adoc b/docs/_docs/includes/exampleprojects.adoc new file mode 100644 index 0000000..22b6035 --- /dev/null +++ b/docs/_docs/includes/exampleprojects.adoc @@ -0,0 +1,23 @@ +Your Ignite installation includes additional examples. These examples are shipped together with the primary Ignite package you downloaded as part of the Ignite installation above. + +To run the examples project please follow these steps (which are provided for IntelliJ IDEA IDE, but should apply to similar IDEs such as Eclipse): + +. Start IntelliJ IDEA, click the "Import Project" button: ++ +image::images/ijimport.png[Importing a Project in IntelliJ] + +. Navigate to the `{IGNITE_HOME}/examples` folder and select the `{IGNITE}/examples/pom.xml` file. Click "OK". + +. Click "Next" on each of the following screens and apply the suggested defaults to the project. Click "Finish". + +. Wait while IntelliJ IDEA finishes setting up Maven, resolving dependencies, and loading modules. + +. Set up JDK if needed. + +. Run `src/main/java/org.apache.examples/datagrid/CacheApiExample`: ++ +image::images/ijrun.png[Run a project in IntelliJ] ++ +. Make sure that the example has been started and executed successfully, as shown in the image below. ++ +image::images/ijfull.png[Project in IntelliJ] diff --git a/docs/_docs/includes/installggqsg.adoc b/docs/_docs/includes/install-ignite.adoc similarity index 100% rename from docs/_docs/includes/installggqsg.adoc rename to docs/_docs/includes/install-ignite.adoc diff --git a/docs/_docs/includes/install-nodejs-npm.adoc b/docs/_docs/includes/install-nodejs-npm.adoc new file mode 100644 index 0000000..c8b4d4e --- /dev/null +++ b/docs/_docs/includes/install-nodejs-npm.adoc @@ -0,0 +1,5 @@ +[source,shell] +---- +npm install -g apache-ignite-client +---- + diff --git a/docs/_docs/includes/install-php-composer.adoc b/docs/_docs/includes/install-php-composer.adoc new file mode 100644 index 0000000..6872708 --- /dev/null +++ b/docs/_docs/includes/install-php-composer.adoc @@ -0,0 +1,12 @@ + +[source,shell] +---- +composer require apache/apache-ignite-client +---- + +To use the client in your application, include the `vendor/autoload.php` file, generated by Composer, to your source code, eg. + +[source,php] +---- +require_once __DIR__ . '/vendor/autoload.php'; +---- diff --git a/docs/_docs/includes/starting-node.adoc b/docs/_docs/includes/starting-node.adoc new file mode 100644 index 0000000..a1ccff2 --- /dev/null +++ b/docs/_docs/includes/starting-node.adoc @@ -0,0 +1,79 @@ +You can start a node from the command line using the default configuration or by passing a custom configuration file. +You can start as many nodes as you like and they will all automatically discover each other. + +Navigate into the `bin` folder of the Ignite installation directory from the command shell. +Your command might look like this: + +[tabs] +-- + +tab:Unix[] +[source,shell] +---- +cd {IGNITE_HOME}/bin/ +---- + +tab:Window[] +[source,shell] +---- +cd {IGNITE_HOME}\bin\ +---- + +-- + + +Start a node with a custom configuration file that is passed as a parameter to `ignite.sh|bat` like this: + + +[tabs] +-- + +tab:Unix[] +[source,shell] +---- +./ignite.sh ../examples/config/example-ignite.xml +---- + +tab:Window[] +[source,shell] +---- +ignite.bat ..\examples\config\example-ignite.xml +---- +-- + + +You will see output similar to this: + +.... +[08:53:45] Ignite node started OK (id=7b30bc8e) +[08:53:45] Topology snapshot [ver=1, locNode=7b30bc8e, servers=1, clients=0, state=ACTIVE, CPUs=4, offheap=1.6GB, heap=2.0GB] +.... + +Open another tab from your command shell and run the same command again: + +[tabs] +-- +tab:Unix[] +[source,shell] +---- +./ignite.sh ../examples/config/example-ignite.xml +---- + +tab:Windows[] +[source,shell] +---- +ignite.bat ..\examples\config\example-ignite.xml +---- + +-- + +Check the `Topology snapshot` line in the output. +Now you have a cluster of two server nodes with more CPUs and RAM available cluster-wide: + +.... +[08:54:34] Ignite node started OK (id=3a30b7a4) +[08:54:34] Topology snapshot [ver=2, locNode=3a30b7a4, servers=2, clients=0, state=ACTIVE, CPUs=4, offheap=3.2GB, heap=4.0GB] +.... + + +NOTE: By default, `ignite.sh|bat` starts a node with the default configuration file: `config/default-config.xml`. diff --git a/docs/_docs/installation/kubernetes/generic-configuration.adoc b/docs/_docs/installation/kubernetes/generic-configuration.adoc index 8230953..85b4a01 100644 --- a/docs/_docs/installation/kubernetes/generic-configuration.adoc +++ b/docs/_docs/installation/kubernetes/generic-configuration.adoc @@ -52,8 +52,8 @@ include::{script}[tags=create-namespace] The {soft_name} service is used for auto-discovery and as a load-balancer for external applications that will connect to your cluster. -Every time a new node is started (in a separate pod), the IP finder will connect to the service via the Kubernetes API to obtain the list of the existing pods' addresses. -Using these addresses, the new node will be able to discover all cluster nodes. +Every time a new node is started (in a separate pod), the IP finder connects to the service via the Kubernetes API to obtain the list of the existing pods' addresses. +Using these addresses, the new node discovers all cluster nodes. .service.yaml [source, yaml] @@ -99,7 +99,7 @@ This will allow you to keep a single instance of the configuration file for all Let's create a configuration file first. Choose one of the tabs below, depending on whether you use persistence or not. -:kubernetes-ip-finder-description: This IP finder will connect to the service via the Kubernetes API and obtain the list of the existing pods' addresses. Using these addresses, the new node will be able to discover all other cluster nodes. +:kubernetes-ip-finder-description: This IP finder connects to the service via the Kubernetes API and obtains the list of the existing pods' addresses. Using these addresses, the new node discovers all other cluster nodes. [tabs] @@ -119,17 +119,16 @@ include::{configDir}/stateless/node-configuration.xml[] tab:Configuration with persistence[] In the configuration file, we will: -* Enable link:persistence/native-persistence[native persistence] and specify the `workDirectory`, `walPath`, and `walArchivePath`. These directories will be mounted in each pod that runs an Ignite node. Volume configuration is part of the <<Creating Pod Configuration,pod configuration>>. +* Enable link:persistence/native-persistence[native persistence] and specify the `workDirectory`, `walPath`, and `walArchivePath`. These directories are mounted in each pod that runs an Ignite node. Volume configuration is part of the <<Creating Pod Configuration,pod configuration>>. * Use the `TcpDiscoveryKubernetesIpFinder` IP finder. {kubernetes-ip-finder-description} -The file will look like this: +The file look like this: .node-configuration.xml [source, xml] ---- include::{configDir}/stateful/node-configuration.xml[] ---- - -- @@ -185,11 +184,11 @@ include::{script}[tags=create-deployment] tab:Configuration with persistence[] -Our StatefulSet configuration will deploy 2 pods running Ignite {version}. +Our StatefulSet configuration deploys 2 pods running Ignite {version}. In the container's configuration we will: -* Enable the “ignite-kubernetes” and “ignite-rest-http” link:installing-using-docker#enabling-modules[modules]. +* Enable the “ignite-kubernetes” and “ignite-rest-http” link:installation/installing-using-docker#enabling-modules[modules]. * Use the configuration file from the ConfigMap we created earlier. * Mount volumes for the work directory (where application data is stored), WAL files, and WAL archive. * Open a number of ports: @@ -208,7 +207,7 @@ include::{configDir}/stateful/statefulset-template.yaml[] ---- Note the `spec.volumeClaimTemplates` section, which defines persistent volumes provisioned by a persistent volume provisioner. -The volume type will depend on the cloud provider. +The volume type depends on the cloud provider. You can have more control over the volume type by defining https://kubernetes.io/docs/concepts/storage/storage-classes/[storage classes,window=_blank]. Create the StatefulSet by running the following command: @@ -286,13 +285,14 @@ If you are using persistence, you must activate the cluster after it is started. Execute the following command: + *TODO:check the path to control.sh:* [source, shell] ---- -/opt/gridgain/bin/control.sh --activate +/opt/apache-ignite/bin/control.sh --activate ---- -You can also activate the cluster using the link:restapi#activate[REST API]. Refer to the <<Connecting to the Cluster>> section for details about connection to the cluster's REST API. - +You can also activate the cluster using the link:restapi#activate[REST API]. +Refer to the <<Connecting to the Cluster>> section for details about connection to the cluster's REST API. == Scaling the Cluster @@ -335,11 +335,11 @@ Get the public IP of the service: [source, shell,subs="attributes,specialchars"] ---- $ {command} describe svc ignite-service -n ignite -Name: gridgain-service -Namespace: gridgain -Labels: app=gridgain +Name: ignite-service +Namespace: ignite +Labels: app=ignite Annotations: <none> -Selector: app=gridgain +Selector: app=ignite Type: LoadBalancer IP: 10.0.144.19 LoadBalancer Ingress: 13.86.186.145 diff --git a/docs/_docs/key-value-api/with-expiry-policy.adoc b/docs/_docs/key-value-api/with-expiry-policy.adoc index f8e9d3e..80ede51 100644 --- a/docs/_docs/key-value-api/with-expiry-policy.adoc +++ b/docs/_docs/key-value-api/with-expiry-policy.adoc @@ -1,8 +1,5 @@ ---- -published: false ---- - = Expiry Policy for Individual Entries +:page-published: false You can have expiry policy diff --git a/docs/_docs/restapi.adoc b/docs/_docs/restapi.adoc index eca5728..1dab3f2 100644 --- a/docs/_docs/restapi.adoc +++ b/docs/_docs/restapi.adoc @@ -88,8 +88,6 @@ include::code-snippets/xml/jetty.xml[tags=, indent=0] === Security -//NOTE: Refer to the link:https://www.gridgain.com/docs/tutorials/security/ssl-guide[SSL Guide] for a comprehensive instruction on SSL. - When link:security/authentication[authentication] is configured in the cluster, all applications that use REST API request authentication by providing security credentials. The authentication request returns a session token that can be used with any command within that session. diff --git a/docs/_docs/setup.adoc b/docs/_docs/setup.adoc index 5bdfca8..bd1315b 100644 --- a/docs/_docs/setup.adoc +++ b/docs/_docs/setup.adoc @@ -38,6 +38,32 @@ The easiest way to use Ignite is to add it to your pom. </dependencies> ---- +The 'ignite-core' library contains the core functionality of Ignite. +Addition functionality is provided by various Ignite modules. + +The following are the two most commonly used modules: + + +* `ignite-spring` (support for link:understanding-configuration#spring-xml-configuration[XML-based configuration]) +* `ignite-indexing` (support for SQL indexing) + + +[source, xml] +---- +<dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-spring</artifactId> + <version>${ignite.version}</version> +</dependency> +<dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-indexing</artifactId> + <version>${ignite.version}</version> +</dependency> + +---- + + == Using Docker @@ -118,7 +144,7 @@ your application. [source, xml] ---- <dependency> - <groupId>${groupId}</groupId> + <groupId>org.apache.ignite</groupId> <artifactId>ignite-log4j2</artifactId> <version>${ignite.version}</version> </dependency> @@ -132,7 +158,7 @@ The following modules have LGPL dependencies and, therefore, can't be deployed o * ignite-schedule To use these modules, you will need to build them from sources and add to your project. -For example, to install ignite-hibernate into your local repository, run this command in the Ignite source package: +For example, to install `ignite-hibernate` into your local repository, run this command in the Ignite source package: [source, shell] diff --git a/docs/_docs/thin-clients/python-thin-client.adoc b/docs/_docs/thin-clients/python-thin-client.adoc index 094f5da..07c067f 100644 --- a/docs/_docs/thin-clients/python-thin-client.adoc +++ b/docs/_docs/thin-clients/python-thin-client.adoc @@ -378,11 +378,11 @@ NOTE: Be cautious: if the cache contains a large set of data, the dictionary may == Executing SQL Statements -The Python thin client supports all link:sql-reference[SQL commands] that are supported by Ignite. +The Python thin client supports all link:sql-reference/index[SQL commands] that are supported by Ignite. The commands are executed via the `sql()` method of the cache object. The `sql()` method returns a generator that yields the resulting rows. -Refer to the link:sql-reference[SQL Reference] section for the list of supported commands. +Refer to the link:sql-reference/index[SQL Reference] section for the list of supported commands. [source, python] -------------------------------------------------------------------------------
