You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ab...@apache.org on 2020/08/19 10:19:17 UTC

[ignite] branch IGNITE-7595 updated (eb2b635 -> 6b9c7f4)

This is an automated email from the ASF dual-hosted git repository.

abudnikov pushed a change to branch IGNITE-7595
in repository https://gitbox.apache.org/repos/asf/ignite.git.


    from eb2b635  major updates
     new b7d4623  update quick start guides
     new f52b159  fix an incorrect reference
     new 6b9c7f4  update tracing page

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/ignite/snippets/Tracing.java   | 20 ++++++-
 docs/_docs/includes/exampleprojects.adoc           |  2 +-
 docs/_docs/includes/prereqs.adoc                   |  2 +-
 docs/_docs/installation/installing-using-zip.adoc  |  2 +-
 docs/_docs/monitoring-metrics/tracing.adoc         | 65 ++++++++++++++++++----
 docs/_docs/quick-start/nodejs.adoc                 |  2 +-
 docs/_docs/quick-start/php.adoc                    | 11 ++--
 docs/_docs/quick-start/python.adoc                 |  3 +-
 docs/_docs/quick-start/restapi.adoc                |  7 +--
 docs/_docs/quick-start/sql.adoc                    |  3 +-
 10 files changed, 88 insertions(+), 29 deletions(-)


[ignite] 01/03: update quick start guides

Posted by ab...@apache.org.
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 b7d462360b83b9c3362c248d1b40e4237e1b5001
Author: abudnikov <ab...@gridgain.com>
AuthorDate: Wed Aug 19 13:17:33 2020 +0300

    update quick start guides
---
 docs/_docs/includes/exampleprojects.adoc |  2 +-
 docs/_docs/includes/prereqs.adoc         |  2 +-
 docs/_docs/quick-start/nodejs.adoc       |  2 +-
 docs/_docs/quick-start/php.adoc          | 11 ++++++-----
 docs/_docs/quick-start/python.adoc       |  3 ++-
 docs/_docs/quick-start/restapi.adoc      |  7 +++----
 docs/_docs/quick-start/sql.adoc          |  3 ++-
 7 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/docs/_docs/includes/exampleprojects.adoc b/docs/_docs/includes/exampleprojects.adoc
index 22b6035..a94686c 100644
--- a/docs/_docs/includes/exampleprojects.adoc
+++ b/docs/_docs/includes/exampleprojects.adoc
@@ -14,7 +14,7 @@ image::images/ijimport.png[Importing a Project in IntelliJ]
 
 . Set up JDK if needed.
 
-. Run `src/main/java/org.apache.examples/datagrid/CacheApiExample`:
+. Run `src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample`:
 +
 image::images/ijrun.png[Run a project in IntelliJ]
 +
diff --git a/docs/_docs/includes/prereqs.adoc b/docs/_docs/includes/prereqs.adoc
index 6e0aba9..36fb779 100644
--- a/docs/_docs/includes/prereqs.adoc
+++ b/docs/_docs/includes/prereqs.adoc
@@ -2,7 +2,7 @@
 |===
 |JDK |Oracle JDK 8 and later, Open JDK 8 and later, IBM JDK 8 and later
 |OS |Linux (any flavor), Mac OSX (10.6 and up), Windows (XP and up),
-Windows Server (2008 and up), Oracle Solaris, z/OS
+Windows Server (2008 and up), Oracle Solaris
 |ISA |x86, x64, SPARC, PowerPC
 
 |Network |No restrictions (10G recommended)
diff --git a/docs/_docs/quick-start/nodejs.adoc b/docs/_docs/quick-start/nodejs.adoc
index 0036963..7dd5520 100644
--- a/docs/_docs/quick-start/nodejs.adoc
+++ b/docs/_docs/quick-start/nodejs.adoc
@@ -14,7 +14,7 @@ include::includes/prereqs.adoc[]
 
 and:
 
-[width="100%",cols="1,3",options=""]
+[width="100%",cols="1,3"]
 |=======================================================================
 |Node.js |Version 8 or higher is required. Either download the Node.js pre-built binary for the target platform, or install Node.js via package manager.
 |=======================================================================
diff --git a/docs/_docs/quick-start/php.adoc b/docs/_docs/quick-start/php.adoc
index 75e2893..1ed1eb0 100644
--- a/docs/_docs/quick-start/php.adoc
+++ b/docs/_docs/quick-start/php.adoc
@@ -16,9 +16,7 @@ and:
 
 [cols="1,3"]
 |=======================================================================
-|PHP |Version 7.2 or higher and Composer Dependency Manager. PHP
-Multibyte String extension. Depending on your PHP configuration, you may
-need to additionally install/configure it.
+|PHP |Version 7.2 or higher and Composer Dependency Manager. PHP Multibyte String extension. Depending on your PHP configuration, you may need to additionally install/configure it.
 |=======================================================================
 
 
@@ -26,9 +24,12 @@ need to additionally install/configure it.
 
 include::includes/install-ignite.adoc[]
 
-Once that's done, go to your install Ignite PHP Thin Client as a Composer package using the command below:
+Once that's done, go to `{IGNITE_HOME}/platforms/php` and install Ignite PHP Thin Client as a Composer package using the command below:
 
-include::includes/install-php-composer.adoc[]
+[source, ruby]
+----
+composer install --no-dev
+----
 
 You're almost ready to run your first application.
 
diff --git a/docs/_docs/quick-start/python.adoc b/docs/_docs/quick-start/python.adoc
index 0a936f9..6e4c799 100644
--- a/docs/_docs/quick-start/python.adoc
+++ b/docs/_docs/quick-start/python.adoc
@@ -39,6 +39,7 @@ Once the cluster is started, you can use the Ignite Python thin client to perfor
 
 Assuming that the server node is running locally, here is a _HelloWorld_ example that puts and gets values from the cache:
 
+.hello.py
 [source,python]
 ----
 from pyignite import Client
@@ -62,7 +63,7 @@ To run this, you can save the example as a text file (hello.py for example) and
 
 [source, python]
 ----
-python hello.py
+python3 hello.py
 ----
 
 Or you can enter the example into your Python interpreter/shell (IDLE on Windows, for example) and modify/execute it there.
diff --git a/docs/_docs/quick-start/restapi.adoc b/docs/_docs/quick-start/restapi.adoc
index 5600043..07b45e4 100644
--- a/docs/_docs/quick-start/restapi.adoc
+++ b/docs/_docs/quick-start/restapi.adoc
@@ -14,9 +14,8 @@ include::includes/prereqs.adoc[]
 
 include::includes/install-ignite.adoc[]
 
-Once that's done, you will need to enable HTTP connectivity by putting the
-`ignite-rest-http` module in the classpath of your application. To do this,
-copy the `ignite-rest-http` module from `{IGNITE_HOME}/libs/optional/` to the `{IGNITE_HOME}/libs` folder.
+Once that's done, you will need to enable HTTP connectivity.
+To do this, copy the `ignite-rest-http` module from `{IGNITE_HOME}/libs/optional/` to the `{IGNITE_HOME}/libs` folder.
 
 == Starting a Node
 
@@ -42,7 +41,7 @@ You should see a message like this:
 
 [source, shell,subs="attributes,specialchars"]
 -------------------------------------------------------------------------------
-curl "http://localhost:8080/ignite?cmd=version"
+$ curl "http://localhost:8080/ignite?cmd=version"
 {"successStatus":0,"error":null,"sessionToken":null,"response":"{version}"}
 -------------------------------------------------------------------------------
 
diff --git a/docs/_docs/quick-start/sql.adoc b/docs/_docs/quick-start/sql.adoc
index ff60c24..a94c1e4 100644
--- a/docs/_docs/quick-start/sql.adoc
+++ b/docs/_docs/quick-start/sql.adoc
@@ -53,7 +53,8 @@ $ sqlline -u jdbc:ignite:thin://127.0.0.1
 ----
 CREATE TABLE City (id LONG PRIMARY KEY, name VARCHAR) WITH "template=replicated";
 
-CREATE TABLE Person (id LONG, name VARCHAR, city_id LONG, PRIMARY KEY (id, city_id)) WITH "backups=1, affinityKey=city_id";
+CREATE TABLE Person (id LONG, name VARCHAR, city_id LONG, PRIMARY KEY (id, city_id))
+WITH "backups=1, affinityKey=city_id";
 ----
 
 


[ignite] 03/03: update tracing page

Posted by ab...@apache.org.
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 6b9c7f42781a1fd1b6b8a5b753e268027389a441
Author: abudnikov <ab...@gridgain.com>
AuthorDate: Wed Aug 19 13:18:15 2020 +0300

    update tracing page
---
 .../java/org/apache/ignite/snippets/Tracing.java   | 20 ++++++-
 docs/_docs/monitoring-metrics/tracing.adoc         | 65 ++++++++++++++++++----
 2 files changed, 71 insertions(+), 14 deletions(-)

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 7181ef8..61ec931 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,9 +1,11 @@
 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.apache.ignite.spi.tracing.Scope;
+import org.apache.ignite.spi.tracing.TracingConfigurationCoordinates;
+import org.apache.ignite.spi.tracing.TracingConfigurationParameters;
 import org.junit.jupiter.api.Test;
 
 import io.opencensus.exporter.trace.zipkin.ZipkinExporterConfiguration;
@@ -24,11 +26,23 @@ public class Tracing {
         ignite.close();
     }
 
+    void enableSampling() {
+        //tag::enable-sampling[]
+        Ignite ignite = Ignition.start();
+
+        ignite.tracingConfiguration().set(
+                new TracingConfigurationCoordinates.Builder(Scope.TX).build(),
+                new TracingConfigurationParameters.Builder().withSamplingRate(0.5).build());
+
+        //end::enable-sampling[]
+    }
+
     @Test
     void exportToZipkin() {
         //tag::export-to-zipkin[]
-        ZipkinTraceExporter.createAndRegister(ZipkinExporterConfiguration.builder()
-                .setV2Url("http://localhost:9411/api/v2/spans").setServiceName("ignite-cluster").build());
+        ZipkinTraceExporter.createAndRegister(
+                ZipkinExporterConfiguration.builder().setV2Url("http://localhost:9411/api/v2/spans")
+                        .setServiceName("ignite-cluster").build());
 
         IgniteConfiguration cfg = new IgniteConfiguration();
 
diff --git a/docs/_docs/monitoring-metrics/tracing.adoc b/docs/_docs/monitoring-metrics/tracing.adoc
index 1200afb..5536387 100644
--- a/docs/_docs/monitoring-metrics/tracing.adoc
+++ b/docs/_docs/monitoring-metrics/tracing.adoc
@@ -2,12 +2,14 @@
 
 :javaFile: {javaCodeDir}/Tracing.java
 
+WARNING: Experimental
+
 A number of APIs in Ignite are instrumented with OpenCensus for tracing.
 You can collect distributed traces of various tasks execuded in your cluster and use this information to diagnose latency problems.
 
-We suggest you get familiar with OpenCensus tracing documentation: https://opencensus.io/tracing/.
+We suggest you get familiar with OpenCensus tracing documentation: https://opencensus.io/tracing/[^].
 
-The following APIs are instrumented for tracing:
+The following Ignite APIs are instrumented for tracing:
 
 * Discovery
 * Communication
@@ -16,8 +18,8 @@ The following APIs are instrumented for tracing:
 
 == Configuring Tracing
 
-. Configure OpenCensus tracing in the node configuration:
-+
+Enable OpenCensus tracing in the node configuration. All nodes in the cluster must use the same tracing configuration.
+
 [tabs]
 --
 tab:XML[]
@@ -36,14 +38,54 @@ tab:C#/.NET[]
 tab:C++[unsupported]
 --
 
-. Enable sampling of traces for a specific scope:
-+
---
+
+
+== Enabling Sampling of Traces
+
+When you start your cluster with the above configuration, Ignite will not collect traces.
+You have to enable collection of traces for a specific API at runtime.
+You can turn trace sampling on and off at will, for example, only for the period when you are troubleshooting a problem.
+
+You can do this in two ways:
+
+* via the control script from the command line
+* programmatically
+
+Traces are collected with a given probabilistic sampling rate.
+The rate is specified as a value between 0 and 1 inclusive: `0` means no sampling, `1` means always sampling.
+
+When the sampling rate is set to a value greater than 0, Ignite will collect traces.
+To disable trace collection, set the sampling rate to 0.
+
+The following sections describe the two ways of enabling trace sampling.
+
+=== Using Control Script
+
+Go to the `{IGNITE_HOME}/bin` directory of your Ignite installation.
+Enable experimental commands in the control script:
+
+[source, shell]
+----
+export IGNITE_ENABLE_EXPERIMENTAL_COMMAND=true
+----
+
+Enable tracing for a specific API:
+
 [source, shell]
 ----
 ./control.sh --tracing-configuration set --scope DISCOVERY --sampling-rate 1
 ----
 
+=== Programmatically
+
+Once you start the node, you can enable sampling as follows:
+
+[source, java]
+----
+include::{javaFile}[tags=enable-sampling, indent=0]
+----
+
+
 The `--scope` parameter specifies the API you want to trace.
 The following APIs are instrumented for tracing:
 
@@ -52,9 +94,10 @@ The following APIs are instrumented for tracing:
 * `COMMUNICATION` — communication events
 * `TX` — transactions
 
-The `--sampling-rate` is the probabilistic sampling rate, a number between `0` and `1`.
-`0` means no sampling, `1` means always sampling.
---
+The `--sampling-rate` is the probabilistic sampling rate, a number between `0` and `1`:
+
+* `0` means no sampling,
+* `1` means always sampling.
 
 
 == Viewing Traces
@@ -64,7 +107,7 @@ OpenCensus supports a number of exporter out-of-the-box, and you can write a cus
 Refer to the link:https://opencensus.io/exporters/[OpenCensus Exporters^] for details.
 
 In this section, we will show how to export traces to link:https://zipkin.io[Zipkin^].
-Follow link:https://zipkin.io/pages/quickstart.html[this guide^] to launch Zipkin in your local machine.
+Follow link:https://zipkin.io/pages/quickstart.html[this guide^] to launch Zipkin on your machine.
 
 [source, java]
 ----


[ignite] 02/03: fix an incorrect reference

Posted by ab...@apache.org.
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 f52b159d6ed6e40756b847f042eb6f28858dc73a
Author: abudnikov <ab...@gridgain.com>
AuthorDate: Wed Aug 19 13:18:01 2020 +0300

    fix an incorrect reference
---
 docs/_docs/installation/installing-using-zip.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/_docs/installation/installing-using-zip.adoc b/docs/_docs/installation/installing-using-zip.adoc
index 7caa298..c817c9c 100644
--- a/docs/_docs/installation/installing-using-zip.adoc
+++ b/docs/_docs/installation/installing-using-zip.adoc
@@ -8,6 +8,6 @@ include::includes/prereqs.adoc[]
 
 == Installing Using ZIP Archive
 
-include::includes/installggqsg.adoc[]
+include::includes/install-ignite.adoc[]