ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [21/50] [abbrv] ignite git commit: Fixed code style.
Date Wed, 04 May 2016 08:20:21 GMT
Fixed code style.


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

Branch: refs/heads/ignite-2435
Commit: b024235ab7a2b2467e19127caca79f18294e2ac4
Parents: 854357e
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 14 09:50:19 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 14 09:50:19 2016 +0300

----------------------------------------------------------------------
 .../IgniteCacheRandomOperationBenchmark.java    | 122 +++++++++----------
 .../yardstick/cache/load/model/ModelUtil.java   |  39 +++---
 .../cache/load/model/key/Identifier.java        |  21 ++--
 .../yardstick/cache/load/model/key/Mark.java    |  14 ++-
 .../yardstick/cache/load/model/value/Car.java   |   1 -
 .../yardstick/cache/load/model/value/Color.java |  14 ++-
 .../yardstick/cache/load/model/value/Truck.java |  17 +--
 7 files changed, 114 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
index 9dae7f8..72c9aae 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
@@ -33,7 +33,6 @@ import java.util.concurrent.ThreadLocalRandom;
 import javax.cache.processor.EntryProcessor;
 import javax.cache.processor.EntryProcessorException;
 import javax.cache.processor.MutableEntry;
-
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCompute;
@@ -69,7 +68,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
     public static final int operations = Operation.values().length;
 
     /** Scan query predicate. */
-    private static BenchmarkIgniteBiPredicate igniteBiPredicate = new BenchmarkIgniteBiPredicate();
+    private static BenchmarkIgniteBiPredicate igniteBiPred = new BenchmarkIgniteBiPredicate();
 
     /** Amount partitions. */
     private static final int SCAN_QUERY_PARTITIN_AMOUNT = 10;
@@ -97,7 +96,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
     /**
      * Remove entry processor.
      */
-    private BenchmarkRemoveEntryProcessor removeEntryProc;
+    private BenchmarkRemoveEntryProcessor rmvEntryProc;
 
     /** {@inheritDoc} */
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
@@ -131,7 +130,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
         keysCacheClasses = new HashMap<>();
         valuesCacheClasses = new HashMap<>();
         replaceEntryProc = new BenchmarkReplaceValueEntryProcessor(null);
-        removeEntryProc = new BenchmarkRemoveEntryProcessor();
+        rmvEntryProc = new BenchmarkRemoveEntryProcessor();
 
         for (String cacheName : ignite().cacheNames()) {
             IgniteCache<Object, Object> cache = ignite().cache(cacheName);
@@ -152,20 +151,20 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
 
                     for (QueryEntity queryEntity : entries) {
                         if (queryEntity.getKeyType() != null) {
-                            Class keyClass = getClass().forName(queryEntity.getKeyType());
+                            Class keyCls = getClass().forName(queryEntity.getKeyType());
 
-                            if (ModelUtil.canCreateInstance(keyClass))
-                                keys.add(keyClass);
+                            if (ModelUtil.canCreateInstance(keyCls))
+                                keys.add(keyCls);
                             else
                                 throw new IgniteException("Class is unknown for the load
test. Make sure you " +
                                     "specified its full name [clsName=" + queryEntity.getKeyType()
+ ']');
                         }
 
                         if (queryEntity.getValueType() != null) {
-                            Class valueClass = getClass().forName(queryEntity.getValueType());
+                            Class valCls = getClass().forName(queryEntity.getValueType());
 
-                            if (ModelUtil.canCreateInstance(valueClass))
-                                values.add(valueClass);
+                            if (ModelUtil.canCreateInstance(valCls))
+                                values.add(valCls);
                             else
                                 throw new IgniteException("Class is unknown for the load
test. Make sure you " +
                                     "specified its full name [clsName=" + queryEntity.getKeyType()
+ ']');
@@ -178,20 +177,20 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
 
                     for (CacheTypeMetadata cacheTypeMetadata : entries) {
                         if (cacheTypeMetadata.getKeyType() != null) {
-                            Class keyClass = getClass().forName(cacheTypeMetadata.getKeyType());
+                            Class keyCls = getClass().forName(cacheTypeMetadata.getKeyType());
 
-                            if (ModelUtil.canCreateInstance(keyClass))
-                                keys.add(keyClass);
+                            if (ModelUtil.canCreateInstance(keyCls))
+                                keys.add(keyCls);
                             else
                                 throw new IgniteException("Class is unknown for the load
test. Make sure you " +
                                     "specified its full name [clsName=" + cacheTypeMetadata.getKeyType()
+ ']');
                         }
 
                         if (cacheTypeMetadata.getValueType() != null) {
-                            Class valueClass = getClass().forName(cacheTypeMetadata.getValueType());
+                            Class valCls = getClass().forName(cacheTypeMetadata.getValueType());
 
-                            if (ModelUtil.canCreateInstance(valueClass))
-                                values.add(valueClass);
+                            if (ModelUtil.canCreateInstance(valCls))
+                                values.add(valCls);
                             else
                                 throw new IgniteException("Class is unknown for the load
test. Make sure you " +
                                     "specified its full name [clsName=" + cacheTypeMetadata.getKeyType()
+ ']');
@@ -251,9 +250,8 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
             threads[i].start();
         }
 
-        for (Thread thread : threads) {
+        for (Thread thread : threads)
             thread.join();
-        }
     }
 
     /**
@@ -274,13 +272,13 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
                 randmPartitions.add(i);
         else {
             for (int i = 0; i < SCAN_QUERY_PARTITIN_AMOUNT; i++) {
-                int partitionNumber;
+                int partNum;
 
                 do
-                    partitionNumber = nextRandom(affinity.partitions());
-                while (randmPartitions.contains(partitionNumber));
+                    partNum = nextRandom(affinity.partitions());
+                while (randmPartitions.contains(partNum));
 
-                randmPartitions.add(partitionNumber);
+                randmPartitions.add(partNum);
             }
         }
 
@@ -488,12 +486,12 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
     private void doGetAll(IgniteCache cache) throws Exception {
         Set keys = new TreeSet();
 
-        Class keyClass = randomKeyClass(cache.getName());
+        Class keyCls = randomKeyClass(cache.getName());
 
         for (int cnt = 0; cnt < args.batch(); cnt++) {
             int i = nextRandom(args.range());
 
-            keys.add(ModelUtil.create(keyClass, i));
+            keys.add(ModelUtil.create(keyCls, i));
         }
 
         cache.getAll(keys);
@@ -510,7 +508,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
             cache.invoke(createRandomKey(i, cache.getName()), replaceEntryProc,
                 createRandomValue(i + 1, cache.getName()));
         else
-            cache.invoke(createRandomKey(i, cache.getName()), removeEntryProc);
+            cache.invoke(createRandomKey(i, cache.getName()), rmvEntryProc);
 
     }
 
@@ -518,26 +516,25 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
      * Entry processor for local benchmark replace value task.
      */
     private static class BenchmarkReplaceValueEntryProcessor implements EntryProcessor, Serializable
{
-
         /**
          * New value for update during process by default.
          */
-        private Object newValue;
+        private Object newVal;
 
         /**
-         * @param newValue default new value
+         * @param newVal default new value
          */
-        public BenchmarkReplaceValueEntryProcessor(Object newValue) {
-            this.newValue = newValue;
+        public BenchmarkReplaceValueEntryProcessor(Object newVal) {
+            this.newVal = newVal;
         }
 
-        @Override
-        public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException
{
-            Object newValue = arguments == null || arguments[0] == null ? this.newValue :
arguments[0];
-            Object oldValue = entry.getValue();
-            entry.setValue(newValue);
+        /** {@inheritDoc} */
+        @Override public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException
{
+            Object newVal = arguments == null || arguments[0] == null ? this.newVal : arguments[0];
+            Object oldVal = entry.getValue();
+            entry.setValue(newVal);
 
-            return oldValue;
+            return oldVal;
         }
     }
 
@@ -545,13 +542,13 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
      * Entry processor for local benchmark remove entry task.
      */
     private static class BenchmarkRemoveEntryProcessor implements EntryProcessor, Serializable
{
+        /** {@inheritDoc} */
+        @Override public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException
{
+            Object oldVal = entry.getValue();
 
-        @Override
-        public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException
{
-            Object oldValue = entry.getValue();
             entry.remove();
 
-            return oldValue;
+            return oldVal;
         }
     }
 
@@ -562,17 +559,17 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
     private void doInvokeAll(final IgniteCache cache) throws Exception {
         Map<Object, EntryProcessor> map = new TreeMap<>();
 
-        Class keyClass = randomKeyClass(cache.getName());
+        Class keyCls = randomKeyClass(cache.getName());
 
         for (int cnt = 0; cnt < args.batch(); cnt++) {
             int i = nextRandom(args.range());
-            Object key = ModelUtil.create(keyClass, i);
+            Object key = ModelUtil.create(keyCls, i);
 
             if (nextBoolean())
                 map.put(key,
                     new BenchmarkReplaceValueEntryProcessor(createRandomValue(i + 1, cache.getName())));
             else
-                map.put(key, removeEntryProc);
+                map.put(key, rmvEntryProc);
         }
 
         cache.invokeAll(map);
@@ -594,12 +591,12 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
      */
     private void doRemoveAll(IgniteCache cache) throws Exception {
         Set keys = new TreeSet();
-        Class keyClass = randomKeyClass(cache.getName());
+        Class keyCls = randomKeyClass(cache.getName());
 
         for (int cnt = 0; cnt < args.batch(); cnt++) {
             int i = nextRandom(args.range());
 
-            keys.add(ModelUtil.create(keyClass, i));
+            keys.add(ModelUtil.create(keyCls, i));
         }
 
         cache.removeAll(keys);
@@ -637,20 +634,19 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
 
         Map<UUID, List<Integer>> partitionsMap = personCachePartitions(cache.getName());
 
-        ScanQueryBroadcastClosure closure = new ScanQueryBroadcastClosure(cache.getName(),
partitionsMap);
+        ScanQueryBroadcastClosure c = new ScanQueryBroadcastClosure(cache.getName(), partitionsMap);
 
-        ClusterGroup clusterGroup = ignite().cluster().forNodeIds(partitionsMap.keySet());
+        ClusterGroup clusterGrp = ignite().cluster().forNodeIds(partitionsMap.keySet());
 
-        IgniteCompute compute = ignite().compute(clusterGroup);
+        IgniteCompute compute = ignite().compute(clusterGrp);
 
-        compute.broadcast(closure);
+        compute.broadcast(c);
     }
 
     /**
      * Closure for scan query executing.
      */
     private static class ScanQueryBroadcastClosure implements IgniteRunnable {
-
         /**
          * Ignite node.
          */
@@ -660,7 +656,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
         /**
          * Information about partition.
          */
-        private Map<UUID, List<Integer>> cachePartition;
+        private Map<UUID, List<Integer>> cachePart;
 
         /**
          * Name of Ignite cache.
@@ -669,31 +665,30 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
 
         /**
          * @param cacheName Name of Ignite cache.
-         * @param cachePartition Partition by node for Ignite cache.
+         * @param cachePart Partition by node for Ignite cache.
          */
-        public ScanQueryBroadcastClosure(String cacheName, Map<UUID, List<Integer>>
cachePartition) {
-            this.cachePartition = cachePartition;
+        public ScanQueryBroadcastClosure(String cacheName, Map<UUID, List<Integer>>
cachePart) {
+            this.cachePart = cachePart;
             this.cacheName = cacheName;
         }
 
-        @Override
-        public void run() {
-
+        /** {@inheritDoc} */
+        @Override public void run() {
             IgniteCache cache = node.cache(cacheName);
 
             // Getting a list of the partitions owned by this node.
-            List<Integer> myPartitions = cachePartition.get(node.cluster().localNode().id());
+            List<Integer> myPartitions = cachePart.get(node.cluster().localNode().id());
 
             for (Integer part : myPartitions) {
                 if (ThreadLocalRandom.current().nextBoolean())
                     continue;
 
-                ScanQuery scanQuery = new ScanQuery();
+                ScanQuery scanQry = new ScanQuery();
 
-                scanQuery.setPartition(part);
-                scanQuery.setFilter(igniteBiPredicate);
+                scanQry.setPartition(part);
+                scanQry.setFilter(igniteBiPred);
 
-                try (QueryCursor cursor = cache.query(scanQuery)) {
+                try (QueryCursor cursor = cache.query(scanQry)) {
                     for (Object obj : cursor)
                         ;
                 }
@@ -712,8 +707,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
          * @param val Cache value.
          * @return true If is hit.
          */
-        @Override
-        public boolean apply(Object key, Object val) {
+        @Override public boolean apply(Object key, Object val) {
             return val.hashCode() % 45 == 0;
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/ModelUtil.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/ModelUtil.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/ModelUtil.java
index f6d96b3..ecb3872 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/ModelUtil.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/ModelUtil.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.yardstick.cache.load.model;
 
+import java.util.UUID;
 import org.apache.ignite.yardstick.cache.load.model.key.Identifier;
 import org.apache.ignite.yardstick.cache.load.model.key.Mark;
 import org.apache.ignite.yardstick.cache.load.model.value.Car;
@@ -29,8 +30,6 @@ import org.apache.ignite.yardstick.cache.model.Person1;
 import org.apache.ignite.yardstick.cache.model.Person2;
 import org.apache.ignite.yardstick.cache.model.Person8;
 
-import java.util.UUID;
-
 /**
  * Util class for model.
  */
@@ -49,7 +48,7 @@ public class ModelUtil {
     /**
      * Classes of values.
      */
-    private static Class[] valueClasses = {
+    private static Class[] valClasses = {
         Car.class,
         Truck.class,
         Person.class,
@@ -70,7 +69,7 @@ public class ModelUtil {
                 return true;
         }
 
-        for (Class c: valueClasses) {
+        for (Class c: valClasses) {
             if (c.equals(clazz))
                 return true;
         }
@@ -84,52 +83,52 @@ public class ModelUtil {
      * @return object from model
      */
     public static Object create(Class c, int id) {
-        Object result = null;
+        Object res = null;
 
         switch (c.getSimpleName()) {
             case "Double":
-                result = Double.valueOf(id);
+                res = Double.valueOf(id);
                 break;
             case "Identifier":
-                result = new Identifier(id, "id " + id);
+                res = new Identifier(id, "id " + id);
                 break;
             case "Mark":
-                result = new Mark(id, UUID.nameUUIDFromBytes(Integer.toString(id).getBytes()));
+                res = new Mark(id, UUID.nameUUIDFromBytes(Integer.toString(id).getBytes()));
                 break;
             case "Integer":
-                result = id;
+                res = id;
                 break;
             case "UUID":
-                result = UUID.nameUUIDFromBytes(Integer.toString(id).getBytes());
+                res = UUID.nameUUIDFromBytes(Integer.toString(id).getBytes());
                 break;
             case "Car":
                 int colorCnt = Color.values().length;
-                result = new Car(id, "Mark " + id, id/2.123 * 100, Color.values()[id % colorCnt]);
+                res = new Car(id, "Mark " + id, id / 2.123 * 100, Color.values()[id % colorCnt]);
                 break;
             case "Truck":
                 int colors = Color.values().length;
-                result = new Truck(id, "Mark " + id, id/2.123 * 100, Color.values()[id %
colors], id/4.123 * 100);
+                res = new Truck(id, "Mark " + id, id / 2.123 * 100, Color.values()[id % colors],
id / 4.123 * 100);
                 break;
             case "Person":
-                result = new Person(id, "First Name " + id, "Last Name " + id, id/2.123 *
100);
+                res = new Person(id, "First Name " + id, "Last Name " + id, id / 2.123 *
100);
                 break;
             case "Organization":
-                result = new Organization(id, "Organization " + id);
+                res = new Organization(id, "Organization " + id);
                 break;
             case "Account":
-                result = new Account(id);
+                res = new Account(id);
                 break;
             case "Person1":
-                result = new Person1(id);
+                res = new Person1(id);
                 break;
             case "Person2":
-                result = new Person2(id);
+                res = new Person2(id);
                 break;
             case "Person8":
-                result = new Person8(id);
+                res = new Person8(id);
         }
 
-        return result;
+        return res;
     }
 
     /**
@@ -143,6 +142,6 @@ public class ModelUtil {
      * @return array of value chache classes
      */
     public static Class[] valueClasses() {
-        return valueClasses;
+        return valClasses;
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Identifier.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Identifier.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Identifier.java
index 1cb58ba..4954c9c 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Identifier.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Identifier.java
@@ -23,7 +23,6 @@ import java.io.Serializable;
  * Key cache class
  */
 public class Identifier implements Comparable<Identifier>, Serializable {
-
     /**
      * Integer identifier
      */
@@ -78,10 +77,11 @@ public class Identifier implements Comparable<Identifier>, Serializable
{
         this.code = code;
     }
 
-    @Override
-    public boolean equals(Object o) {
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
         if (this == o)
             return true;
+
         if (o == null || getClass() != o.getClass())
             return false;
 
@@ -89,18 +89,19 @@ public class Identifier implements Comparable<Identifier>, Serializable
{
 
         if (id != that.id)
             return false;
-        return code != null ? code.equals(that.code) : that.code == null;
 
+        return code != null ? code.equals(that.code) : that.code == null;
     }
 
-    @Override
-    public int hashCode() {
-        int result = id;
-        result = 31 * result + (code != null ? code.hashCode() : 0);
-        return result;
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = id;
+        res = 31 * res + (code != null ? code.hashCode() : 0);
+        return res;
     }
 
+    /** {@inheritDoc} */
     @Override public int compareTo(Identifier o) {
-        return id - o.id;
+        return Integer.compare(id, o.id);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Mark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Mark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Mark.java
index 614df86..fdc9393 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Mark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/key/Mark.java
@@ -24,7 +24,6 @@ import java.util.UUID;
  * Cache value class
  */
 public class Mark implements Comparable<Mark>, Serializable {
-
     /**
      * Mark identifier
      */
@@ -78,6 +77,7 @@ public class Mark implements Comparable<Mark>, Serializable {
         this.token = token;
     }
 
+    /** {@inheritDoc} */
     @Override public boolean equals(Object o) {
         if (this == o)
             return true;
@@ -88,16 +88,20 @@ public class Mark implements Comparable<Mark>, Serializable {
 
         if (id != mark.id)
             return false;
-        return token != null ? token.equals(mark.token) : mark.token == null;
 
+        return token != null ? token.equals(mark.token) : mark.token == null;
     }
 
+    /** {@inheritDoc} */
     @Override public int hashCode() {
-        int result = id;
-        result = 31 * result + (token != null ? token.hashCode() : 0);
-        return result;
+        int res = id;
+
+        res = 31 * res + (token != null ? token.hashCode() : 0);
+
+        return res;
     }
 
+    /** {@inheritDoc} */
     @Override public int compareTo(Mark o) {
         return id - o.id;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Car.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Car.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Car.java
index 3824afa..ad20a80 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Car.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Car.java
@@ -23,7 +23,6 @@ import java.io.Serializable;
  * Value cache class
  */
 public class Car implements Serializable {
-
     /**
      * Car identifier
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Color.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Color.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Color.java
index 23e5008..ecb3178 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Color.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Color.java
@@ -23,26 +23,28 @@ import java.io.Serializable;
  * Car color
  */
 public enum Color implements Serializable {
-
     /**
-     * grey color
+     * Grey color.
      */
     GREY,
 
     /**
-     * red color
+     * Red color.
      */
     RED,
+
     /**
-     * gren color
+     * Green color.
      */
     GREEN,
+
     /**
-     * purple color
+     * Purple color.
      */
     PURPLE,
+
     /**
-     * light blue color
+     * Light blue color.
      */
     LIGHTBLUE
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b024235a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Truck.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Truck.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Truck.java
index a89f8b5..4411e08 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Truck.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/model/value/Truck.java
@@ -23,40 +23,41 @@ import java.io.Serializable;
  * Cache value class
  */
 public class Truck extends Car implements Serializable {
-
     /**
      * Truck capacity
      */
-    public double capacity;
+    public double cap;
 
     /**
      * Empty constructor
      */
     public Truck() {
+        // No-op.
     }
 
     /**
      * @param id identifier
      * @param make mark of truck
      * @param weight weight
+     * @param color Color.
      * @param capacity capacity
      */
     public Truck(int id, String make, double weight, Color color, double capacity) {
         super(id, make, weight, color);
-        this.capacity = capacity;
+        this.cap = capacity;
     }
 
     /**
      * @return truck capacity
      */
-    public double getCapacity() {
-        return capacity;
+    public double getCap() {
+        return cap;
     }
 
     /**
-     * @param capacity truck capacity
+     * @param cap truck capacity
      */
-    public void setCapacity(double capacity) {
-        this.capacity = capacity;
+    public void setCap(double cap) {
+        this.cap = cap;
     }
 }


Mime
View raw message