ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [12/50] [abbrv] incubator-ignite git commit: IGNITE-141 - Marshallers refactoring
Date Wed, 11 Mar 2015 06:45:32 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
index abff9b9..2122832 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java
@@ -17,52 +17,33 @@
 
 package org.apache.ignite.marshaller;
 
+import org.apache.ignite.internal.*;
 import org.jdk8.backport.*;
 
-import java.io.*;
+import java.util.*;
 import java.util.concurrent.*;
 
 /**
  * Test marshaller context.
  */
-public class MarshallerContextTestImpl implements MarshallerContext {
-    /** */
-    private static final String[] CLS_NAMES_FILES = {
-        "org/apache/ignite/internal/classnames.properties",
-        "org/apache/ignite/internal/classnames-jdk.properties"
-    };
-
+public class MarshallerContextTestImpl extends MarshallerContextAdapter {
     /** */
     private final ConcurrentMap<Integer, Class> map = new ConcurrentHashMap8<>();
 
     /**
      */
     public MarshallerContextTestImpl() {
-        try {
-            ClassLoader ldr = getClass().getClassLoader();
-
-            for (String file : CLS_NAMES_FILES) {
-                BufferedReader rdr = new BufferedReader(new InputStreamReader(ldr.getResourceAsStream(file)));
-
-                String line;
+        super();
 
-                while ((line = rdr.readLine()) != null) {
-                    if (line.isEmpty() || line.startsWith("#"))
-                        continue;
+        ClassLoader ldr = getClass().getClassLoader();
 
-                    try {
-                        Class cls = Class.forName(line.trim(), false, ldr);
-
-                        map.put(cls.getName().hashCode(), cls);
-                    }
-                    catch (ClassNotFoundException | NoClassDefFoundError ignored) {
-                        // No-op.
-                    }
-                }
+        for (Map.Entry<Integer, String> e : clsNameById.entrySet()) {
+            try {
+                map.put(e.getKey(), Class.forName(e.getValue(), true, ldr));
+            }
+            catch (ClassNotFoundException | NoClassDefFoundError ignored) {
+                // No-op.
             }
-        }
-        catch (IOException e) {
-            throw new IllegalStateException("Failed to initialize marshaller context.", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index f0fe47f..9d7087b 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -36,7 +36,7 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:CMSInitiatingOccupancyFraction=60 \
 "
 #Ignite version
-ver="RELEASE-"
+ver="141-"
 
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
@@ -65,25 +65,5 @@ nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS}
 # Run configuration which contains all benchmarks.
 # Note that each benchmark is set to run for 300 seconds (5 mins) with warm-up set to 60
seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds ${ver}sql-query-join-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds ${ver}sql-query-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -j 10 -dn IgniteAffinityCallBenchmark -sn IgniteNode -ds ${ver}affcall-compute-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -j 10 -dn IgniteApplyBenchmark -sn IgniteNode -ds ${ver}apply-compute-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -j 10 -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -j 10 -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -j 10 -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-1-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300
-t 64 -sm PRIMARY_SYNC -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-1-backup\
 "


Mime
View raw message