[10/50] [abbrv] ignite git commit: IGNITE-3673 .NET: Add examples for distributed joins.

2016-11-17 Thread vozerov
IGNITE-3673 .NET: Add examples for distributed joins.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/861c1736
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/861c1736
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/861c1736

Branch: refs/heads/ignite-2693
Commit: 861c1736facdf76c71e93ddada0d8e15b5b2950c
Parents: 390c8d5
Author: Pavel Tupitsyn 
Authored: Thu Aug 11 17:32:13 2016 +0300
Committer: Pavel Tupitsyn 
Committed: Wed Nov 2 11:18:02 2016 +0300

--
 .../Datagrid/LinqExample.cs | 195 +--
 .../Datagrid/QueryExample.cs| 174 -
 .../Apache.Ignite.ExamplesDll.csproj|   1 -
 .../Binary/Employee.cs  |  10 +-
 .../Binary/EmployeeKey.cs   |  88 -
 5 files changed, 271 insertions(+), 197 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/861c1736/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
--
diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
index 848d8f5..86739b4 100644
--- 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
+++ 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
@@ -18,10 +18,10 @@
 namespace Apache.Ignite.Examples.Datagrid
 {
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using Apache.Ignite.Core;
 using Apache.Ignite.Core.Cache;
+using Apache.Ignite.Core.Cache.Affinity;
 using Apache.Ignite.Core.Cache.Configuration;
 using Apache.Ignite.Core.Cache.Query;
 using Apache.Ignite.ExamplesDll.Binary;
@@ -49,6 +49,9 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Employee cache name.
 private const string EmployeeCacheName = "dotnet_cache_query_employee";
 
+/// Colocated employee cache name.
+private const string EmployeeCacheNameColocated = 
"dotnet_cache_query_employee_colocated";
+
 [STAThread]
 public static void Main()
 {
@@ -57,26 +60,18 @@ namespace Apache.Ignite.Examples.Datagrid
 Console.WriteLine();
 Console.WriteLine(">>> Cache LINQ example started.");
 
-var employeeCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = EmployeeCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(EmployeeKey), typeof(Employee))
-}
-});
-
-var organizationCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = OrganizationCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(int), typeof(Organization))
-}
-});
+var employeeCache = ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheName, 
typeof(Employee)));
+
+var employeeCacheColocated = 
ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheNameColocated, 
typeof(Employee)));
+
+var organizationCache = ignite.GetOrCreateCache(
+new CacheConfiguration(OrganizationCacheName, new 
QueryEntity(typeof(int), typeof(Organization;
 
 // Populate cache with sample data entries.
 PopulateCache(employeeCache);
+PopulateCache(employeeCacheColocated);
 PopulateCache(organizationCache);
 
 // Run SQL query example.
@@ -86,7 +81,10 @@ namespace Apache.Ignite.Examples.Datagrid
 CompiledQueryExample(employeeCache);
 
 // Run SQL query with join example.
-JoinQueryExample(employeeCache, organizationCache);
+JoinQueryExample(employeeCacheColocated, organizationCache);
+
+// Run SQL query with distributed join example.
+DistributedJoinQueryExample(employeeCache, organizationCache);
 
 // Run SQL fields query example.
 FieldsQueryExample(employeeCache);
@@ -103,17 +101,17 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Queries employees that have provided ZIP code in address.
 /// 
 /// Cache.
-private static void QueryExample(ICache cache)
+private static void QueryExample(ICache cache)
 {
 const int zip = 94109;
 
-  

[18/33] ignite git commit: IGNITE-3673 .NET: Add examples for distributed joins.

2016-11-14 Thread ptupitsyn
IGNITE-3673 .NET: Add examples for distributed joins.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/861c1736
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/861c1736
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/861c1736

Branch: refs/heads/master
Commit: 861c1736facdf76c71e93ddada0d8e15b5b2950c
Parents: 390c8d5
Author: Pavel Tupitsyn 
Authored: Thu Aug 11 17:32:13 2016 +0300
Committer: Pavel Tupitsyn 
Committed: Wed Nov 2 11:18:02 2016 +0300

--
 .../Datagrid/LinqExample.cs | 195 +--
 .../Datagrid/QueryExample.cs| 174 -
 .../Apache.Ignite.ExamplesDll.csproj|   1 -
 .../Binary/Employee.cs  |  10 +-
 .../Binary/EmployeeKey.cs   |  88 -
 5 files changed, 271 insertions(+), 197 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/861c1736/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
--
diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
index 848d8f5..86739b4 100644
--- 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
+++ 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
@@ -18,10 +18,10 @@
 namespace Apache.Ignite.Examples.Datagrid
 {
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using Apache.Ignite.Core;
 using Apache.Ignite.Core.Cache;
+using Apache.Ignite.Core.Cache.Affinity;
 using Apache.Ignite.Core.Cache.Configuration;
 using Apache.Ignite.Core.Cache.Query;
 using Apache.Ignite.ExamplesDll.Binary;
@@ -49,6 +49,9 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Employee cache name.
 private const string EmployeeCacheName = "dotnet_cache_query_employee";
 
+/// Colocated employee cache name.
+private const string EmployeeCacheNameColocated = 
"dotnet_cache_query_employee_colocated";
+
 [STAThread]
 public static void Main()
 {
@@ -57,26 +60,18 @@ namespace Apache.Ignite.Examples.Datagrid
 Console.WriteLine();
 Console.WriteLine(">>> Cache LINQ example started.");
 
-var employeeCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = EmployeeCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(EmployeeKey), typeof(Employee))
-}
-});
-
-var organizationCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = OrganizationCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(int), typeof(Organization))
-}
-});
+var employeeCache = ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheName, 
typeof(Employee)));
+
+var employeeCacheColocated = 
ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheNameColocated, 
typeof(Employee)));
+
+var organizationCache = ignite.GetOrCreateCache(
+new CacheConfiguration(OrganizationCacheName, new 
QueryEntity(typeof(int), typeof(Organization;
 
 // Populate cache with sample data entries.
 PopulateCache(employeeCache);
+PopulateCache(employeeCacheColocated);
 PopulateCache(organizationCache);
 
 // Run SQL query example.
@@ -86,7 +81,10 @@ namespace Apache.Ignite.Examples.Datagrid
 CompiledQueryExample(employeeCache);
 
 // Run SQL query with join example.
-JoinQueryExample(employeeCache, organizationCache);
+JoinQueryExample(employeeCacheColocated, organizationCache);
+
+// Run SQL query with distributed join example.
+DistributedJoinQueryExample(employeeCache, organizationCache);
 
 // Run SQL fields query example.
 FieldsQueryExample(employeeCache);
@@ -103,17 +101,17 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Queries employees that have provided ZIP code in address.
 /// 
 /// Cache.
-private static void QueryExample(ICache cache)
+private static void QueryExample(ICache cache)
 {
 const int zip = 94109;
 
-IQu

[33/53] [abbrv] ignite git commit: IGNITE-3673 .NET: Add examples for distributed joins.

2016-08-19 Thread sboikov
IGNITE-3673 .NET: Add examples for distributed joins.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b0450edc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b0450edc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b0450edc

Branch: refs/heads/ignite-3299
Commit: b0450edc448cd0a697cb57c0a8b41ae6cfffa1b1
Parents: ef09db5
Author: Pavel Tupitsyn 
Authored: Thu Aug 11 17:32:13 2016 +0300
Committer: Pavel Tupitsyn 
Committed: Thu Aug 11 17:32:13 2016 +0300

--
 .../Datagrid/LinqExample.cs | 195 +--
 .../Datagrid/QueryExample.cs| 174 -
 .../Apache.Ignite.ExamplesDll.csproj|   1 -
 .../Binary/Employee.cs  |  10 +-
 .../Binary/EmployeeKey.cs   |  88 -
 5 files changed, 271 insertions(+), 197 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b0450edc/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
--
diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
index 848d8f5..86739b4 100644
--- 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
+++ 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
@@ -18,10 +18,10 @@
 namespace Apache.Ignite.Examples.Datagrid
 {
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using Apache.Ignite.Core;
 using Apache.Ignite.Core.Cache;
+using Apache.Ignite.Core.Cache.Affinity;
 using Apache.Ignite.Core.Cache.Configuration;
 using Apache.Ignite.Core.Cache.Query;
 using Apache.Ignite.ExamplesDll.Binary;
@@ -49,6 +49,9 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Employee cache name.
 private const string EmployeeCacheName = "dotnet_cache_query_employee";
 
+/// Colocated employee cache name.
+private const string EmployeeCacheNameColocated = 
"dotnet_cache_query_employee_colocated";
+
 [STAThread]
 public static void Main()
 {
@@ -57,26 +60,18 @@ namespace Apache.Ignite.Examples.Datagrid
 Console.WriteLine();
 Console.WriteLine(">>> Cache LINQ example started.");
 
-var employeeCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = EmployeeCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(EmployeeKey), typeof(Employee))
-}
-});
-
-var organizationCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = OrganizationCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(int), typeof(Organization))
-}
-});
+var employeeCache = ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheName, 
typeof(Employee)));
+
+var employeeCacheColocated = 
ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheNameColocated, 
typeof(Employee)));
+
+var organizationCache = ignite.GetOrCreateCache(
+new CacheConfiguration(OrganizationCacheName, new 
QueryEntity(typeof(int), typeof(Organization;
 
 // Populate cache with sample data entries.
 PopulateCache(employeeCache);
+PopulateCache(employeeCacheColocated);
 PopulateCache(organizationCache);
 
 // Run SQL query example.
@@ -86,7 +81,10 @@ namespace Apache.Ignite.Examples.Datagrid
 CompiledQueryExample(employeeCache);
 
 // Run SQL query with join example.
-JoinQueryExample(employeeCache, organizationCache);
+JoinQueryExample(employeeCacheColocated, organizationCache);
+
+// Run SQL query with distributed join example.
+DistributedJoinQueryExample(employeeCache, organizationCache);
 
 // Run SQL fields query example.
 FieldsQueryExample(employeeCache);
@@ -103,17 +101,17 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Queries employees that have provided ZIP code in address.
 /// 
 /// Cache.
-private static void QueryExample(ICache cache)
+private static void QueryExample(ICache cache)
 {
 const int zip = 94109;
 
- 

ignite git commit: IGNITE-3673 .NET: Add examples for distributed joins.

2016-08-11 Thread ptupitsyn
Repository: ignite
Updated Branches:
  refs/heads/master ef09db5fe -> b0450edc4


IGNITE-3673 .NET: Add examples for distributed joins.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b0450edc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b0450edc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b0450edc

Branch: refs/heads/master
Commit: b0450edc448cd0a697cb57c0a8b41ae6cfffa1b1
Parents: ef09db5
Author: Pavel Tupitsyn 
Authored: Thu Aug 11 17:32:13 2016 +0300
Committer: Pavel Tupitsyn 
Committed: Thu Aug 11 17:32:13 2016 +0300

--
 .../Datagrid/LinqExample.cs | 195 +--
 .../Datagrid/QueryExample.cs| 174 -
 .../Apache.Ignite.ExamplesDll.csproj|   1 -
 .../Binary/Employee.cs  |  10 +-
 .../Binary/EmployeeKey.cs   |  88 -
 5 files changed, 271 insertions(+), 197 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b0450edc/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
--
diff --git 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
index 848d8f5..86739b4 100644
--- 
a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
+++ 
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
@@ -18,10 +18,10 @@
 namespace Apache.Ignite.Examples.Datagrid
 {
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using Apache.Ignite.Core;
 using Apache.Ignite.Core.Cache;
+using Apache.Ignite.Core.Cache.Affinity;
 using Apache.Ignite.Core.Cache.Configuration;
 using Apache.Ignite.Core.Cache.Query;
 using Apache.Ignite.ExamplesDll.Binary;
@@ -49,6 +49,9 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Employee cache name.
 private const string EmployeeCacheName = "dotnet_cache_query_employee";
 
+/// Colocated employee cache name.
+private const string EmployeeCacheNameColocated = 
"dotnet_cache_query_employee_colocated";
+
 [STAThread]
 public static void Main()
 {
@@ -57,26 +60,18 @@ namespace Apache.Ignite.Examples.Datagrid
 Console.WriteLine();
 Console.WriteLine(">>> Cache LINQ example started.");
 
-var employeeCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = EmployeeCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(EmployeeKey), typeof(Employee))
-}
-});
-
-var organizationCache = ignite.GetOrCreateCache(new CacheConfiguration
-{
-Name = OrganizationCacheName,
-QueryEntities = new[]
-{
-new QueryEntity(typeof(int), typeof(Organization))
-}
-});
+var employeeCache = ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheName, 
typeof(Employee)));
+
+var employeeCacheColocated = 
ignite.GetOrCreateCache(
+new CacheConfiguration(EmployeeCacheNameColocated, 
typeof(Employee)));
+
+var organizationCache = ignite.GetOrCreateCache(
+new CacheConfiguration(OrganizationCacheName, new 
QueryEntity(typeof(int), typeof(Organization;
 
 // Populate cache with sample data entries.
 PopulateCache(employeeCache);
+PopulateCache(employeeCacheColocated);
 PopulateCache(organizationCache);
 
 // Run SQL query example.
@@ -86,7 +81,10 @@ namespace Apache.Ignite.Examples.Datagrid
 CompiledQueryExample(employeeCache);
 
 // Run SQL query with join example.
-JoinQueryExample(employeeCache, organizationCache);
+JoinQueryExample(employeeCacheColocated, organizationCache);
+
+// Run SQL query with distributed join example.
+DistributedJoinQueryExample(employeeCache, organizationCache);
 
 // Run SQL fields query example.
 FieldsQueryExample(employeeCache);
@@ -103,17 +101,17 @@ namespace Apache.Ignite.Examples.Datagrid
 /// Queries employees that have provided ZIP code in address.
 /// 
 /// Cache.
-private static void QueryExample(ICache cache)
+private static void QueryExam