ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [8/8] ignite git commit: Merge branch 'master' into ignite-1786
Date Tue, 29 Mar 2016 07:14:19 GMT
Merge branch 'master' into ignite-1786


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

Branch: refs/heads/ignite-1786
Commit: 6967cc0b75ad40b38ce20e93f43762467c7a6610
Parents: caf015a 732abda
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Mar 29 10:14:05 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Mar 29 10:14:05 2016 +0300

----------------------------------------------------------------------
 .../rest/RestBinaryProtocolSelfTest.java        |   4 +-
 .../rest/RestMemcacheProtocolSelfTest.java      |   4 +-
 .../java/org/apache/ignite/IgniteCache.java     |  20 +-
 .../discovery/GridDiscoveryManager.java         |   2 +-
 .../cache/CacheClusterMetricsMXBeanImpl.java    | 410 ++++++++++++++
 .../cache/CacheLocalMetricsMXBeanImpl.java      | 410 ++++++++++++++
 .../cache/CacheMetricsMXBeanImpl.java           | 410 --------------
 .../processors/cache/GridCacheAdapter.java      |  43 +-
 .../processors/cache/GridCacheMapEntry.java     |   2 +-
 .../GridCachePartitionExchangeManager.java      |   2 +-
 .../processors/cache/GridCacheProcessor.java    |  15 +-
 .../processors/cache/GridCacheProxyImpl.java    |  45 +-
 .../processors/cache/IgniteCacheProxy.java      |  39 +-
 .../processors/cache/IgniteInternalCache.java   |  31 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  17 +-
 .../platform/cache/PlatformCache.java           |   2 +-
 .../handlers/cache/GridCacheCommandHandler.java |   2 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   2 +-
 .../visor/cache/VisorCacheResetMetricsTask.java |   2 +-
 .../CacheMetricsForClusterGroupSelfTest.java    |   2 +-
 .../cache/CacheSwapUnswapGetTest.java           |   4 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java | 124 ++---
 .../GridCacheOffHeapValuesEvictionSelfTest.java |  18 +-
 ...cheTransactionalAbstractMetricsSelfTest.java |   4 +-
 .../dht/GridCacheColocatedDebugTest.java        |   2 +-
 ...ePartitionedNearDisabledMetricsSelfTest.java |   2 +-
 ...AtomicPartitionedTckMetricsSelfTestImpl.java |  92 ++--
 .../near/GridCacheNearMetricsSelfTest.java      | 152 +++---
 ...idCachePartitionedHitsAndMissesSelfTest.java |   2 +-
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java | 380 ++++++-------
 ...dCacheAtomicLocalTckMetricsSelfTestImpl.java |  92 ++--
 .../CacheContinuousQueryFactoryFilterTest.java  |   6 +-
 ...acheContinuousQueryRandomOperationsTest.java | 530 +++++++++++++++++--
 ...inuousQueryRandomOperationsTwoNodesTest.java |  28 +
 .../multijvm/IgniteCacheProcessProxy.java       |   8 +
 .../IgniteBinaryCacheQueryTestSuite4.java       |  39 ++
 .../IgniteCacheQuerySelfTestSuite3.java         |  24 +-
 .../IgniteCacheQuerySelfTestSuite4.java         |  49 ++
 .../impl/binary/binary_type_updater_impl.cpp    |   2 +
 modules/platforms/dotnet/Apache.Ignite.sln      |   5 +-
 .../Compute/ClosureExample.cs                   |   4 +-
 .../Compute/TaskExample.cs                      |   4 +-
 .../Datagrid/ContinuousQueryExample.cs          |  11 +-
 .../Datagrid/DataStreamerExample.cs             |   8 +-
 .../Datagrid/PutGetExample.cs                   |   6 +-
 .../Datagrid/QueryExample.cs                    |  20 +-
 .../Datagrid/StoreExample.cs                    |  16 +-
 .../Datagrid/TransactionExample.cs              |  14 +-
 .../Events/EventsExample.cs                     |   6 +-
 .../Messaging/MessagingExample.cs               |   4 +-
 .../Misc/LifecycleExample.cs                    |   2 +-
 .../Services/ServicesExample.cs                 |   6 +-
 .../Apache.Ignite.ExamplesDll.csproj            |   1 +
 .../Apache.Ignite.ExamplesDll/Binary/Account.cs |   1 -
 .../Apache.Ignite.ExamplesDll/Binary/Address.cs |   5 +-
 .../Binary/Employee.cs                          |   4 +
 .../Binary/EmployeeKey.cs                       |   4 +-
 .../Binary/Organization.cs                      |  11 +-
 .../Binary/OrganizationType.cs                  |   3 -
 .../Datagrid/EmployeeStoreFactory.cs            |  38 ++
 .../examples/Config/example-cache-query.xml     | 118 -----
 .../examples/Config/example-cache-store.xml     |  59 ---
 .../dotnet/examples/Config/example-cache.xml    |  87 ---
 .../dotnet/examples/Config/example-compute.xml  |  70 ---
 .../dotnet/examples/Config/examples-config.xml  |  98 ++++
 65 files changed, 2275 insertions(+), 1352 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6967cc0b/modules/platforms/cpp/binary/src/impl/binary/binary_type_updater_impl.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/binary/src/impl/binary/binary_type_updater_impl.cpp
index 6c3bf7f,0000000..aedd73b
mode 100644,000000..100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_type_updater_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_type_updater_impl.cpp
@@@ -1,96 -1,0 +1,98 @@@
 +/*
 + * 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.
 + */
 +
 +#include "ignite/impl/binary/binary_type_updater_impl.h"
 +#include "ignite/impl/interop/interop_output_stream.h"
 +#include "ignite/impl/binary/binary_writer_impl.h"
 +#include "ignite/binary/binary_raw_writer.h"
 +
 +using namespace ignite::common::concurrent;
 +using namespace ignite::common::java;
 +using namespace ignite::impl;
 +using namespace ignite::impl::interop;
 +using namespace ignite::binary;
 +
 +namespace ignite
 +{    
 +    namespace impl
 +    {
 +        namespace binary
 +        {
 +            /** Operation: metadata update. */
 +            const int32_t OP_METADATA = -1;
 +
 +            BinaryTypeUpdaterImpl::BinaryTypeUpdaterImpl(SharedPointer<IgniteEnvironment>
env,
 +                jobject javaRef) :  env(env), javaRef(javaRef)
 +            {
 +                // No-op.
 +            }
 +
 +            BinaryTypeUpdaterImpl::~BinaryTypeUpdaterImpl()
 +            {
 +                // No-op.
 +            }
 +
 +            bool BinaryTypeUpdaterImpl::Update(Snap* snap, IgniteError* err)
 +            {
 +                JniErrorInfo jniErr;
 +
 +                SharedPointer<InteropMemory> mem = env.Get()->AllocateMemory();
 +
 +                InteropOutputStream out(mem.Get());
 +                BinaryWriterImpl writer(&out, NULL);
 +                BinaryRawWriter rawWriter(&writer);
 +
 +                // We always pass only one meta at a time in current implementation for
simplicity.
 +                rawWriter.WriteInt32(1);
 +
 +                rawWriter.WriteInt32(snap->GetTypeId());
 +                rawWriter.WriteString(snap->GetTypeName());
 +                rawWriter.WriteString(NULL); // Affinity key is not supported for now.
 +                
 +                if (snap->HasFields())
 +                {
 +                    std::map<std::string, int32_t>* fields = snap->GetFields();
 +
 +                    rawWriter.WriteInt32(static_cast<int32_t>(fields->size()));
 +
 +                    for (std::map<std::string, int32_t>::iterator it = fields->begin();
it != fields->end(); ++it)
 +                    {
 +                        rawWriter.WriteString(it->first);
 +                        rawWriter.WriteInt32(it->second);
 +                    }
 +                }
 +                else
 +                    rawWriter.WriteInt32(0);
 +
 +                rawWriter.WriteBool(false); // Enums are not supported for now.
 +
++                rawWriter.WriteInt32(0); // Schema size. Compact schema footer is not yet
supported.
++
 +                out.Synchronize();
 +
 +                long long res = env.Get()->Context()->TargetInStreamOutLong(javaRef,
OP_METADATA, mem.Get()->PointerLong(), &jniErr);
 +
 +                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 +
 +                if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
 +                    return res == 1;
 +                else
 +                    return false;
 +            }
 +        }
 +    }
 +}


Mime
View raw message