Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2501318BAC for ; Wed, 18 Nov 2015 10:39:17 +0000 (UTC) Received: (qmail 39859 invoked by uid 500); 18 Nov 2015 10:39:17 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 39785 invoked by uid 500); 18 Nov 2015 10:39:17 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 39504 invoked by uid 99); 18 Nov 2015 10:39:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 10:39:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A204DE176F; Wed, 18 Nov 2015 10:39:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: akuznetsov@apache.org To: commits@ignite.apache.org Date: Wed, 18 Nov 2015 10:39:26 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [11/17] ignite git commit: IGNITE-1881: Internal portable -> binary renamings. IGNITE-1881: Internal portable -> binary renamings. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d69362f8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d69362f8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d69362f8 Branch: refs/heads/ignite-1753-1282 Commit: d69362f86b3da5b29f42366938ba1c82403dcb2a Parents: fff85cb Author: Pavel Tupitsyn Authored: Tue Nov 17 16:58:53 2015 +0300 Committer: vozerov-gridgain Committed: Tue Nov 17 16:58:53 2015 +0300 ---------------------------------------------------------------------- .../dotnet/PlatformDotNetConfiguration.java | 2 +- ...CacheAtomicReferenceApiSelfAbstractTest.java | 10 +- .../platform/PlatformComputeBinarizable.java | 42 + .../PlatformComputeBinarizableArgTask.java | 119 + .../platform/PlatformComputeEchoTask.java | 12 +- .../PlatformComputeJavaBinarizable.java | 39 + .../platform/PlatformComputeJavaPortable.java | 39 - .../platform/PlatformComputePortable.java | 42 - .../PlatformComputePortableArgTask.java | 119 - .../Apache.Ignite.Benchmarks.csproj | 4 +- .../Apache.Ignite.Benchmarks/BenchmarkRunner.cs | 4 +- .../Binary/BinarizableReadBenchmark.cs | 125 + .../Binary/BinarizableWriteBenchmark.cs | 135 ++ .../Interop/PlatformBenchmarkBase.cs | 8 +- .../Portable/PortableReadBenchmark.cs | 126 - .../Portable/PortableWriteBenchmark.cs | 135 -- .../Apache.Ignite.Core.Tests.csproj | 27 +- .../Apache.Ignite.Core.Tests.nunit | 7 + .../Binary/BinaryBuilderSelfTest.cs | 1721 ++++++++++++++ .../Binary/BinarySelfTest.cs | 2157 ++++++++++++++++++ .../Binary/BinaryStructureTest.cs | 250 ++ .../BinaryConfigurationTest.cs | 173 ++ .../Cache/CacheAbstractTest.cs | 94 +- .../Cache/CacheAffinityTest.cs | 4 +- .../Cache/CacheDynamicStartTest.cs | 6 +- .../Cache/Query/CacheQueriesTest.cs | 80 +- .../Continuous/ContinuousQueryAbstractTest.cs | 210 +- .../ContinuousQueryNoBackupAbstractTest.cs | 4 +- .../Cache/Store/CacheStoreTest.cs | 68 +- .../Compute/AbstractTaskTest.cs | 8 +- .../Compute/BinarizableClosureTaskTest.cs | 185 ++ .../Compute/BinarizableTaskTest.cs | 269 +++ .../Compute/ComputeApiTest.cs | 62 +- .../Compute/FailoverTaskSelfTest.cs | 18 +- .../Forked/ForkedBinarizableClosureTaskTest.cs | 30 + .../Forked/ForkedPortableClosureTaskTest.cs | 30 - .../Compute/Forked/ForkedResourceTaskTest.cs | 3 - .../Forked/ForkedSerializableClosureTaskTest.cs | 3 - .../Compute/PortableClosureTaskTest.cs | 217 -- .../Compute/PortableTaskTest.cs | 269 --- .../Compute/TaskAdapterTest.cs | 14 +- .../Compute/TaskResultTest.cs | 46 +- .../Config/Compute/compute-grid1.xml | 6 +- .../Config/Compute/compute-standalone.xml | 14 +- .../Apache.Ignite.Core.Tests/Config/binary.xml | 56 + .../Config/cache-binarizables.xml | 78 + .../Config/cache-portables.xml | 78 - .../Config/cache-query-continuous.xml | 8 +- .../Config/marshaller-explicit.xml | 47 + .../Config/marshaller-portable.xml | 43 - .../Config/native-client-test-cache-store.xml | 2 +- .../Config/native-client-test-cache.xml | 51 - .../Config/portable.xml | 56 - .../Dataload/DataStreamerTest.cs | 42 +- .../Apache.Ignite.Core.Tests/EventsTest.cs | 16 +- .../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 28 +- .../Apache.Ignite.Core.Tests/FutureTest.cs | 10 +- .../Apache.Ignite.Core.Tests/MarshallerTest.cs | 10 +- .../Portable/PortableApiSelfTest.cs | 1777 --------------- .../Portable/PortableSelfTest.cs | 2157 ------------------ .../Portable/PortableStructureTest.cs | 250 -- .../PortableConfigurationTest.cs | 173 -- .../Query/BinarizablePerson.cs | 69 + .../Query/ImplicitBinarizablePerson.cs | 46 + .../Query/ImplicitPortablePerson.cs | 46 - .../Query/NoDefBinarizablePerson.cs | 35 + .../Query/NoDefPortablePerson.cs | 35 - .../Query/PortablePerson.cs | 69 - .../Services/ServiceProxyTest.cs | 130 +- .../Services/ServicesTest.cs | 88 +- .../TypeResolverTest.cs | 20 +- .../Impl/Unmanaged/UnmanagedCallbacks.cs | 20 +- .../examples/Config/example-cache-query.xml | 12 +- .../dotnet/examples/Config/example-cache.xml | 12 +- parent/pom.xml | 1 + 75 files changed, 6133 insertions(+), 6268 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java index ff5656b..f323085 100644 --- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.List; /** - * Mirror of .Net class Configuration.cs + * Mirror of .Net class IgniteConfiguration.cs */ public class PlatformDotNetConfiguration implements PlatformConfiguration { /** */ http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java index 416776a..278bcf9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java @@ -97,15 +97,13 @@ public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends Ignite String initVal = "qwerty"; - IgniteAtomicReference atomic = grid(0).atomicReference(atomicName, null, true); + IgniteAtomicReference atomic = grid(0).atomicReference(atomicName, initVal, true); - assertEquals(null, atomic.get()); + assertEquals(initVal, atomic.get()); - boolean res = atomic.compareAndSet(null, "x"); + atomic.compareAndSet("h", "j"); - assertEquals(null, atomic.get()); // ok - assertTrue(res); // fail - assertEquals("x", atomic.get()); // fail + assertEquals(initVal, atomic.get()); atomic.compareAndSet(initVal, null); http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizable.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizable.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizable.java new file mode 100644 index 0000000..55b3099 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizable.java @@ -0,0 +1,42 @@ +/* + * 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.platform; + +/** + * Binarizable object for task tests. + */ +public class PlatformComputeBinarizable { + /** Field. */ + public int field; + + /** + * Constructor. + */ + public PlatformComputeBinarizable() { + // No-op. + } + + /** + * Constructor, + * + * @param field Field. + */ + public PlatformComputeBinarizable(int field) { + this.field = field; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizableArgTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizableArgTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizableArgTask.java new file mode 100644 index 0000000..77c7e3a --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeBinarizableArgTask.java @@ -0,0 +1,119 @@ +/* + * 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.platform; + +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteException; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.compute.ComputeJob; +import org.apache.ignite.compute.ComputeJobAdapter; +import org.apache.ignite.compute.ComputeJobResult; +import org.apache.ignite.compute.ComputeTaskAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.binary.BinaryObject; +import org.apache.ignite.resources.IgniteInstanceResource; +import org.jetbrains.annotations.Nullable; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +/** + * Task working with binarizable argument. + */ +public class PlatformComputeBinarizableArgTask extends ComputeTaskAdapter { + /** {@inheritDoc} */ + @Nullable @Override public Map map(List subgrid, @Nullable Object arg) { + return Collections.singletonMap(new BinarizableArgJob(arg), F.first(subgrid)); + } + + /** {@inheritDoc} */ + @SuppressWarnings("ThrowableResultOfMethodCallIgnored") + @Nullable @Override public Integer reduce(List results) { + ComputeJobResult res = results.get(0); + + if (res.getException() != null) + throw res.getException(); + else + return results.get(0).getData(); + } + + /** + * Job. + */ + private static class BinarizableArgJob extends ComputeJobAdapter implements Externalizable { + /** */ + @IgniteInstanceResource + private Ignite ignite; + + /** Argument. */ + private Object arg; + + /** + * Constructor. + */ + public BinarizableArgJob() { + // No-op. + } + + /** + * Constructor. + * + * @param arg Argument. + */ + private BinarizableArgJob(Object arg) { + this.arg = arg; + } + + /** {@inheritDoc} */ + @Nullable @Override public Object execute() { + BinaryObject arg0 = ((BinaryObject)arg); + + BinaryType meta = ignite.binary().metadata(arg0.typeId()); + + if (meta == null) + throw new IgniteException("Metadata doesn't exist."); + + if (meta.fields() == null || !meta.fields().contains("Field")) + throw new IgniteException("Field metadata doesn't exist."); + + if (!F.eq("int", meta.fieldTypeName("Field"))) + throw new IgniteException("Invalid field type: " + meta.fieldTypeName("Field")); + + if (meta.affinityKeyFieldName() != null) + throw new IgniteException("Unexpected affinity key: " + meta.affinityKeyFieldName()); + + return arg0.field("field"); + } + + /** {@inheritDoc} */ + @Override public void writeExternal(ObjectOutput out) throws IOException { + out.writeObject(arg); + } + + /** {@inheritDoc} */ + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + arg = in.readObject(); + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java index f64ca7d..fe4e01c 100644 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java @@ -155,19 +155,19 @@ public class PlatformComputeEchoTask extends ComputeTaskAdapter return Collections.singletonMap(1, 1); case TYPE_PORTABLE: - return new PlatformComputePortable(1); + return new PlatformComputeBinarizable(1); case TYPE_PORTABLE_JAVA: - return new PlatformComputeJavaPortable(1); + return new PlatformComputeJavaBinarizable(1); case TYPE_OBJ_ARRAY: return new String[] { "foo", "bar", "baz" }; case TYPE_PORTABLE_ARRAY: - return new PlatformComputePortable[] { - new PlatformComputePortable(1), - new PlatformComputePortable(2), - new PlatformComputePortable(3) + return new PlatformComputeBinarizable[] { + new PlatformComputeBinarizable(1), + new PlatformComputeBinarizable(2), + new PlatformComputeBinarizable(3) }; case TYPE_ENUM: http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaBinarizable.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaBinarizable.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaBinarizable.java new file mode 100644 index 0000000..ade09db --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaBinarizable.java @@ -0,0 +1,39 @@ +/* + * 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.platform; + +/** + * Binarizable object defined only in Java. + */ +public class PlatformComputeJavaBinarizable extends PlatformComputeBinarizable { + /** + * Constructor. + */ + public PlatformComputeJavaBinarizable() { + // No-op. + } + + /** + * Constructor. + * + * @param field Field. + */ + public PlatformComputeJavaBinarizable(int field) { + super(field); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java deleted file mode 100644 index 7a940c4..0000000 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.platform; - -/** - * Portable object defined only in Java. - */ -public class PlatformComputeJavaPortable extends PlatformComputePortable { - /** - * Constructor. - */ - public PlatformComputeJavaPortable() { - // No-op. - } - - /** - * Constructor. - * - * @param field Field. - */ - public PlatformComputeJavaPortable(int field) { - super(field); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java deleted file mode 100644 index f31f093..0000000 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.platform; - -/** - * Portable object for task tests. - */ -public class PlatformComputePortable { - /** Field. */ - public int field; - - /** - * Constructor. - */ - public PlatformComputePortable() { - // No-op. - } - - /** - * Constructor, - * - * @param field Field. - */ - public PlatformComputePortable(int field) { - this.field = field; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java deleted file mode 100644 index 1e3c499..0000000 --- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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.platform; - -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteException; -import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.compute.ComputeJob; -import org.apache.ignite.compute.ComputeJobAdapter; -import org.apache.ignite.compute.ComputeJobResult; -import org.apache.ignite.compute.ComputeTaskAdapter; -import org.apache.ignite.internal.util.typedef.F; -import org.apache.ignite.binary.BinaryType; -import org.apache.ignite.binary.BinaryObject; -import org.apache.ignite.resources.IgniteInstanceResource; -import org.jetbrains.annotations.Nullable; - -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Task working with portable argument. - */ -public class PlatformComputePortableArgTask extends ComputeTaskAdapter { - /** {@inheritDoc} */ - @Nullable @Override public Map map(List subgrid, @Nullable Object arg) { - return Collections.singletonMap(new PortableArgJob(arg), F.first(subgrid)); - } - - /** {@inheritDoc} */ - @SuppressWarnings("ThrowableResultOfMethodCallIgnored") - @Nullable @Override public Integer reduce(List results) { - ComputeJobResult res = results.get(0); - - if (res.getException() != null) - throw res.getException(); - else - return results.get(0).getData(); - } - - /** - * Job. - */ - private static class PortableArgJob extends ComputeJobAdapter implements Externalizable { - /** */ - @IgniteInstanceResource - private Ignite ignite; - - /** Argument. */ - private Object arg; - - /** - * Constructor. - */ - public PortableArgJob() { - // No-op. - } - - /** - * Constructor. - * - * @param arg Argument. - */ - private PortableArgJob(Object arg) { - this.arg = arg; - } - - /** {@inheritDoc} */ - @Nullable @Override public Object execute() { - BinaryObject arg0 = ((BinaryObject)arg); - - BinaryType meta = ignite.binary().metadata(arg0.typeId()); - - if (meta == null) - throw new IgniteException("Metadata doesn't exist."); - - if (meta.fields() == null || !meta.fields().contains("Field")) - throw new IgniteException("Field metadata doesn't exist."); - - if (!F.eq("int", meta.fieldTypeName("Field"))) - throw new IgniteException("Invalid field type: " + meta.fieldTypeName("Field")); - - if (meta.affinityKeyFieldName() != null) - throw new IgniteException("Unexpected affinity key: " + meta.affinityKeyFieldName()); - - return arg0.field("field"); - } - - /** {@inheritDoc} */ - @Override public void writeExternal(ObjectOutput out) throws IOException { - out.writeObject(arg); - } - - /** {@inheritDoc} */ - @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { - arg = in.readObject(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj index 99737b8..14b6466 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj @@ -63,8 +63,8 @@ - - + + http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/BenchmarkRunner.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/BenchmarkRunner.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/BenchmarkRunner.cs index 2d0d348..5d8e78a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/BenchmarkRunner.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/BenchmarkRunner.cs @@ -20,7 +20,7 @@ namespace Apache.Ignite.Benchmarks using System; using System.Diagnostics; using System.Text; - using Apache.Ignite.Benchmarks.Portable; + using Apache.Ignite.Benchmarks.Binary; /// /// Benchmark runner. @@ -35,7 +35,7 @@ namespace Apache.Ignite.Benchmarks public static void Main(string[] args) { args = new[] { - typeof(PortableReadBenchmark).FullName, + typeof(BinarizableReadBenchmark).FullName, "-ConfigPath", @"modules\platforms\dotnet\Apache.Ignite.Benchmarks\Config\benchmark.xml", "-Threads", "1", "-Warmup", "0", http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableReadBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableReadBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableReadBenchmark.cs new file mode 100644 index 0000000..09e588e --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableReadBenchmark.cs @@ -0,0 +1,125 @@ +/* + * 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. + */ + +namespace Apache.Ignite.Benchmarks.Binary +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Apache.Ignite.Benchmarks.Model; + using Apache.Ignite.Core.Binary; + using Apache.Ignite.Core.Impl.Binary; + using Apache.Ignite.Core.Impl.Memory; + + /// + /// Binary read benchmark. + /// + internal class BinarizableReadBenchmark : BenchmarkBase + { + /** Marshaller. */ + private readonly Marshaller _marsh; + + /** Memory manager. */ + private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); + + /** Memory chunk. */ + private readonly IPlatformMemory _mem; + + /** Pre-allocated address. */ + private readonly Address _address = BenchmarkUtils.GetRandomAddress(); + + /** Pre-allocated model. */ + private readonly TestModel _model = new TestModel + { + Byte = 5, + Boolean = true, + BooleanArray = new[] {true, false, false, false, true, true}, + ByteArray = new byte[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, + Char = 'h', + CharArray = new[] {'b', 'n', 'm', 'q', 'w', 'e', 'r', 't', 'y'}, + Date = DateTime.Now, + DateArray = Enumerable.Range(1, 15).Select(x => (DateTime?) DateTime.Now.AddDays(x)).ToArray(), + Decimal = decimal.MinValue, + DecimalArray = new decimal?[] {1.1M, decimal.MinValue, decimal.MaxValue, decimal.MinusOne, decimal.One}, + Double = double.MaxValue/2, + DoubleArray = new[] {double.MaxValue, double.MinValue, double.Epsilon, double.NegativeInfinity}, + Float = 98, + FloatArray = new[] {float.MinValue, float.MaxValue, 10F, 36F}, + Guid = Guid.NewGuid(), + GuidArray = Enumerable.Range(1, 9).Select(x => (Guid?) Guid.NewGuid()).ToArray(), + Int = -90, + IntArray = new[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, + Long = long.MinValue, + LongArray = Enumerable.Range(1, 12).Select(x => (long) x).ToArray(), + Short = 67, + ShortArray = Enumerable.Range(100, 12).Select(x => (short) x).ToArray(), + String = "String value test 123", + StringArray = Enumerable.Range(1, 13).Select(x => Guid.NewGuid().ToString()).ToArray() + }; + + /// + /// Initializes a new instance of the class. + /// + public BinarizableReadBenchmark() + { + _marsh = new Marshaller(new BinaryConfiguration + { + TypeConfigurations = new List + { + new BinaryTypeConfiguration(typeof (Address)), + new BinaryTypeConfiguration(typeof (TestModel)) + } + }); + + _mem = _memMgr.Allocate(); + + var stream = _mem.GetStream(); + + //_marsh.StartMarshal(stream).Write(_model); + _marsh.StartMarshal(stream).Write(_address); + + stream.SynchronizeOutput(); + } + + /// + /// Populate descriptors. + /// + /// Descriptors. + protected override void GetDescriptors(ICollection descs) + { + descs.Add(BenchmarkOperationDescriptor.Create("ReadTestModel", ReadTestModel, 1)); + } + + /// + /// Write address. + /// + /// State. + private void ReadTestModel(BenchmarkState state) + { + //var model = _marsh.StartUnmarshal(_mem.GetStream()).ReadObject(); + + //if (model.Byte != _model.Byte) + // throw new InvalidOperationException(); + + var model = _marsh.StartUnmarshal(_mem.GetStream()).ReadObject
(); + + if (model.FlatNumber != _address.FlatNumber) + throw new InvalidOperationException(); + + } + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableWriteBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableWriteBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableWriteBenchmark.cs new file mode 100644 index 0000000..c4d375f --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Binary/BinarizableWriteBenchmark.cs @@ -0,0 +1,135 @@ +/* + * 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. + */ + +namespace Apache.Ignite.Benchmarks.Binary +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Apache.Ignite.Benchmarks.Model; + using Apache.Ignite.Core.Binary; + using Apache.Ignite.Core.Impl.Binary; + using Apache.Ignite.Core.Impl.Memory; + + /// + /// Binary write benchmark. + /// + internal class BinarizableWriteBenchmark : BenchmarkBase + { + /** Marshaller. */ + private readonly Marshaller _marsh; + + /** Memory manager. */ + private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); + + /** Pre-allocated address. */ + private readonly Address _address = BenchmarkUtils.GetRandomAddress(); + + /** Pre-allocated model. */ + private readonly TestModel _model = new TestModel + { + Byte = 5, + Boolean = true, + BooleanArray = new[] {true, false, false, false, true, true}, + ByteArray = new byte[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, + Char = 'h', + CharArray = new[] {'b', 'n', 'm', 'q', 'w', 'e', 'r', 't', 'y'}, + Date = DateTime.Now, + DateArray = Enumerable.Range(1, 15).Select(x => (DateTime?) DateTime.Now.AddDays(x)).ToArray(), + Decimal = decimal.MinValue, + DecimalArray = new decimal?[] {1.1M, decimal.MinValue, decimal.MaxValue, decimal.MinusOne, decimal.One}, + Double = double.MaxValue/2, + DoubleArray = new[] {double.MaxValue, double.MinValue, double.Epsilon, double.NegativeInfinity}, + Float = 98, + FloatArray = new[] {float.MinValue, float.MaxValue, 10F, 36F}, + Guid = Guid.NewGuid(), + GuidArray = Enumerable.Range(1, 9).Select(x => (Guid?) Guid.NewGuid()).ToArray(), + Int = -90, + IntArray = new[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, + Long = long.MinValue, + LongArray = Enumerable.Range(1, 12).Select(x => (long) x).ToArray(), + Short = 67, + ShortArray = Enumerable.Range(100, 12).Select(x => (short) x).ToArray(), + String = "String value test 123", + StringArray = Enumerable.Range(1, 13).Select(x => Guid.NewGuid().ToString()).ToArray() + }; + + /// + /// Initializes a new instance of the class. + /// + public BinarizableWriteBenchmark() + { + _marsh = new Marshaller(new BinaryConfiguration + { + TypeConfigurations = new List + { + new BinaryTypeConfiguration(typeof (Address)) + //new BinaryTypeConfiguration(typeof (TestModel)) + } + }); + } + + /// + /// Populate descriptors. + /// + /// Descriptors. + protected override void GetDescriptors(ICollection descs) + { + descs.Add(BenchmarkOperationDescriptor.Create("WriteAddress", WriteAddress, 1)); + //descs.Add(BenchmarkOperationDescriptor.Create("WriteTestModel", WriteTestModel, 1)); + } + + /// + /// Write address. + /// + /// State. + private void WriteAddress(BenchmarkState state) + { + var mem = _memMgr.Allocate(); + + try + { + var stream = mem.GetStream(); + + _marsh.StartMarshal(stream).Write(_address); + } + finally + { + mem.Release(); + } + } + /// + /// Write address. + /// + /// State. + private void WriteTestModel(BenchmarkState state) + { + var mem = _memMgr.Allocate(); + + try + { + var stream = mem.GetStream(); + + _marsh.StartMarshal(stream).Write(_model); + } + finally + { + mem.Release(); + } + } + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs index 67809d5..eeebed0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs @@ -58,7 +58,7 @@ namespace Apache.Ignite.Benchmarks.Interop var cfg = new IgniteConfiguration { - BinaryConfiguration = GetPortableConfiguration(), + BinaryConfiguration = GetBinaryConfiguration(), JvmOptions = new List { "-Xms2g", @@ -75,10 +75,10 @@ namespace Apache.Ignite.Benchmarks.Interop } /// - /// Get portable configuration. + /// Get binary configuration. /// - /// Portable configuration. - private static BinaryConfiguration GetPortableConfiguration() + /// Gets binary configuration. + private static BinaryConfiguration GetBinaryConfiguration() { return new BinaryConfiguration { http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs deleted file mode 100644 index ad9ae39..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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. - */ - -namespace Apache.Ignite.Benchmarks.Portable -{ - using System; - using System.Collections.Generic; - using System.Linq; - using Apache.Ignite.Benchmarks.Model; - using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Impl.Binary; - using Apache.Ignite.Core.Impl.Memory; - - /// - /// Portable read benchmark. - /// - internal class PortableReadBenchmark : BenchmarkBase - { - /** Marshaller. */ - private readonly Marshaller _marsh; - - /** Memory manager. */ - private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); - - /** Memory chunk. */ - private readonly IPlatformMemory _mem; - - /** Pre-allocated address. */ - private readonly Address _address = BenchmarkUtils.GetRandomAddress(); - - - /** Pre-allocated model. */ - private readonly TestModel _model = new TestModel - { - Byte = 5, - Boolean = true, - BooleanArray = new[] {true, false, false, false, true, true}, - ByteArray = new byte[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, - Char = 'h', - CharArray = new[] {'b', 'n', 'm', 'q', 'w', 'e', 'r', 't', 'y'}, - Date = DateTime.Now, - DateArray = Enumerable.Range(1, 15).Select(x => (DateTime?) DateTime.Now.AddDays(x)).ToArray(), - Decimal = decimal.MinValue, - DecimalArray = new decimal?[] {1.1M, decimal.MinValue, decimal.MaxValue, decimal.MinusOne, decimal.One}, - Double = double.MaxValue/2, - DoubleArray = new[] {double.MaxValue, double.MinValue, double.Epsilon, double.NegativeInfinity}, - Float = 98, - FloatArray = new[] {float.MinValue, float.MaxValue, 10F, 36F}, - Guid = Guid.NewGuid(), - GuidArray = Enumerable.Range(1, 9).Select(x => (Guid?) Guid.NewGuid()).ToArray(), - Int = -90, - IntArray = new[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, - Long = long.MinValue, - LongArray = Enumerable.Range(1, 12).Select(x => (long) x).ToArray(), - Short = 67, - ShortArray = Enumerable.Range(100, 12).Select(x => (short) x).ToArray(), - String = "String value test 123", - StringArray = Enumerable.Range(1, 13).Select(x => Guid.NewGuid().ToString()).ToArray() - }; - - /// - /// Initializes a new instance of the class. - /// - public PortableReadBenchmark() - { - _marsh = new Marshaller(new BinaryConfiguration - { - TypeConfigurations = new List - { - new BinaryTypeConfiguration(typeof (Address)), - new BinaryTypeConfiguration(typeof (TestModel)) - } - }); - - _mem = _memMgr.Allocate(); - - var stream = _mem.GetStream(); - - //_marsh.StartMarshal(stream).Write(_model); - _marsh.StartMarshal(stream).Write(_address); - - stream.SynchronizeOutput(); - } - - /// - /// Populate descriptors. - /// - /// Descriptors. - protected override void GetDescriptors(ICollection descs) - { - descs.Add(BenchmarkOperationDescriptor.Create("ReadTestModel", ReadTestModel, 1)); - } - - /// - /// Write address. - /// - /// State. - private void ReadTestModel(BenchmarkState state) - { - //var model = _marsh.StartUnmarshal(_mem.GetStream()).ReadObject(); - - //if (model.Byte != _model.Byte) - // throw new InvalidOperationException(); - - var model = _marsh.StartUnmarshal(_mem.GetStream()).ReadObject
(); - - if (model.FlatNumber != _address.FlatNumber) - throw new InvalidOperationException(); - - } - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs deleted file mode 100644 index a630161..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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. - */ - -namespace Apache.Ignite.Benchmarks.Portable -{ - using System; - using System.Collections.Generic; - using System.Linq; - using Apache.Ignite.Benchmarks.Model; - using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Impl.Binary; - using Apache.Ignite.Core.Impl.Memory; - - /// - /// Portable write benchmark. - /// - internal class PortableWriteBenchmark : BenchmarkBase - { - /** Marshaller. */ - private readonly Marshaller _marsh; - - /** Memory manager. */ - private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); - - /** Pre-allocated address. */ - private readonly Address _address = BenchmarkUtils.GetRandomAddress(); - - /** Pre-allocated model. */ - private readonly TestModel _model = new TestModel - { - Byte = 5, - Boolean = true, - BooleanArray = new[] {true, false, false, false, true, true}, - ByteArray = new byte[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, - Char = 'h', - CharArray = new[] {'b', 'n', 'm', 'q', 'w', 'e', 'r', 't', 'y'}, - Date = DateTime.Now, - DateArray = Enumerable.Range(1, 15).Select(x => (DateTime?) DateTime.Now.AddDays(x)).ToArray(), - Decimal = decimal.MinValue, - DecimalArray = new decimal?[] {1.1M, decimal.MinValue, decimal.MaxValue, decimal.MinusOne, decimal.One}, - Double = double.MaxValue/2, - DoubleArray = new[] {double.MaxValue, double.MinValue, double.Epsilon, double.NegativeInfinity}, - Float = 98, - FloatArray = new[] {float.MinValue, float.MaxValue, 10F, 36F}, - Guid = Guid.NewGuid(), - GuidArray = Enumerable.Range(1, 9).Select(x => (Guid?) Guid.NewGuid()).ToArray(), - Int = -90, - IntArray = new[] {128, 1, 2, 3, 5, 6, 8, 9, 14}, - Long = long.MinValue, - LongArray = Enumerable.Range(1, 12).Select(x => (long) x).ToArray(), - Short = 67, - ShortArray = Enumerable.Range(100, 12).Select(x => (short) x).ToArray(), - String = "String value test 123", - StringArray = Enumerable.Range(1, 13).Select(x => Guid.NewGuid().ToString()).ToArray() - }; - - /// - /// Initializes a new instance of the class. - /// - public PortableWriteBenchmark() - { - _marsh = new Marshaller(new BinaryConfiguration - { - TypeConfigurations = new List - { - new BinaryTypeConfiguration(typeof (Address)) - //new PortableTypeConfiguration(typeof (TestModel)) - } - }); - } - - /// - /// Populate descriptors. - /// - /// Descriptors. - protected override void GetDescriptors(ICollection descs) - { - descs.Add(BenchmarkOperationDescriptor.Create("WriteAddress", WriteAddress, 1)); - //descs.Add(BenchmarkOperationDescriptor.Create("WriteTestModel", WriteTestModel, 1)); - } - - /// - /// Write address. - /// - /// State. - private void WriteAddress(BenchmarkState state) - { - var mem = _memMgr.Allocate(); - - try - { - var stream = mem.GetStream(); - - _marsh.StartMarshal(stream).Write(_address); - } - finally - { - mem.Release(); - } - } - /// - /// Write address. - /// - /// State. - private void WriteTestModel(BenchmarkState state) - { - var mem = _memMgr.Allocate(); - - try - { - var stream = mem.GetStream(); - - _marsh.StartMarshal(stream).Write(_model); - } - finally - { - mem.Release(); - } - } - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj index 10b3dcd..a5bb7a8 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj @@ -84,7 +84,7 @@ - + @@ -94,8 +94,8 @@ - - + + @@ -116,21 +116,21 @@ - - + + - - + + - - - + + + @@ -161,7 +161,7 @@ - + Always @@ -207,7 +207,7 @@ Always - + Always @@ -222,7 +222,7 @@ Always - + Always @@ -241,6 +241,7 @@ + http://git-wip-us.apache.org/repos/asf/ignite/blob/d69362f8/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.nunit ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.nunit b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.nunit new file mode 100644 index 0000000..7aeb108 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.nunit @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file