You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/11/18 14:40:01 UTC
[27/50] [abbrv] ignite git commit: IGNITE-1917: Schema IDs: list ->
array.
IGNITE-1917: Schema IDs: list -> array.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f64358cf
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f64358cf
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f64358cf
Branch: refs/heads/ignite-1917
Commit: f64358cfceedf32093e450b2aecccc324916ba2c
Parents: 2069427
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Nov 17 17:56:55 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 17 17:56:55 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/portable/PortableSchema.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f64358cf/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableSchema.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableSchema.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableSchema.java
index 0c49451..d58cf6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableSchema.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableSchema.java
@@ -50,7 +50,7 @@ public class PortableSchema implements Externalizable {
private PortableSchemaIntIntMap fastIdToOrder;
/** IDs depending on order. */
- private ArrayList<Integer> ids;
+ private int[] ids;
/** ID 1. */
private int id0;
@@ -117,13 +117,13 @@ public class PortableSchema implements Externalizable {
id0 = id1 = id2 = id3 = id4 = id5 = id6 = id7 = 0;
- ids = new ArrayList<>();
+ ids = new int[fieldIds.size()];
idToOrder = new HashMap<>();
for (int i = 0; i < fieldIds.size(); i++) {
int fieldId = fieldIds.get(i);
- ids.add(fieldId);
+ ids[i] = fieldId;
idToOrder.put(fieldId, i);
}
@@ -178,7 +178,7 @@ public class PortableSchema implements Externalizable {
}
}
else
- return ids.get(order);
+ return ids[order];
}
/**
@@ -248,7 +248,7 @@ public class PortableSchema implements Externalizable {
else {
out.writeBoolean(false);
- out.writeInt(ids.size());
+ out.writeInt(ids.length);
for (Integer id : ids)
out.writeInt(id);
@@ -276,13 +276,13 @@ public class PortableSchema implements Externalizable {
int size = in.readInt();
- ids = new ArrayList<>(size);
+ ids = new int[size];
idToOrder = U.newHashMap(size);
for (int i = 0; i < size; i++) {
int fieldId = in.readInt();
- ids.add(fieldId);
+ ids[i] = fieldId;
idToOrder.put(fieldId, i);
}