[ignite] branch IGNITE-7595 updated: Donated the Performance and Troubleshooting Guide from the GridGain to Ignite docs

2020-10-02 Thread dmagda
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 17c2e1b  Donated the Performance and Troubleshooting Guide from the 
GridGain to Ignite docs
17c2e1b is described below

commit 17c2e1bdfca0b327aac1a2d0adf973ea17505ac8
Author: Denis Magda 
AuthorDate: Thu Oct 1 23:33:48 2020 -0700

Donated the Performance and Troubleshooting Guide from the GridGain to 
Ignite docs
---
 docs/_data/toc.yaml|  18 +-
 .../apache/ignite/snippets/CustomThreadPool.java   |  53 +++
 .../org/apache/ignite/snippets/FailureHandler.java |  39 ++
 docs/_docs/code-snippets/xml/thread-pool.xml   |  32 ++
 .../general-perf-tips.adoc |  35 ++
 .../handling-exceptions.adoc   | 234 ++
 docs/_docs/perf-and-troubleshooting/index.adoc |   5 +
 .../perf-and-troubleshooting/memory-tuning.adoc| 171 +++
 .../persistence-tuning.adoc| 255 ++
 .../_docs/perf-and-troubleshooting/sql-tuning.adoc | 511 +
 .../thread-pools-tuning.adoc   | 103 +
 .../perf-and-troubleshooting/troubleshooting.adoc  | 150 ++
 docs/_docs/thread-pools.adoc   | 136 --
 13 files changed, 1604 insertions(+), 138 deletions(-)

diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml
index e6db8e7..d8b1279 100644
--- a/docs/_data/toc.yaml
+++ b/docs/_data/toc.yaml
@@ -518,7 +518,21 @@
   url: sql-reference/system-functions
 - title: Data Types
   url: sql-reference/data-types
-- title: Thread Pools
-  url: thread-pools
 - title: Resources Injection
   url: resources-injection
+- title: Performance and Troubleshooting
+  items:
+- title: General Performance Tips
+  url: /perf-and-troubleshooting/general-perf-tips
+- title: Memory and JVM Tuning
+  url: /perf-and-troubleshooting/memory-tuning
+- title: Persistence Tuning
+  url: /perf-and-troubleshooting/persistence-tuning
+- title: SQL Tuning
+  url: /perf-and-troubleshooting/sql-tuning
+- title: Thread Pools Tuning
+  url: /perf-and-troubleshooting/thread-pools-tuning
+- title: Troubleshooting and Debugging
+  url: /perf-and-troubleshooting/troubleshooting
+- title: Handling Exceptions
+  url: /perf-and-troubleshooting/handling-exceptions
diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
new file mode 100644
index 000..69a9e24
--- /dev/null
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
@@ -0,0 +1,53 @@
+package org.apache.ignite.snippets;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.ExecutorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteRunnable;
+import org.apache.ignite.resources.IgniteInstanceResource;
+
+public class CustomThreadPool {
+
+void customPool() {
+
+// tag::pool-config[]
+IgniteConfiguration cfg = new IgniteConfiguration();
+
+cfg.setExecutorConfiguration(new 
ExecutorConfiguration("myPool").setSize(16));
+// end::pool-config[]
+
+Ignite ignite = Ignition.start(cfg);
+
+ignite.compute().run(new OuterRunnable());
+
+}
+
+// tag::inner-runnable[]
+public class InnerRunnable implements IgniteRunnable {
+@Override
+public void run() {
+System.out.println("Hello from inner runnable!");
+}
+}
+// end::inner-runnable[]
+
+// tag::outer-runnable[]
+public class OuterRunnable implements IgniteRunnable {
+@IgniteInstanceResource
+private Ignite ignite;
+
+@Override
+public void run() {
+// Synchronously execute InnerRunnable in a custom executor.
+ignite.compute().withExecutor("myPool").run(new InnerRunnable());
+System.out.println("outer runnable is executed");
+}
+}
+// end::outer-runnable[]
+
+public static void main(String[] args) {
+CustomThreadPool ctp = new CustomThreadPool();
+ctp.customPool();
+}
+}
diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
new file mode 100644
index 000..74134cd
--- /dev/null
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
@@ -0,0 +1,39 @@
+package org.apache.ignite.snippets;
+
+import java.util.Collections;
+
+import org.apache.ignite.Ignite;
+import 

[ignite] branch IGNITE-7595 updated: Donated the Performance and Troubleshooting Guide from the GridGain to Ignite docs

2020-10-02 Thread dmagda
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 17c2e1b  Donated the Performance and Troubleshooting Guide from the 
GridGain to Ignite docs
17c2e1b is described below

commit 17c2e1bdfca0b327aac1a2d0adf973ea17505ac8
Author: Denis Magda 
AuthorDate: Thu Oct 1 23:33:48 2020 -0700

Donated the Performance and Troubleshooting Guide from the GridGain to 
Ignite docs
---
 docs/_data/toc.yaml|  18 +-
 .../apache/ignite/snippets/CustomThreadPool.java   |  53 +++
 .../org/apache/ignite/snippets/FailureHandler.java |  39 ++
 docs/_docs/code-snippets/xml/thread-pool.xml   |  32 ++
 .../general-perf-tips.adoc |  35 ++
 .../handling-exceptions.adoc   | 234 ++
 docs/_docs/perf-and-troubleshooting/index.adoc |   5 +
 .../perf-and-troubleshooting/memory-tuning.adoc| 171 +++
 .../persistence-tuning.adoc| 255 ++
 .../_docs/perf-and-troubleshooting/sql-tuning.adoc | 511 +
 .../thread-pools-tuning.adoc   | 103 +
 .../perf-and-troubleshooting/troubleshooting.adoc  | 150 ++
 docs/_docs/thread-pools.adoc   | 136 --
 13 files changed, 1604 insertions(+), 138 deletions(-)

diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml
index e6db8e7..d8b1279 100644
--- a/docs/_data/toc.yaml
+++ b/docs/_data/toc.yaml
@@ -518,7 +518,21 @@
   url: sql-reference/system-functions
 - title: Data Types
   url: sql-reference/data-types
-- title: Thread Pools
-  url: thread-pools
 - title: Resources Injection
   url: resources-injection
+- title: Performance and Troubleshooting
+  items:
+- title: General Performance Tips
+  url: /perf-and-troubleshooting/general-perf-tips
+- title: Memory and JVM Tuning
+  url: /perf-and-troubleshooting/memory-tuning
+- title: Persistence Tuning
+  url: /perf-and-troubleshooting/persistence-tuning
+- title: SQL Tuning
+  url: /perf-and-troubleshooting/sql-tuning
+- title: Thread Pools Tuning
+  url: /perf-and-troubleshooting/thread-pools-tuning
+- title: Troubleshooting and Debugging
+  url: /perf-and-troubleshooting/troubleshooting
+- title: Handling Exceptions
+  url: /perf-and-troubleshooting/handling-exceptions
diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
new file mode 100644
index 000..69a9e24
--- /dev/null
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/CustomThreadPool.java
@@ -0,0 +1,53 @@
+package org.apache.ignite.snippets;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.ExecutorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteRunnable;
+import org.apache.ignite.resources.IgniteInstanceResource;
+
+public class CustomThreadPool {
+
+void customPool() {
+
+// tag::pool-config[]
+IgniteConfiguration cfg = new IgniteConfiguration();
+
+cfg.setExecutorConfiguration(new 
ExecutorConfiguration("myPool").setSize(16));
+// end::pool-config[]
+
+Ignite ignite = Ignition.start(cfg);
+
+ignite.compute().run(new OuterRunnable());
+
+}
+
+// tag::inner-runnable[]
+public class InnerRunnable implements IgniteRunnable {
+@Override
+public void run() {
+System.out.println("Hello from inner runnable!");
+}
+}
+// end::inner-runnable[]
+
+// tag::outer-runnable[]
+public class OuterRunnable implements IgniteRunnable {
+@IgniteInstanceResource
+private Ignite ignite;
+
+@Override
+public void run() {
+// Synchronously execute InnerRunnable in a custom executor.
+ignite.compute().withExecutor("myPool").run(new InnerRunnable());
+System.out.println("outer runnable is executed");
+}
+}
+// end::outer-runnable[]
+
+public static void main(String[] args) {
+CustomThreadPool ctp = new CustomThreadPool();
+ctp.customPool();
+}
+}
diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
new file mode 100644
index 000..74134cd
--- /dev/null
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/FailureHandler.java
@@ -0,0 +1,39 @@
+package org.apache.ignite.snippets;
+
+import java.util.Collections;
+
+import org.apache.ignite.Ignite;
+import