ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [16/17] ignite git commit: Merge branch 'ignite-1282' into ignite-1770
Date Fri, 30 Oct 2015 12:13:09 GMT
Merge branch 'ignite-1282' into ignite-1770

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/portable/PortableWriterExImpl.java


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

Branch: refs/heads/ignite-1770
Commit: 43423549589195c106239940c14a66c4ebba203c
Parents: bf93227 667c2e6
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Oct 30 15:05:16 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Oct 30 15:05:16 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/cache/IgniteObject.java   |  60 ++++++
 .../internal/portable/PortableWriterExImpl.java |  65 +++---
 .../processors/cache/GridCacheIoManager.java    |  28 ++-
 .../events/PlatformEventFilterListenerImpl.java |  31 ++-
 .../apache/ignite/portable/PortableObject.java  |  12 +-
 .../cache/IgniteCacheCreateRestartSelfTest.java |   6 +-
 .../IgniteCountDownLatchAbstractSelfTest.java   |   4 +-
 ...PartitionedQueueCreateMultiNodeSelfTest.java |   5 +-
 ...omicMultiNodeP2PDisabledFullApiSelfTest.java |   7 +-
 ...omicNearEnabledMultiNodeFullApiSelfTest.java |   7 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |  32 ++-
 modules/platforms/cpp/README.txt                |  12 +-
 .../cpp/core-test/src/cache_query_test.cpp      | 214 ++++++++++++++++++-
 modules/platforms/cpp/core/include/Makefile.am  |   4 +
 .../cpp/core/include/ignite/cache/cache.h       |  33 +++
 .../cpp/core/include/ignite/cache/query/query.h |   1 +
 .../include/ignite/cache/query/query_cursor.h   |  11 +-
 .../ignite/cache/query/query_fields_cursor.h    | 153 +++++++++++++
 .../ignite/cache/query/query_fields_row.h       | 154 +++++++++++++
 .../core/include/ignite/cache/query/query_sql.h |  76 +++----
 .../ignite/cache/query/query_sql_fields.h       | 210 ++++++++++++++++++
 .../core/include/ignite/impl/cache/cache_impl.h |  10 +
 .../impl/cache/query/query_fields_row_impl.h    | 174 +++++++++++++++
 .../ignite/impl/cache/query/query_impl.h        |  10 +
 .../platforms/cpp/core/project/vs/core.vcxproj  |   4 +
 .../cpp/core/project/vs/core.vcxproj.filters    |  12 ++
 .../cpp/core/src/impl/cache/cache_impl.cpp      |   5 +
 .../core/src/impl/cache/query/query_impl.cpp    |  39 +++-
 modules/platforms/cpp/examples/README.txt       |   4 +-
 29 files changed, 1262 insertions(+), 121 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/43423549/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableWriterExImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/portable/PortableWriterExImpl.java
index 70ea56d,19795ee..d17ed0b
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableWriterExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableWriterExImpl.java
@@@ -196,9 -186,20 +196,18 @@@ public class PortableWriterExImpl imple
  
      /**
       * @param obj Object.
 -     * @param detached Detached or not.
       * @throws PortableException In case of error.
       */
 -    void marshal(Object obj, boolean detached) throws PortableException {
 -        marshal(obj, detached, true);
 +    void marshal(Object obj) throws PortableException {
++        marshal(obj, true);
+     }
+ 
+     /**
+      * @param obj Object.
 -     * @param detached Detached or not.
+      * @param enableReplace Object replacing enabled flag.
+      * @throws PortableException In case of error.
+      */
 -    void marshal(Object obj, boolean detached, boolean enableReplace) throws PortableException
{
++    void marshal(Object obj, boolean enableReplace) throws PortableException {
          assert obj != null;
  
          cls = obj.getClass();
@@@ -308,10 -304,10 +310,10 @@@
       * @param pos Position.
       */
      void position(int pos) {
 -        wCtx.out.position(pos);
 +        out.position(pos);
      }
  
-      /**
+     /**
       * @param bytes Number of bytes to reserve.
       * @return Offset.
       */
@@@ -1679,9 -1785,9 +1681,9 @@@
          return reserve(LEN_INT);
      }
  
-      /** {@inheritDoc} */
+     /** {@inheritDoc} */
      @Override public void writeInt(int pos, int val) throws PortableException {
 -        wCtx.out.writeInt(pos, val);
 +        out.writeInt(pos, val);
      }
  
      /**
@@@ -1704,63 -1805,28 +1706,63 @@@
  
          if (metaEnabled)
              metaHashSum = 31 * metaHashSum + (id + fieldType);
 +    }
 +
 +    /**
 +     * Write field ID.
 +     * @param fieldId Field ID.
 +     */
 +    public void writeFieldId(int fieldId) {
 +        int fieldOff = out.position() - start;
  
 -        doWriteInt(id);
 +        if (schema == null) {
 +            schema = SCHEMA.get();
 +
 +            if (schema == null) {
 +                schema = new SchemaHolder();
 +
 +                SCHEMA.set(schema);
 +            }
 +
 +            // Initialize offset when the first field is written.
 +            schemaId = FNV1_OFFSET_BASIS;
 +        }
 +
 +        // Advance schema hash.
 +        int schemaId0 = schemaId ^ (fieldId & 0xFF);
 +        schemaId0 = schemaId0 * FNV1_PRIME;
 +        schemaId0 = schemaId0 ^ ((fieldId >> 8) & 0xFF);
 +        schemaId0 = schemaId0 * FNV1_PRIME;
 +        schemaId0 = schemaId0 ^ ((fieldId >> 16) & 0xFF);
 +        schemaId0 = schemaId0 * FNV1_PRIME;
 +        schemaId0 = schemaId0 ^ ((fieldId >> 24) & 0xFF);
 +        schemaId0 = schemaId0 * FNV1_PRIME;
 +
 +        schemaId = schemaId0;
 +
 +        schema.push(fieldId, fieldOff);
 +
 +        fieldCnt++;
      }
  
-      /**
-       * Attempts to write the object as a handle.
-       *
-       * @param obj Object to write.
-       * @return {@code true} if the object has been written as a handle.
-       */
-      boolean tryWriteAsHandle(Object obj) {
-          int handle = handle(obj);
+     /**
+      * Attempts to write the object as a handle.
+      *
+      * @param obj Object to write.
+      * @return {@code true} if the object has been written as a handle.
+      */
+     boolean tryWriteAsHandle(Object obj) {
+         int handle = handle(obj);
  
-          if (handle >= 0) {
-              doWriteByte(GridPortableMarshaller.HANDLE);
-              doWriteInt(handle);
+         if (handle >= 0) {
+             doWriteByte(GridPortableMarshaller.HANDLE);
+             doWriteInt(handle);
  
-              return true;
-          }
+             return true;
+         }
  
-          return false;
-      }
+         return false;
+     }
  
      /**
       * Create new writer with same context.

http://git-wip-us.apache.org/repos/asf/ignite/blob/43423549/modules/platforms/cpp/core/include/Makefile.am
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/43423549/modules/platforms/cpp/core/project/vs/core.vcxproj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/43423549/modules/platforms/cpp/core/project/vs/core.vcxproj.filters
----------------------------------------------------------------------


Mime
View raw message