You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/05/26 12:11:32 UTC
[01/34] incubator-ignite git commit: # ignite-816 Visor console:
select node in case one node.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-37 b445ac596 -> 956987900 (forced update)
# ignite-816 Visor console: select node in case one node.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/882b6aa8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/882b6aa8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/882b6aa8
Branch: refs/heads/ignite-37
Commit: 882b6aa81e82848f86461092e4a2e117a6772abd
Parents: 81ce0e6
Author: Andrey <an...@gridgain.com>
Authored: Thu Apr 30 11:29:40 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Apr 30 11:29:40 2015 +0700
----------------------------------------------------------------------
.../src/main/scala/org/apache/ignite/visor/visor.scala | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/882b6aa8/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 356c80a..f3aa87d 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -2012,6 +2012,8 @@ object visor extends VisorTag {
None
}
+ else if (nodes.size == 1)
+ Some(nodes.head.id)
else {
(0 until nodes.size) foreach (i => {
val n = nodes(i)
[04/34] incubator-ignite git commit: ignite-930 - fixed
Posted by sb...@apache.org.
ignite-930 - fixed
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f811f516
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f811f516
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f811f516
Branch: refs/heads/ignite-37
Commit: f811f51680928a5e55998ac70f179580b6a5103a
Parents: 7680513
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu May 21 11:31:17 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu May 21 11:31:17 2015 +0300
----------------------------------------------------------------------
.../processors/query/GridQueryIndexing.java | 16 ++++++
.../processors/query/GridQueryProcessor.java | 52 +++++++-------------
.../query/h2/GridH2IndexingGeoSelfTest.java | 20 +++++++-
.../processors/query/h2/IgniteH2Indexing.java | 17 +++++++
.../query/h2/sql/GridSqlOperationType.java | 2 +-
.../local/IgniteCacheLocalQuerySelfTest.java | 6 +++
6 files changed, 77 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index b1c3970..0bb820d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@ -149,6 +149,22 @@ public interface GridQueryIndexing {
public void unregisterCache(CacheConfiguration<?, ?> ccfg) throws IgniteCheckedException;
/**
+ * Checks if the given class can be mapped to a simple SQL type.
+ *
+ * @param cls Class.
+ * @return {@code true} If can.
+ */
+ public boolean isSqlType(Class<?> cls);
+
+ /**
+ * Checks if the given class is GEOMETRY.
+ *
+ * @param cls Class.
+ * @return {@code true} If this is geometry.
+ */
+ public boolean isGeometryClass(Class<?> cls);
+
+ /**
* Registers type if it was not known before or updates it otherwise.
*
* @param spaceName Space name.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 7a3cb68..cd4d543 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -936,10 +936,19 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @param parent Parent in case of embeddable.
* @throws IgniteCheckedException In case of error.
*/
- static void processAnnotationsInClass(boolean key, Class<?> cls, TypeDescriptor type,
+ private void processAnnotationsInClass(boolean key, Class<?> cls, TypeDescriptor type,
@Nullable ClassProperty parent) throws IgniteCheckedException {
- if (U.isJdk(cls))
+ if (U.isJdk(cls) || idx.isGeometryClass(cls)) {
+ if (parent == null && !key && idx.isSqlType(cls) ) { // We have to index primitive _val.
+ String idxName = "_val_idx";
+
+ type.addIndex(idxName, idx.isGeometryClass(cls) ? GEO_SPATIAL : SORTED);
+
+ type.addFieldToIndex(idxName, "_VAL", 0, false);
+ }
+
return;
+ }
if (parent != null && parent.knowsClass(cls))
throw new IgniteCheckedException("Recursive reference found in type: " + cls.getName());
@@ -1011,7 +1020,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @param desc Class description.
* @throws IgniteCheckedException In case of error.
*/
- static void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn,
+ private void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn,
Class<?> cls, ClassProperty prop, TypeDescriptor desc) throws IgniteCheckedException {
if (sqlAnn != null) {
processAnnotationsInClass(key, cls, desc, prop);
@@ -1022,7 +1031,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
if (sqlAnn.index()) {
String idxName = prop.name() + "_idx";
- desc.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
+ desc.addIndex(idxName, idx.isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
desc.addFieldToIndex(idxName, prop.name(), 0, sqlAnn.descending());
}
@@ -1049,7 +1058,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
* @param d Type descriptor.
* @throws IgniteCheckedException If failed.
*/
- static void processClassMeta(CacheTypeMetadata meta, TypeDescriptor d)
+ private void processClassMeta(CacheTypeMetadata meta, TypeDescriptor d)
throws IgniteCheckedException {
Class<?> keyCls = d.keyClass();
Class<?> valCls = d.valueClass();
@@ -1064,7 +1073,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
String idxName = prop.name() + "_idx";
- d.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
+ d.addIndex(idxName, idx.isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
d.addFieldToIndex(idxName, prop.name(), 0, false);
}
@@ -1076,7 +1085,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
String idxName = prop.name() + "_idx";
- d.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
+ d.addIndex(idxName, idx.isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
d.addFieldToIndex(idxName, prop.name(), 0, true);
}
@@ -1136,7 +1145,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
String idxName = prop.name() + "_idx";
- d.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
+ d.addIndex(idxName, idx.isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
d.addFieldToIndex(idxName, prop.name(), 0, false);
}
@@ -1148,7 +1157,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
String idxName = prop.name() + "_idx";
- d.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
+ d.addIndex(idxName, idx.isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
d.addFieldToIndex(idxName, prop.name(), 0, true);
}
@@ -1321,31 +1330,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
}
/**
- * @param cls Field type.
- * @return {@code True} if given type is a spatial geometry type based on {@code com.vividsolutions.jts} library.
- * @throws IgniteCheckedException If failed.
- */
- private static boolean isGeometryClass(Class<?> cls) throws IgniteCheckedException { // TODO optimize
- Class<?> dataTypeCls;
-
- try {
- dataTypeCls = Class.forName("org.h2.value.DataType");
- }
- catch (ClassNotFoundException ignored) {
- return false; // H2 is not in classpath.
- }
-
- try {
- Method method = dataTypeCls.getMethod("isGeometryClass", Class.class);
-
- return (Boolean)method.invoke(null, cls);
- }
- catch (Exception e) {
- throw new IgniteCheckedException("Failed to invoke 'org.h2.value.DataType.isGeometryClass' method.", e);
- }
- }
-
- /**
*
*/
private abstract static class Property {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 8566960..b80944c 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -57,13 +57,31 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
/** {@inheritDoc} */
@Override protected Class<?>[] indexedTypes() {
return new Class<?>[]{
- Integer.class, EnemyCamp.class
+ Integer.class, EnemyCamp.class,
+ Long.class, Geometry.class // Geometry must be indexed here.
};
}
/**
* @throws Exception If failed.
*/
+ public void testPrimitiveGeometry() throws Exception {
+ IgniteCache<Long, Geometry> cache = grid(0).cache(null);
+
+ WKTReader r = new WKTReader();
+
+ for (long i = 0; i < 100; i++)
+ cache.put(i, r.read("POINT(" + i + " " + i + ")"));
+
+ List<List<?>> res = cache.query(new SqlFieldsQuery("explain select _key from Geometry where _val && ?")
+ .setArgs(r.read("POLYGON((5 70, 5 80, 30 80, 30 70, 5 70))")).setLocal(true)).getAll();
+
+ assertTrue("__ explain: " + res, res.get(0).get(0).toString().contains("_val_idx"));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
@SuppressWarnings("unchecked")
public void testGeo() throws Exception {
IgniteCache<Integer, EnemyCamp> cache = grid(0).cache(null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 975378c..200da77 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1412,6 +1412,23 @@ public class IgniteH2Indexing implements GridQueryIndexing {
}
}
+ /** {@inheritDoc} */
+ @Override public boolean isSqlType(Class<?> cls) {
+ switch (DBTypeEnum.fromClass(cls)) {
+ case OTHER:
+ case ARRAY:
+ return false;
+
+ default:
+ return true;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isGeometryClass(Class<?> cls) {
+ return DataType.isGeometryClass(cls);
+ }
+
/**
* Enum that helps to map java types to database types.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
index 7aefbec..a071e73 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
@@ -131,7 +131,7 @@ public enum GridSqlOperationType {
@Override public String getSql(GridSqlOperation operation) {
assert operation.opType().childrenCnt == 2;
- return "(INTERSECTS(" + operation.child(0) + ", " + operation.child(1) + "))";
+ return "(INTERSECTS(" + operation.child(0).getSQL() + ", " + operation.child(1).getSQL() + "))";
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f811f516/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
index c489d35..48dc6f2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
@@ -78,5 +78,11 @@ public class IgniteCacheLocalQuerySelfTest extends IgniteCacheAbstractQuerySelfT
assert iter.next() != null;
assert iter.next() != null;
assert !iter.hasNext();
+
+ // Test explain for primitive index.
+ List<List<?>> res = cache.query(new SqlFieldsQuery(
+ "explain select _key from String where _val > 'value1'").setLocal(true)).getAll();
+
+ assertTrue("__ explain: \n" + res, ((String)res.get(0).get(0)).contains("_val_idx"));
}
}
[21/34] incubator-ignite git commit: ignite-938 - value get loop
improvement
Posted by sb...@apache.org.
ignite-938 - value get loop improvement
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fae83153
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fae83153
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fae83153
Branch: refs/heads/ignite-37
Commit: fae83153e354d477e56eec7265992f859de24137
Parents: be24c39
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri May 22 16:29:12 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri May 22 16:29:12 2015 +0300
----------------------------------------------------------------------
.../query/h2/opt/GridH2AbstractKeyValueRow.java | 18 +++++++++++++-----
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 4 ++--
2 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fae83153/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
index 2ce91cf..6e95710 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
@@ -27,6 +27,7 @@ import org.jetbrains.annotations.*;
import java.lang.ref.*;
import java.sql.*;
+import java.util.concurrent.*;
/**
* Table row implementation based on {@link GridQueryTypeDescriptor}.
@@ -137,20 +138,27 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
}
/**
- * @param attempt Attempt.
+ * @param waitTime Time to await for value unswap.
* @return Synchronized value.
*/
- protected synchronized Value syncValue(int attempt) {
+ protected synchronized Value syncValue(long waitTime) {
Value v = peekValue(VAL_COL);
- if (v == null && attempt != 0) {
+ while (v == null && waitTime > 0) {
+ long start = System.nanoTime(); // This call must be quite rare, so performance is not a concern.
+
try {
- wait(attempt);
+ wait(waitTime); // Wait for value arrival to allow other threads to make a progress.
}
catch (InterruptedException e) {
throw new IgniteInterruptedException(e);
}
+ long t = System.nanoTime() - start;
+
+ if (t > 0)
+ waitTime -= TimeUnit.NANOSECONDS.toMillis(t);
+
v = peekValue(VAL_COL);
}
@@ -211,7 +219,7 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
if (start == 0)
start = U.currentTimeMillis();
- else if (U.currentTimeMillis() - start > 15_000) // Loop for at most 15 seconds.
+ else if (U.currentTimeMillis() - start > 60_000) // Loop for at most 60 seconds.
throw new IgniteException("Failed to get value for key: " + k +
". This can happen due to a long GC pause.");
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fae83153/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
index c47f122..f89591a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
@@ -272,8 +272,8 @@ public class GridH2KeyValueRowOffheap extends GridH2AbstractKeyValueRow {
}
/** {@inheritDoc} */
- @Override protected Value syncValue(int attempt) {
- Value v = super.syncValue(attempt);
+ @Override protected Value syncValue(long waitTime) {
+ Value v = super.syncValue(waitTime);
if (v != null)
return v;
[12/34] incubator-ignite git commit: ignite-930 - log
Posted by sb...@apache.org.
ignite-930 - log
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6aa16b85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6aa16b85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6aa16b85
Branch: refs/heads/ignite-37
Commit: 6aa16b850f6f2a6179a264c0931df84c895f12dc
Parents: 1c8d7c9
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri May 22 08:56:00 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri May 22 08:56:00 2015 +0300
----------------------------------------------------------------------
.../cache/distributed/GridDistributedTxRemoteAdapter.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6aa16b85/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index 3215138..ad9b21d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -651,15 +651,17 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
}
}
catch (Throwable ex) {
- uncommit();
-
- state(UNKNOWN);
-
// In case of error, we still make the best effort to commit,
// as there is no way to rollback at this point.
err = new IgniteTxHeuristicCheckedException("Commit produced a runtime exception " +
"(all transaction entries will be invalidated): " + CU.txString(this), ex);
+ U.error(log, "Commit failed.", err);
+
+ uncommit();
+
+ state(UNKNOWN);
+
if (ex instanceof Error)
throw (Error)ex;
}
[11/34] incubator-ignite git commit: Merge branch
'ignite-sprint-4-1.0.6-7.0.6' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-sprint-4-1.0.6-7.0.6
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-4-1.0.6-7.0.6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-4-1.0.6-7.0.6
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1c8d7c91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1c8d7c91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1c8d7c91
Branch: refs/heads/ignite-37
Commit: 1c8d7c91ce08640a018efb396e0a0f5a329f02ec
Parents: 60c388f 883ad9c
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri May 22 08:00:57 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri May 22 08:00:57 2015 +0300
----------------------------------------------------------------------
LICENSE | 238 +++++++++++++++++++
LICENSE.txt | 238 -------------------
NOTICE | 12 +
NOTICE.txt | 12 -
assembly/release-base.xml | 4 +-
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/java/META-INF/LICENSE | 238 +++++++++++++++++++
modules/core/src/main/java/META-INF/NOTICE | 12 +
.../core/src/main/resources/ignite.properties | 2 +-
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 1 -
pom.xml | 39 ++-
40 files changed, 561 insertions(+), 295 deletions(-)
----------------------------------------------------------------------
[25/34] incubator-ignite git commit: SHA1 & MD5 files fix
Posted by sb...@apache.org.
SHA1 & MD5 files fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/acbcd447
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/acbcd447
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/acbcd447
Branch: refs/heads/ignite-37
Commit: acbcd44771c29b435ef9678c69032f56215cccd6
Parents: 050f429
Author: avinogradov <av...@gridgain.com>
Authored: Mon May 25 16:00:44 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon May 25 16:00:44 2015 +0300
----------------------------------------------------------------------
pom.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/acbcd447/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f4510a7..8aa0ede 100644
--- a/pom.xml
+++ b/pom.xml
@@ -574,15 +574,26 @@
<failOnError>false</failOnError>
<target>
<mkdir dir="${basedir}/target/site" />
+
<copy file="${basedir}/target/${project.artifactId}-${project.version}-src.zip" tofile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip" failonerror="false" />
<copy file="${basedir}/target/${project.artifactId}-${project.version}-src.zip.asc" tofile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.asc" failonerror="false" />
<copy file="${basedir}/target/${project.artifactId}-${project.version}-src.zip.md5" tofile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" failonerror="false" />
<copy file="${basedir}/target/${project.artifactId}-${project.version}-src.zip.sha1" tofile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" failonerror="false" />
+
<copy todir="${basedir}/target/site">
<fileset dir="${basedir}/target/bin">
<include name="**/*" />
</fileset>
</copy>
+
+ <!-- appending filename to md5 and sha1 files. to be improved. -->
+ <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-fabric-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-fabric-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.md5" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-hadoop-${project.version}-bin.zip.sha1" append="true"> ${project.artifactId}-hadoop-${project.version}-bin.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.md5" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
+ <concat destfile="${basedir}/target/site/${project.artifactId}-${project.version}-src.zip.sha1" append="true"> ${project.artifactId}-${project.version}-src.zip</concat>
+
<copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
</target>
</configuration>
[03/34] incubator-ignite git commit: "Version changed
Posted by sb...@apache.org.
"Version changed
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/76805134
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/76805134
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/76805134
Branch: refs/heads/ignite-37
Commit: 76805134441786abc5a27d23f0f40a028a24e740
Parents: f1b5ecd
Author: Ignite Teamcity <ig...@apache.org>
Authored: Tue May 19 12:14:29 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Tue May 19 12:14:29 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/resources/ignite.properties | 2 +-
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 6 +++---
32 files changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 3ac5a80..e09d7cd 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>ignite-examples</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 38a593e..9541928 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aop</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 83eced2..88e6358 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aws</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index c90173f..0098cc8 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-clients</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index ddc2858..2c3cba5 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>ignite-cloud</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<properties>
<jcloud.version>1.9.0</jcloud.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 15c3d5d..1e521f8 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-codegen</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index e3a7b97..e110a2d 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-core</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 432b2ad..80bffed 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
# limitations under the License.
#
-ignite.version=1.0.3
+ignite.version=1.0.4
ignite.build=0
ignite.revision=DEV
ignite.rel.date=01011970
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index cc6843f..32bcbd1 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-p2p</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 980db73..06feea3 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-uri</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index e4198b8..a5e1061 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-gce</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index dc7a454..113e4ce 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-geospatial</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index fba22c1..ca83bcb 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hadoop</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index f7d0443..ae5b481 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hibernate</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index e808ca3..c19f839 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-indexing</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index 061e27c..38847ca 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jcl</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index b6e0928..e0d21b5 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jta</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index d855911..6b3e6ba 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-log4j</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 95800ac..1c60fda 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-rest-http</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 3160cc2..a6a3de2 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-scalar</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 4cda672..3234d2c 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schedule</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 51b5ff0..2320b2f 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schema-import</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index d7109c2..dd3ddfe 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-slf4j</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 26dfc14..be40124 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spring</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 82a7983..c1db109 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-ssh</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index b38de40..9d77c37 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-tools</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index c711902..2cbffab 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-urideploy</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index a70dd2c..977ef18 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-console</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index 96e7b17..4834d44 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-plugins</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<!-- Ignite dependencies -->
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 92f9aa7..6dec7e6 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-web</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 7298f6b..2e43355 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-yardstick</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<properties>
<yardstick.version>0.7.0</yardstick.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76805134/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cb790bd..3b498a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.apache.ignite</groupId>
<artifactId>ignite</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.5-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
@@ -300,7 +300,7 @@
<substitution expression="${project.version}" />
</replaceregexp>
- <chmod dir="${basedir}/target/release-package" perm="755" includes="**/*.sh"/>
+ <chmod dir="${basedir}/target/release-package" perm="755" includes="**/*.sh" />
<zip destfile="${basedir}/target/bin/${ignite.zip.pattern}.zip" encoding="UTF-8">
<zipfileset dir="${basedir}/target/release-package" prefix="${ignite.zip.pattern}" filemode="755">
@@ -575,7 +575,7 @@
<include name="**/*" />
</fileset>
</copy>
- <copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false"/>
+ <copy file="${basedir}/KEYS" todir="${basedir}/target/site" failonerror="false" />
</target>
</configuration>
</execution>
[08/34] incubator-ignite git commit: RandomEvictionPolicy cache size
test added
Posted by sb...@apache.org.
RandomEvictionPolicy cache size test added
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7349c34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7349c34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7349c34
Branch: refs/heads/ignite-37
Commit: d7349c34d803eaf31afb88b2cc13102d1c68fbed
Parents: 51d32fc
Author: agura <ag...@gridgain.com>
Authored: Thu May 21 17:37:18 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu May 21 17:37:18 2015 +0300
----------------------------------------------------------------------
.../RandomEvictionPolicyCacheSizeSelfTest.java | 72 ++++++++++++++++++++
.../IgniteCacheEvictionSelfTestSuite.java | 1 +
2 files changed, 73 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7349c34/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
new file mode 100644
index 0000000..e9e7228
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.cache.eviction.random;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.eviction.random.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+/**
+ * Random eviction policy cache size test.
+ */
+public class RandomEvictionPolicyCacheSizeSelfTest extends GridCommonAbstractTest {
+ /** Grid count. */
+ private static final int GRID_CNT = 3;
+
+ /** Keys count. */
+ private static final int KEYS_CNT = 50;
+
+ /** Policy max size. */
+ private static final int PLC_MAX_SIZE = 10;
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrids(GRID_CNT);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ CacheConfiguration ccfg = defaultCacheConfiguration();
+ ccfg.setNearConfiguration(null);
+ ccfg.setEvictionPolicy(new RandomEvictionPolicy(PLC_MAX_SIZE));
+
+ cfg.setCacheConfiguration(ccfg);
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testSize() throws Exception {
+ IgniteCache<Integer, Integer> cache = grid(0).cache(null);
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.put(i, i);
+
+ assertEquals(PLC_MAX_SIZE * GRID_CNT, cache.size());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7349c34/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 8918a29..0852496 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -44,6 +44,7 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(GridCacheLruEvictionPolicySelfTest.class));
suite.addTest(new TestSuite(GridCacheLruNearEvictionPolicySelfTest.class));
suite.addTest(new TestSuite(GridCacheNearOnlyLruNearEvictionPolicySelfTest.class));
+ suite.addTest(new TestSuite(RandomEvictionPolicyCacheSizeSelfTest.class));
suite.addTest(new TestSuite(GridCacheRandomEvictionPolicySelfTest.class));
suite.addTest(new TestSuite(GridCacheNearEvictionSelfTest.class));
suite.addTest(new TestSuite(GridCacheAtomicNearEvictionSelfTest.class));
[16/34] incubator-ignite git commit: # Added interop checked
exception.
Posted by sb...@apache.org.
# Added interop checked exception.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0acdc3de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0acdc3de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0acdc3de
Branch: refs/heads/ignite-37
Commit: 0acdc3de22932f0bf1e12764812fd5fcad603f23
Parents: 02f3a12
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri May 22 15:34:31 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri May 22 15:34:31 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropException.java | 65 ++++++++++++++++++++
1 file changed, 65 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc3de/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
new file mode 100644
index 0000000..095c650
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.interop;
+
+import org.apache.ignite.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Interop checked exception.
+ */
+public class InteropException extends IgniteCheckedException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Create empty exception.
+ */
+ public InteropException() {
+ // No-op.
+ }
+
+ /**
+ * Creates new exception with given error message.
+ *
+ * @param msg Error message.
+ */
+ public InteropException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Creates new grid exception with given throwable as a cause and
+ * source of error message.
+ *
+ * @param cause Non-null throwable cause.
+ */
+ public InteropException(Throwable cause) {
+ this(cause.getMessage(), cause);
+ }
+
+ /**
+ * Creates new exception with given error message and optional nested exception.
+ *
+ * @param msg Error message.
+ * @param cause Optional nested exception (can be {@code null}).
+ */
+ public InteropException(String msg, @Nullable Throwable cause) {
+ super(msg, cause);
+ }
+}
[19/34] incubator-ignite git commit: # ignie-456
Posted by sb...@apache.org.
# ignie-456
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a2535337
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a2535337
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a2535337
Branch: refs/heads/ignite-37
Commit: a25353377ef44de8a31d0c88ed0e8aee0d949167
Parents: 4929c7d
Author: null <null>
Authored: Fri May 22 16:24:52 2015 +0300
Committer: null <null>
Committed: Fri May 22 16:24:52 2015 +0300
----------------------------------------------------------------------
.gitignore | 3 +-
dev-tools/slurp.sh | 74 +++++++++++++
dev-tools/src/main/groovy/jiraslurp.groovy | 132 +++++++++++++-----------
3 files changed, 150 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a2535337/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 296e130..3da8e4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,5 @@ atlassian-ide-plugin.xml
target
/libs/
pom-installed.xml
-git-patch-prop-local.sh
\ No newline at end of file
+git-patch-prop-local.sh
+/slurp.sh
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a2535337/dev-tools/slurp.sh
----------------------------------------------------------------------
diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh
new file mode 100644
index 0000000..bf1e91a
--- /dev/null
+++ b/dev-tools/slurp.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+# 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.
+#
+
+#
+# Copy this script file at root of ignite repo.
+# Fill all variables.
+#
+
+#
+# Default branch name. Need to use last version of "jiraslurp" scripts.
+#
+DEFAULT_BRANCH='ignite-sprint-5'
+
+#
+# TC URL. It is 10.30.0.229 for public TC from agents.
+#
+TC_URL='10.30.0.229'
+
+#
+# Jira user name to add comments aboyt triggered builds.
+#
+JIRA_USER='tc_commenter'
+
+#
+# Jira password.
+#
+JIRA_PWD=''
+
+#
+# TC user which have permissions to trigger new builds.
+#
+TASK_RUNNER_USER='task_runner'
+
+#
+# TC user password.
+#
+TASK_RUNNER_PWD=''
+
+#
+# Space separated logins of jira useres which were approved to auto triggering patches. Like 'user1 user2 user3'.
+#
+JIRA_CONTRIBUTORS=''
+
+git fetch
+
+git checkout ${DEFAULT_BRANCH}
+
+git pull
+
+export TC_URL=${TC_URL}
+export GIT_USER_NAME=${GIT_USER_NAME}
+export GIT_USER_EMAIL=${GIT_USER_EMAIL}
+export JIRA_USER=${JIRA_USER}
+export JIRA_PWD=${JIRA_PWD}
+export TASK_RUNNER_PWD=${TASK_RUNNER_PWD}
+export TASK_RUNNER_USER=${TASK_RUNNER_USER}
+export JIRA_CONTRIBUTORS=${JIRA_CONTRIBUTORS}
+
+gradle slurp -b dev-tools/build.gradle
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a2535337/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 32a6e43..d70bb32 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -14,6 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+def envVariable = { name, defaultVar ->
+ def res = System.getenv(name as String)
+
+ if (res == 'null' || res == null)
+ return defaultVar
+
+ res
+}
+
+def envVariableAsList = { name, defaultList ->
+ def list = System.getenv(name as String)?.split(' ') as List
+
+ if (list == 'null' || list == null)
+ return defaultList
+
+ list
+}
+
/**
* Parsing a special filter from Apache Ignite JIRA and picking up latest by ID
* attachments to process.
@@ -25,7 +44,12 @@ final validated_filename = "${System.getProperty("user.home")}/validated-jira.tx
final LAST_SUCCESSFUL_ARTIFACT = "guestAuth/repository/download/Ignite_PatchValidation_PatchChecker/.lastSuccessful/$validated_filename"
final def JIRA_CMD = System.getProperty('JIRA_COMMAND', 'jira.sh')
-LinkedHashMap<String, String> jirasAttached = [:]
+
+// Envariement variables.
+final def TC_PROJECT_NAME = envVariable("PROJECT_NAME", "Ignite")
+
+final def CONTRIBUTORS = envVariableAsList("JIRA_CONTRIBUTORS", [])
+final def TC_BUILD_EXCLUDE_LIST = envVariableAsList("BUILD_ID_EXCLUDES", ["Ignite_RunAllTestBuilds"])
/**
* Gets jiras for which test tasks were already triggered.
@@ -37,29 +61,12 @@ def readHistory = {
List validated_list = []
- // TODO do not use folder.
def validated = new File(validated_filename)
if (validated.exists()) {
- // TODO use commented way.
validated_list = validated.text.split('\n')
}
- // TODO use it way.
-// try {
-// def historyUrl = "http://${System.getenv('TC_URL')}/$LAST_SUCCESSFUL_ARTIFACT"
-//
-// println "Reading history from $historyUrl"
-//
-// validated_list = new URL(historyUrl).text.split('\n')
-//
-// println "Got validated list=$validated_list"
-// }
-// catch (Exception e) {
-// println e.getMessage()
-//
-// }
-
// Let's make sure the preserved history isn't too long
if (validated_list.size > MAX_HISTORY)
validated_list = validated_list[validated_list.size - MAX_HISTORY..validated_list.size - 1]
@@ -74,34 +81,46 @@ def readHistory = {
* @return <code>null</code> or <code>JIRA-###,latest_attach_id</code>
*/
def getLatestAttachment = { jira ->
- def latestAttr = jira.attachments[0].attachment.list().sort {
- it.@id.toInteger()
- }.reverse()[0]
+ def attachment = jira.attachments[0].attachment.list()
+ .sort { it.@id.toInteger() }
+ .reverse()
+ .find {
+ def fName = it.@name.toString()
+
+ CONTRIBUTORS.contains(it.@author as String) &&
+ (fName.endsWith(".patch") || fName.endsWith(".txt") || fName.endsWith(".diff"))
+ }
String row = null
- if (latestAttr == null) {
- println "${jira.key} is in invalid state: patch is not available"
+ if (attachment == null) {
+ println "${jira.key} is in invalid state: there was not found '.{patch/txt/diff}'-file from approved user."
}
else {
- row = "${jira.key},${latestAttr.@id}"
+ row = "${jira.key},${attachment.@id}"
}
}
-def checkForAttachments = {
+/**
+ * Checks all "Patch availiable" jiras on attached ".patch"-files from approved users.
+ */
+def findAttachments = {
+ // See https://issues.apache.org/jira/issues/?filter=12330308 (the same).
def JIRA_FILTER =
"https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/12330308/SearchRequest-12330308.xml?tempMax=100&field=key&field=attachments"
def rss = new XmlSlurper().parse(JIRA_FILTER)
List list = readHistory {}
+ LinkedHashMap<String, String> attachments = [:]
+
rss.channel.item.each { jira ->
String row = getLatestAttachment(jira)
if (row != null && !list.contains(row)) {
def pair = row.split(',')
- jirasAttached.put(pair[0] as String, pair[1] as String)
+ attachments.put(pair[0] as String, pair[1] as String)
list.add(row)
}
@@ -114,6 +133,8 @@ def checkForAttachments = {
validated.delete()
validated << list.join('\n')
+
+ attachments
}
/**
@@ -142,6 +163,8 @@ def applyPatch = { jira, attachementURL ->
def patchFile = new File("${jira}-${attachementURL}.patch")
try {
+ println "Getting patch content."
+
patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text
try {
@@ -163,7 +186,16 @@ def applyPatch = { jira, attachementURL ->
catch (Exception e) {
println "Patch was not applied successfully. Aborting patch applying."
- checkprocess "git am --abort".execute(null, new File("../"))
+ try {
+ checkprocess "git am --abort".execute(null, new File("../"))
+
+ print "Succsessfull: git am --abort."
+ }
+ catch (Exception e2) {
+ print "Error: git am --abort fails: "
+
+ e2.printStackTrace()
+ }
throw e;
}
@@ -181,19 +213,9 @@ def JIRA_xml = { jiranum ->
* Gets all builds from TC project.
*/
def getTestBuilds = { ->
- def projName = System.getenv('PROJECT_NAME')
-
- if (projName == null || projName == 'null')
- projName = "Ignite"
-
def tcURL = System.getenv('TC_URL')
- def excludeListProp = System.getenv('BUILD_ID_EXCLUDES')
- def excludeList = excludeListProp?.split(' ') as List
- if (excludeList == null || excludeList == 'null')
- excludeList = ["Ignite_RunAllTestBuilds"]
-
- def project = new XmlSlurper().parse("http://$tcURL:80/guestAuth/app/rest/projects/id:$projName")
+ def project = new XmlSlurper().parse("http://$tcURL:80/guestAuth/app/rest/projects/id:$TC_PROJECT_NAME")
def buildIds = []
@@ -202,7 +224,7 @@ def getTestBuilds = { ->
for (int i = 0; i < count; i++) {
def id = project.buildTypes.buildType[i].@id
- if (excludeList == null || !excludeList.contains(id))
+ if (TC_BUILD_EXCLUDE_LIST == null || !TC_BUILD_EXCLUDE_LIST.contains(id))
buildIds.add(id)
}
@@ -316,10 +338,6 @@ def runAllTestBuilds = {builds, jiraNum ->
def build = new XmlSlurper().parseText(response)
- println "Triggered build: ${build.buildType.@name}"
- println "Triggered build url: ${build.@webUrl}"
- println "Triggered build branch: ${build.@branchName}"
-
triggeredBuilds.put(build.buildType.@name, build.@webUrl)
}
catch (Exception e) {
@@ -338,6 +356,16 @@ def runAllTestBuilds = {builds, jiraNum ->
/**
* Main.
+ *
+ * Modes:
+ * 1. "slurp" mode - triggers all TC test builds for all jiras with valid attachment
+ * (Jira in "patch availiable" state, there is attached file from approved user with "patch" extension)
+ * 2. "patchApply" mode - gets last valid patch file from given jira number and applies it.
+ * 3. "runAllBuilds" - triggers given jira number for all TC test builds.
+ *
+ * Main workflow:
+ * 1. run in "slurp" mode
+ * 2. each triggered build uses "patchApply" mode to apply latest valid patch.
*/
args.each {
println "Arg=$it"
@@ -349,14 +377,14 @@ args.each {
if (parameters.length >= 1 && parameters[0] == "slurp") {
println "Running in 'slurp' mode."
- checkForAttachments()
-
def builds = getTestBuilds()
println "Test builds to be triggered=$builds"
+ def attachments = findAttachments()
+
// For each ticket with new attachment, let's trigger remove build
- jirasAttached.each { k, v ->
+ attachments.each { k, v ->
// Trailing slash is important for download; only need to pass JIRA number
println "Triggering the test builds for: $k = $ATTACHMENT_URL/$v/"
@@ -401,15 +429,3 @@ args.each {
runAllTestBuilds(builds, jiraNum)
}
}
-
-/* Workflow:
- 1. download an attachment if JIRA num's set; otherwise get all latest attachments not mentioned in the
- validated-jira.txt file from the last successful build
- 2. trigger test build(s) parametrised by JIRA no.
- 3. test build will download JIRA's latest attachment and apply it to currently checked out repo;
- - build will fail with comment on JIRA if that can not apply
- - build will post error/success comment depends on the test results
-*/
-// TODO
-// - TC's test job needs to send a comment to JIRA
-// $JIRA_CMD -a addComment -s https://issues.apache.org/jira -u ignite-ci -p ci-of-1gnit3 --issue IGNITE-495 --comment "Trying latest version of the jira-cli"
[24/34] incubator-ignite git commit: ignite-sprint-4-7.0.6-1.0.6 - run
Posted by sb...@apache.org.
ignite-sprint-4-7.0.6-1.0.6 - run
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8977537d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8977537d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8977537d
Branch: refs/heads/ignite-37
Commit: 8977537d648403526be46bd892ccc581a9833769
Parents: fae8315
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon May 25 09:39:25 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon May 25 09:39:25 2015 +0300
----------------------------------------------------------------------
.../processors/query/h2/twostep/GridReduceQueryExecutor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8977537d/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 09a238f..50c30a5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -282,7 +282,7 @@ public class GridReduceQueryExecutor {
r.conn = (JdbcConnection)h2.connectionForSpace(space);
- // TODO Add topology version.
+ // TODO Add topology version.
ClusterGroup dataNodes = ctx.grid().cluster().forDataNodes(space);
if (cctx.isReplicated() || qry.explain()) {
[30/34] incubator-ignite git commit: Merge branches 'ignite-816' and
'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-816
Posted by sb...@apache.org.
Merge branches 'ignite-816' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-816
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c8086c9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c8086c9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c8086c9b
Branch: refs/heads/ignite-37
Commit: c8086c9b1341bbd898c892873c4b916b7a8e9a03
Parents: 882b6aa d2af9e2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue May 26 09:47:33 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue May 26 09:47:33 2015 +0700
----------------------------------------------------------------------
.gitignore | 3 +-
DEVNOTES.txt | 34 +-
LICENSE | 238 +
LICENSE.txt | 238 -
NOTICE | 12 +
NOTICE.txt | 12 -
assembly/release-base.xml | 10 +-
assembly/release-schema-import.xml | 50 +
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +
bin/include/build-classpath.sh | 71 +
bin/include/functions.sh | 2 +-
bin/include/target-classpath.bat | 46 -
bin/include/target-classpath.sh | 71 -
dev-tools/.gitignore | 2 +
dev-tools/build.gradle | 54 +
dev-tools/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 51017 bytes
.../gradle/wrapper/gradle-wrapper.properties | 6 +
dev-tools/gradlew | 164 +
dev-tools/slurp.sh | 66 +
dev-tools/src/main/groovy/jiraslurp.groovy | 487 ++
examples/pom.xml | 2 +-
.../streaming/StreamTransformerExample.java | 4 +-
.../streaming/StreamVisitorExample.java | 4 +-
.../ignite/examples/streaming/package-info.java | 1 -
.../streaming/wordcount/CacheConfig.java | 7 +-
.../streaming/wordcount/QueryWords.java | 12 +-
.../streaming/wordcount/StreamWords.java | 12 +-
.../streaming/wordcount/package-info.java | 1 -
.../socket/WordsSocketStreamerClient.java | 82 +
.../socket/WordsSocketStreamerServer.java | 124 +
.../wordcount/socket/package-info.java | 21 +
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../config/grid-client-config.properties | 50 +-
modules/clients/pom.xml | 2 +-
.../ClientPropertiesConfigurationSelfTest.java | 12 +-
.../ClientAbstractConnectivitySelfTest.java | 14 +
modules/cloud/pom.xml | 4 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 2 -
modules/codegen/pom.xml | 2 +-
.../ignite/codegen/MessageCodeGenerator.java | 4 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/java/META-INF/LICENSE | 238 +
modules/core/src/main/java/META-INF/NOTICE | 12 +
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../org/apache/ignite/IgniteJdbcDriver.java | 81 +-
.../internal/GridEventConsumeHandler.java | 26 +
.../apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 136 +-
.../client/GridClientConfiguration.java | 2 +-
.../internal/direct/DirectByteBufferStream.java | 4 +-
.../interop/InteropAwareEventFilter.java | 37 +
.../internal/interop/InteropBootstrap.java | 34 +
.../interop/InteropBootstrapFactory.java | 39 +
.../internal/interop/InteropException.java | 71 +
.../internal/interop/InteropIgnition.java | 166 +
.../interop/InteropLocalEventListener.java | 28 +
.../interop/InteropNoCallbackException.java | 50 +
.../internal/interop/InteropProcessor.java | 36 +
.../managers/communication/GridIoManager.java | 14 +-
.../communication/GridIoMessageFactory.java | 4 +-
.../GridLifecycleAwareMessageFilter.java | 5 +-
.../eventstorage/GridEventStorageManager.java | 29 +-
.../cache/DynamicCacheDescriptor.java | 16 +-
.../processors/cache/GridCacheAdapter.java | 589 +-
.../processors/cache/GridCacheContext.java | 7 +
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 320 +-
.../processors/cache/GridCacheMapEntry.java | 123 +-
.../processors/cache/GridCacheMessage.java | 8 +-
.../processors/cache/GridCacheMvccManager.java | 4 +-
.../GridCachePartitionExchangeManager.java | 7 +-
.../processors/cache/GridCacheProcessor.java | 189 +-
.../processors/cache/GridCacheProxyImpl.java | 24 -
.../processors/cache/GridCacheSwapManager.java | 215 +-
.../processors/cache/GridCacheTtlManager.java | 156 +-
.../processors/cache/GridCacheUtils.java | 6 +-
.../processors/cache/IgniteInternalCache.java | 27 -
...ridCacheOptimisticCheckPreparedTxFuture.java | 434 --
...idCacheOptimisticCheckPreparedTxRequest.java | 232 -
...dCacheOptimisticCheckPreparedTxResponse.java | 179 -
.../distributed/GridCacheTxRecoveryFuture.java | 506 ++
.../distributed/GridCacheTxRecoveryRequest.java | 261 +
.../GridCacheTxRecoveryResponse.java | 182 +
.../GridDistributedCacheAdapter.java | 210 +-
.../distributed/GridDistributedLockRequest.java | 111 +-
.../GridDistributedTxFinishRequest.java | 70 +-
.../distributed/GridDistributedTxMapping.java | 5 +-
.../GridDistributedTxPrepareRequest.java | 112 +-
.../GridDistributedTxRemoteAdapter.java | 22 +-
.../distributed/dht/GridDhtCacheAdapter.java | 22 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 -
.../distributed/dht/GridDhtLockRequest.java | 45 +-
.../dht/GridDhtOffHeapCacheEntry.java | 63 +
.../dht/GridDhtTransactionalCacheAdapter.java | 15 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 3 -
.../distributed/dht/GridDhtTxFinishRequest.java | 43 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 38 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 95 +-
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 100 +-
.../dht/GridDhtTxPrepareRequest.java | 60 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 8 +-
.../distributed/dht/GridNoStorageCacheMap.java | 4 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 7 +-
.../atomic/GridDhtAtomicOffHeapCacheEntry.java | 63 +
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 8 +
.../dht/atomic/GridNearAtomicUpdateFuture.java | 44 +-
.../dht/atomic/GridNearAtomicUpdateRequest.java | 36 +-
.../atomic/GridNearAtomicUpdateResponse.java | 18 +-
.../dht/colocated/GridDhtColocatedCache.java | 5 +-
.../colocated/GridDhtColocatedLockFuture.java | 37 +-
.../GridDhtColocatedOffHeapCacheEntry.java | 63 +
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 6 +
.../dht/preloader/GridDhtForceKeysResponse.java | 54 +-
.../GridDhtPartitionsExchangeFuture.java | 2 +-
.../distributed/near/GridNearCacheAdapter.java | 13 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetResponse.java | 8 +-
.../distributed/near/GridNearLockFuture.java | 11 -
.../distributed/near/GridNearLockRequest.java | 61 +-
.../near/GridNearOffHeapCacheEntry.java | 60 +
.../near/GridNearOptimisticTxPrepareFuture.java | 768 ++
.../GridNearPessimisticTxPrepareFuture.java | 347 +
.../near/GridNearTransactionalCache.java | 4 -
.../near/GridNearTxFinishRequest.java | 28 +-
.../cache/distributed/near/GridNearTxLocal.java | 109 +-
.../near/GridNearTxPrepareFuture.java | 1050 ---
.../near/GridNearTxPrepareFutureAdapter.java | 231 +
.../near/GridNearTxPrepareRequest.java | 52 +-
.../near/GridNearTxPrepareResponse.java | 28 +-
.../distributed/near/GridNearTxRemote.java | 24 +-
.../processors/cache/local/GridLocalCache.java | 8 +-
.../cache/local/GridLocalCacheEntry.java | 18 +
.../local/atomic/GridLocalAtomicCache.java | 27 +-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../cache/query/GridCacheSqlQuery.java | 2 +-
.../cache/query/GridCacheTwoStepQuery.java | 17 +
.../cache/transactions/IgniteInternalTx.java | 19 +-
.../transactions/IgniteTransactionsImpl.java | 4 +-
.../cache/transactions/IgniteTxAdapter.java | 76 +-
.../cache/transactions/IgniteTxEntry.java | 48 +-
.../cache/transactions/IgniteTxHandler.java | 106 +-
.../transactions/IgniteTxLocalAdapter.java | 185 +-
.../cache/transactions/IgniteTxLocalEx.java | 21 +-
.../cache/transactions/IgniteTxManager.java | 271 +-
.../datastreamer/DataStreamerImpl.java | 2 +
.../processors/igfs/IgfsDataManager.java | 3 +
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../internal/processors/igfs/IgfsUtils.java | 11 +-
.../offheap/GridOffHeapProcessor.java | 17 +
.../processors/resource/GridResourceField.java | 16 +-
.../processors/resource/GridResourceIoc.java | 389 +-
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 20 +-
.../ignite/internal/util/IgniteUtils.java | 28 +-
.../util/lang/GridComputeJobWrapper.java | 96 -
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../internal/util/nio/GridBufferedParser.java | 4 -
.../internal/util/nio/GridDelimitedParser.java | 91 +
.../util/nio/GridNioDelimitedBuffer.java | 106 +
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 +-
.../internal/visor/query/VisorQueryArg.java | 14 +-
.../internal/visor/query/VisorQueryJob.java | 2 +
.../apache/ignite/lang/IgniteAsyncSupport.java | 4 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 4 -
.../spi/discovery/tcp/TcpDiscoverySpi.java | 74 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 14 +-
.../org/apache/ignite/stream/StreamAdapter.java | 111 +
.../ignite/stream/StreamTupleExtractor.java | 33 +
.../stream/socket/SocketMessageConverter.java | 31 +
.../ignite/stream/socket/SocketStreamer.java | 218 +
.../ignite/stream/socket/package-info.java | 21 +
.../resources/META-INF/classnames.properties | 13 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/GridUpdateNotifierSelfTest.java | 21 +-
.../processors/cache/CacheGetFromJobTest.java | 110 +
.../cache/CacheOffheapMapEntrySelfTest.java | 168 +
.../cache/CacheRemoveAllSelfTest.java | 81 +
.../GridCacheAbstractFailoverSelfTest.java | 12 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +-
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/GridCacheSwapReloadSelfTest.java | 20 +-
.../IgniteCacheEntryListenerAbstractTest.java | 4 +-
.../cache/IgniteCacheNearLockValueSelfTest.java | 145 +
.../IgniteCacheP2pUnmarshallingErrorTest.java | 189 +
...gniteCacheP2pUnmarshallingNearErrorTest.java | 56 +
...CacheP2pUnmarshallingRebalanceErrorTest.java | 80 +
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 109 +
.../cache/IgniteCachePeekModesAbstractTest.java | 15 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +
...CacheLoadingConcurrentGridStartSelfTest.java | 163 +
.../GridCacheAbstractNodeRestartSelfTest.java | 101 +-
...GridCacheLoadingConcurrentGridStartTest.java | 154 -
.../distributed/GridCacheLockAbstractTest.java | 2 -
.../distributed/IgniteTxGetAfterStopTest.java | 131 +
...xOriginatingNodeFailureAbstractSelfTest.java | 2 +-
.../dht/GridCacheDhtPreloadSelfTest.java | 2 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 +
...achePartitionedNearDisabledLockSelfTest.java | 47 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...rDisabledPrimaryNodeFailureRecoveryTest.java | 31 +
...rtitionedPrimaryNodeFailureRecoveryTest.java | 31 +
...woBackupsPrimaryNodeFailureRecoveryTest.java | 37 +
...ePrimaryNodeFailureRecoveryAbstractTest.java | 533 ++
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
.../GridCachePartitionedNodeRestartTest.java | 4 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 +
...ePartitionedOptimisticTxNodeRestartTest.java | 4 +-
.../GridCachePartitionedTxSalvageSelfTest.java | 25 +-
.../near/IgniteCacheNearOnlyTxTest.java | 190 +
.../near/NoneRebalanceModeSelfTest.java | 67 +
.../GridCacheReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedLockSelfTest.java | 5 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 82 +
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
.../RandomEvictionPolicyCacheSizeSelfTest.java | 72 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 2 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../expiry/IgniteCacheTtlCleanupSelfTest.java | 85 +
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +
.../GridCacheLocalIsolatedNodesSelfTest.java | 18 +-
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +
.../igfs/IgfsClientCacheSelfTest.java | 132 +
.../processors/igfs/IgfsOneClientNodeTest.java | 133 +
.../processors/igfs/IgfsStreamsSelfTest.java | 2 +-
.../util/nio/GridNioDelimitedBufferTest.java | 112 +
...idFileSwapSpaceSpiMultithreadedLoadTest.java | 4 +-
.../tcp/TcpClientDiscoverySelfTest.java | 8 +
.../discovery/tcp/TcpDiscoveryRestartTest.java | 199 +
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 65 +-
.../stream/socket/SocketStreamerSelfTest.java | 315 +
.../ignite/stream/socket/package-info.java | 21 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +
.../IgniteCacheEvictionSelfTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 10 +-
.../IgniteCacheFullApiSelfTestSuite.java | 18 +
...gniteCacheP2pUnmarshallingErrorTestSuit.java | 41 +
.../testsuites/IgniteCacheRestartTestSuite.java | 11 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 296 +-
.../testsuites/IgniteCacheTestSuite2.java | 144 +
.../testsuites/IgniteCacheTestSuite3.java | 142 +
.../testsuites/IgniteCacheTestSuite4.java | 135 +
.../IgniteCacheTxRecoverySelfTestSuite.java | 4 +
.../ignite/testsuites/IgniteIgfsTestSuite.java | 3 +
.../testsuites/IgniteStreamTestSuite.java | 39 +
.../testsuites/IgniteUtilSelfTestSuite.java | 1 +
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 4 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
.../processors/hadoop/v2/HadoopV2Context.java | 10 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 4 +
.../processors/query/h2/sql/GridSqlQuery.java | 20 +
.../query/h2/sql/GridSqlQueryParser.java | 10 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 11 +-
.../processors/query/h2/sql/GridSqlSelect.java | 2 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 3 +
.../h2/twostep/GridReduceQueryExecutor.java | 119 +-
.../cache/GridCacheOffHeapAndSwapSelfTest.java | 11 +-
.../cache/GridCacheOffHeapSelfTest.java | 11 +-
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 +
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 21 +
...niteCacheP2pUnmarshallingQueryErrorTest.java | 56 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 +-
.../IgniteCacheQuerySelfTestSuite.java | 4 +
.../IgniteCacheWithIndexingTestSuite.java | 2 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../processors/cache/jta/CacheJtaManager.java | 4 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
.../ignite/scalar/ScalarConversions.scala | 8 -
.../scalar/tests/ScalarCacheQueriesSpec.scala | 154 +-
.../ignite/scalar/tests/ScalarCacheSpec.scala | 23 +-
.../scalar/tests/ScalarConversionsSpec.scala | 43 +-
.../scalar/tests/ScalarProjectionSpec.scala | 128 +-
.../scalar/tests/ScalarReturnableSpec.scala | 41 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 8 +-
.../ignite/schema/generator/CodeGenerator.java | 47 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 4 +-
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +-
.../visor/commands/VisorArgListSpec.scala | 60 +-
.../commands/VisorFileNameCompleterSpec.scala | 34 +-
.../commands/ack/VisorAckCommandSpec.scala | 20 +-
.../commands/alert/VisorAlertCommandSpec.scala | 68 +-
.../cache/VisorCacheClearCommandSpec.scala | 48 +-
.../commands/cache/VisorCacheCommandSpec.scala | 66 +-
.../config/VisorConfigurationCommandSpec.scala | 8 +-
.../cswap/VisorCacheSwapCommandSpec.scala | 24 +-
.../deploy/VisorDeployCommandSpec.scala | 10 +-
.../disco/VisorDiscoveryCommandSpec.scala | 46 +-
.../events/VisorEventsCommandSpec.scala | 28 +-
.../visor/commands/gc/VisorGcCommandSpec.scala | 30 +-
.../commands/help/VisorHelpCommandSpec.scala | 57 +-
.../commands/kill/VisorKillCommandSpec.scala | 58 +-
.../commands/log/VisorLogCommandSpec.scala | 10 +-
.../commands/mem/VisorMemoryCommandSpec.scala | 77 +-
.../commands/node/VisorNodeCommandSpec.scala | 22 +-
.../commands/open/VisorOpenCommandSpec.scala | 16 +-
.../commands/ping/VisorPingCommandSpec.scala | 16 +-
.../commands/start/VisorStartCommandSpec.scala | 126 +-
.../commands/tasks/VisorTasksCommandSpec.scala | 112 +-
.../commands/top/VisorTopologyCommandSpec.scala | 52 +-
.../commands/vvm/VisorVvmCommandSpec.scala | 30 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../config/benchmark-client-mode.properties | 89 +
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 5 +
pom.xml | 318 +-
354 files changed, 16152 insertions(+), 12111 deletions(-)
----------------------------------------------------------------------
[09/34] incubator-ignite git commit: Merge branch 'ignite-sprint-5'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-sprint-5
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4929c7dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4929c7dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4929c7dd
Branch: refs/heads/ignite-37
Commit: 4929c7ddb7407228c0f63ebdacfcc6f6227e67bc
Parents: d7349c3 6adbe76
Author: agura <ag...@gridgain.com>
Authored: Thu May 21 17:37:48 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu May 21 17:37:48 2015 +0300
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[20/34] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/60936193
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/60936193
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/60936193
Branch: refs/heads/ignite-37
Commit: 609361932fa02880a4555788c4820ca19d742a8a
Parents: a253533 c2734e4
Author: null <null>
Authored: Fri May 22 16:25:18 2015 +0300
Committer: null <null>
Committed: Fri May 22 16:25:18 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropException.java | 65 ++++++++++++++
.../processors/cache/GridCacheAdapter.java | 16 +++-
.../processors/hadoop/v2/HadoopV2Context.java | 10 +--
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../config/benchmark-client-mode.properties | 89 ++++++++++++++++++++
5 files changed, 172 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[31/34] incubator-ignite git commit: Merge branch 'ignite-816' into
ignite-sprint-5
Posted by sb...@apache.org.
Merge branch 'ignite-816' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f39a3a90
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f39a3a90
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f39a3a90
Branch: refs/heads/ignite-37
Commit: f39a3a9076581485bd7335d0f350302944e7984c
Parents: f8f2181 c8086c9
Author: Andrey <an...@gridgain.com>
Authored: Tue May 26 10:15:30 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue May 26 10:15:30 2015 +0700
----------------------------------------------------------------------
.../src/main/scala/org/apache/ignite/visor/visor.scala | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f39a3a90/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
[07/34] incubator-ignite git commit: GG-10284
Posted by sb...@apache.org.
GG-10284
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6adbe76d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6adbe76d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6adbe76d
Branch: refs/heads/ignite-37
Commit: 6adbe76ddd9e18e1951675315b0824ea324bd092
Parents: 51d32fc
Author: avinogradov <av...@gridgain.com>
Authored: Thu May 21 17:37:03 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Thu May 21 17:37:03 2015 +0300
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6adbe76d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index abd3ab8..f4510a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
</parent>
<groupId>org.apache.ignite</groupId>
- <artifactId>ignite</artifactId>
+ <artifactId>apache-ignite</artifactId>
<version>1.0.7-SNAPSHOT</version>
<packaging>pom</packaging>
[22/34] incubator-ignite git commit: # One more interop exception.
Posted by sb...@apache.org.
# One more interop exception.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6ba171f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6ba171f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6ba171f2
Branch: refs/heads/ignite-37
Commit: 6ba171f2d60cf878bede42e27a4b0a0ee58948cd
Parents: 6093619
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri May 22 19:25:30 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri May 22 19:25:30 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropException.java | 6 +++
.../interop/InteropNoCallbackException.java | 50 ++++++++++++++++++++
2 files changed, 56 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ba171f2/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
index 095c650..d74b9d4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropException.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.interop;
import org.apache.ignite.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
import org.jetbrains.annotations.*;
/**
@@ -62,4 +63,9 @@ public class InteropException extends IgniteCheckedException {
public InteropException(String msg, @Nullable Throwable cause) {
super(msg, cause);
}
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(InteropException.class, this);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ba171f2/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropNoCallbackException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropNoCallbackException.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropNoCallbackException.java
new file mode 100644
index 0000000..6fd614a
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropNoCallbackException.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.interop;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+/**
+ * Exception raised when interop callback is not set in native platform.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public class InteropNoCallbackException extends InteropException {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Constructor.
+ */
+ public InteropNoCallbackException() {
+ // No-op.
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param msg Message.
+ */
+ public InteropNoCallbackException(String msg) {
+ super(msg);
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(InteropNoCallbackException.class, this);
+ }
+}
[23/34] incubator-ignite git commit: #[IGNITE-928]: Array out of
bounds in IgniteUtils.filterReachable
Posted by sb...@apache.org.
#[IGNITE-928]: Array out of bounds in IgniteUtils.filterReachable
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/050f4292
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/050f4292
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/050f4292
Branch: refs/heads/ignite-37
Commit: 050f4292f3526d2306336383c6e9e5b0d6df638e
Parents: 6ba171f
Author: iveselovskiy <iv...@gridgain.com>
Authored: Fri May 22 21:40:06 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Fri May 22 21:40:06 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 14 ++++++++++++++
.../org/apache/ignite/internal/util/IgniteUtils.java | 6 ++++--
2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/050f4292/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
index 7272b2c..5aec7e5 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.client.integration;
import org.apache.ignite.*;
import org.apache.ignite.internal.client.*;
+import org.apache.ignite.internal.util.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
@@ -123,6 +124,19 @@ public abstract class ClientAbstractConnectivitySelfTest extends GridCommonAbstr
}
/**
+ * Simple test of address list filtering.
+ * @throws Exception
+ */
+ public void testResolveReachableOneAddress() throws Exception {
+ InetAddress addr = InetAddress.getByAddress(new byte[] {127, 0, 0, 1} );
+
+ List <InetAddress> filtered = IgniteUtils.filterReachable(Collections.singletonList(addr));
+
+ assertEquals(1, filtered.size());
+ assertEquals(addr, filtered.get(0));
+ }
+
+ /**
* Tests correct behavior in case of 1 REST-enabled node
* with explicitly specified loopback address setting.
*
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/050f4292/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 673287d..0932212 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -1532,8 +1532,10 @@ public abstract class IgniteUtils {
return Collections.emptyList();
if (addrs.size() == 1) {
- if (reachable(addrs.get(1), reachTimeout))
- return Collections.singletonList(addrs.get(1));
+ InetAddress addr = addrs.get(0);
+
+ if (reachable(addr, reachTimeout))
+ return Collections.singletonList(addr);
return Collections.emptyList();
}
[27/34] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/edf6ffc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/edf6ffc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/edf6ffc4
Branch: refs/heads/ignite-37
Commit: edf6ffc4f2b2a0bf4999d423a03a060de66fc56b
Parents: 515d54c acbcd44
Author: null <null>
Authored: Mon May 25 16:29:34 2015 +0300
Committer: null <null>
Committed: Mon May 25 16:29:34 2015 +0300
----------------------------------------------------------------------
.../ClientAbstractConnectivitySelfTest.java | 14 ++++++
.../internal/interop/InteropException.java | 6 +++
.../interop/InteropNoCallbackException.java | 50 ++++++++++++++++++++
.../ignite/internal/util/IgniteUtils.java | 6 ++-
pom.xml | 11 +++++
5 files changed, 85 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[34/34] incubator-ignite git commit: ignite-37 Improve offheap
metrics for cache
Posted by sb...@apache.org.
ignite-37 Improve offheap metrics for cache
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/95698790
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/95698790
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/95698790
Branch: refs/heads/ignite-37
Commit: 956987900ce683850e1274a6fa23593f5d912be4
Parents: d70dbd4
Author: agura <ag...@gridgain.com>
Authored: Thu Apr 30 20:53:53 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue May 26 12:57:56 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/cache/CacheMetrics.java | 187 +++++++--
.../internal/managers/GridManagerAdapter.java | 59 +--
.../swapspace/GridSwapSpaceManager.java | 147 ++++---
.../processors/cache/CacheMetricsImpl.java | 305 +++++++++++++-
.../cache/CacheMetricsMXBeanImpl.java | 100 +++++
.../processors/cache/CacheMetricsSnapshot.java | 380 +++++++++++++----
.../processors/cache/GridCacheSwapManager.java | 152 +++----
.../offheap/GridOffHeapProcessor.java | 105 +++--
.../ignite/mxbean/CacheMetricsMXBean.java | 80 ++++
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 35 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 47 ---
.../spi/swapspace/file/FileSwapSpaceSpi.java | 8 +-
.../swapspace/GridSwapSpaceManagerSelfTest.java | 44 +-
...CacheLocalOffHeapAndSwapMetricsSelfTest.java | 412 +++++++++++++++++++
.../testframework/GridSpiTestContext.java | 25 +-
.../IgniteCacheMetricsSelfTestSuite.java | 1 +
16 files changed, 1616 insertions(+), 471 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/cache/CacheMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheMetrics.java
index 0d87326..799aace 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheMetrics.java
@@ -30,21 +30,21 @@ public interface CacheMetrics {
/**
* The number of get requests that were satisfied by the cache.
*
- * @return the number of hits
+ * @return The number of hits.
*/
public long getCacheHits();
/**
* This is a measure of cache efficiency.
*
- * @return the percentage of successful hits, as a decimal e.g 75.
+ * @return The percentage of successful hits, as a decimal e.g 75.
*/
public float getCacheHitPercentage();
/**
* A miss is a get request that is not satisfied.
*
- * @return the number of misses
+ * @return The number of misses.
*/
public long getCacheMisses();
@@ -52,7 +52,7 @@ public interface CacheMetrics {
* Returns the percentage of cache accesses that did not find a requested entry
* in the cache.
*
- * @return the percentage of accesses that failed to find anything
+ * @return The percentage of accesses that failed to find anything.
*/
public float getCacheMissPercentage();
@@ -60,14 +60,14 @@ public interface CacheMetrics {
* The total number of requests to the cache. This will be equal to the sum of
* the hits and misses.
*
- * @return the number of gets
+ * @return The number of gets.
*/
public long getCacheGets();
/**
* The total number of puts to the cache.
*
- * @return the number of puts
+ * @return The number of puts.
*/
public long getCachePuts();
@@ -75,7 +75,7 @@ public interface CacheMetrics {
* The total number of removals from the cache. This does not include evictions,
* where the cache itself initiates the removal to make space.
*
- * @return the number of removals
+ * @return The number of removals.
*/
public long getCacheRemovals();
@@ -84,28 +84,28 @@ public interface CacheMetrics {
* initiated by the cache itself to free up space. An eviction is not treated as
* a removal and does not appear in the removal counts.
*
- * @return the number of evictions
+ * @return The number of evictions.
*/
public long getCacheEvictions();
/**
* The mean time to execute gets.
*
- * @return the time in µs
+ * @return The time in µs.
*/
public float getAverageGetTime();
/**
* The mean time to execute puts.
*
- * @return the time in µs
+ * @return The time in µs.
*/
public float getAveragePutTime();
/**
* The mean time to execute removes.
*
- * @return the time in µs
+ * @return The time in µs.
*/
public float getAverageRemoveTime();
@@ -113,7 +113,7 @@ public interface CacheMetrics {
/**
* The mean time to execute tx commit.
*
- * @return the time in µs
+ * @return The time in µs.
*/
public float getAverageTxCommitTime();
@@ -124,7 +124,6 @@ public interface CacheMetrics {
*/
public float getAverageTxRollbackTime();
-
/**
* Gets total number of transaction commits.
*
@@ -154,6 +153,62 @@ public interface CacheMetrics {
public long getOverflowSize();
/**
+ * The total number of get requests to the off-heap memory.
+ *
+ * @return The number of gets.
+ */
+ public long getOffHeapGets();
+
+ /**
+ * The total number of put requests to the off-heap memory.
+ *
+ * @return The number of puts.
+ */
+ public long getOffHeapPuts();
+
+ /**
+ * The total number of removals from the off-heap memory. This does not include evictions.
+ *
+ * @return The number of removals.
+ */
+ public long getOffHeapRemovals();
+
+ /**
+ * The total number of evictions from the off-heap memory.
+ *
+ * @return The number of evictions.
+ */
+ public long getOffHeapEvictions();
+
+ /**
+ * The number of get requests that were satisfied by the off-heap memory.
+ *
+ * @return The off-heap hits number.
+ */
+ public long getOffHeapHits();
+
+ /**
+ * Gets the percentage of hits on off-heap memory.
+ *
+ * @return The percentage of hits on off-heap memory.
+ */
+ public float getOffHeapHitPercentage();
+
+ /**
+ * A miss is a get request that is not satisfied by off-heap memory.
+ *
+ * @return The off-heap misses number.
+ */
+ public long getOffHeapMisses();
+
+ /**
+ * Gets the percentage of misses on off-heap memory.
+ *
+ * @return The percentage of misses on off-heap memory.
+ */
+ public float getOffHeapMissPercentage();
+
+ /**
* Gets number of entries stored in off-heap memory.
*
* @return Number of entries stored in off-heap memory.
@@ -161,6 +216,20 @@ public interface CacheMetrics {
public long getOffHeapEntriesCount();
/**
+ * Gets number of primary entries stored in off-heap memory.
+ *
+ * @return Number of primary entries stored in off-heap memory.
+ */
+ public long getOffHeapPrimaryEntriesCount();
+
+ /**
+ * Gets number of backup entries stored in off-heap memory.
+ *
+ * @return Number of backup entries stored in off-heap memory.
+ */
+ public long getOffHeapBackupEntriesCount();
+
+ /**
* Gets memory size allocated in off-heap.
*
* @return Memory size allocated in off-heap.
@@ -168,6 +237,76 @@ public interface CacheMetrics {
public long getOffHeapAllocatedSize();
/**
+ * Gets off-heap memory maximum size.
+ *
+ * @return Off-heap memory maximum size.
+ */
+ public long getOffHeapMaxSize();
+
+ /**
+ * The total number of get requests to the swap.
+ *
+ * @return The number of gets.
+ */
+ public long getSwapGets();
+
+ /**
+ * The total number of put requests to the swap.
+ *
+ * @return The number of puts.
+ */
+ public long getSwapPuts();
+
+ /**
+ * The total number of removals from the swap.
+ *
+ * @return The number of removals.
+ */
+ public long getSwapRemovals();
+
+ /**
+ * The number of get requests that were satisfied by the swap.
+ *
+ * @return The swap hits number.
+ */
+ public long getSwapHits();
+
+ /**
+ * A miss is a get request that is not satisfied by swap.
+ *
+ * @return The swap misses number.
+ */
+ public long getSwapMisses();
+
+ /**
+ * Gets number of entries stored in swap.
+ *
+ * @return Number of entries stored in swap.
+ */
+ public long getSwapEntriesCount();
+
+ /**
+ * Gets size of swap.
+ *
+ * @return Size of swap.
+ */
+ public long getSwapSize();
+
+ /**
+ * Gets the percentage of hits on swap.
+ *
+ * @return The percentage of hits on swap.
+ */
+ public float getSwapHitPercentage();
+
+ /**
+ * Gets the percentage of misses on swap.
+ *
+ * @return The percentage of misses on swap.
+ */
+ public float getSwapMissPercentage();
+
+ /**
* Gets number of non-{@code null} values in the cache.
*
* @return Number of non-{@code null} values in the cache.
@@ -184,7 +323,7 @@ public interface CacheMetrics {
/**
* Returns {@code true} if this cache is empty.
*
- * @return {@code true} if this cache is empty.
+ * @return {@code True} if this cache is empty.
*/
public boolean isEmpty();
@@ -294,7 +433,7 @@ public interface CacheMetrics {
public int getTxDhtRolledbackVersionsSize();
/**
- * Returns {@code True} if write-behind is enabled.
+ * Returns {@code true} if write-behind is enabled.
*
* @return {@code True} if write-behind is enabled.
*/
@@ -372,16 +511,16 @@ public interface CacheMetrics {
/**
* Determines the required type of keys for this {@link Cache}, if any.
*
- * @return the fully qualified class name of the key type,
- * or "java.lang.Object" if the type is undefined.
+ * @return The fully qualified class name of the key type,
+ * or {@code "java.lang.Object"} if the type is undefined.
*/
public String getKeyType();
/**
* Determines the required type of values for this {@link Cache}, if any.
*
- * @return the fully qualified class name of the value type,
- * or "java.lang.Object" if the type is undefined.
+ * @return The fully qualified class name of the value type,
+ * or {@code "java.lang.Object"} if the type is undefined.
*/
public String getValueType();
@@ -407,7 +546,7 @@ public interface CacheMetrics {
* <p>
* The default value is {@code true}.
*
- * @return true if the cache is store by value
+ * @return {@code True} if the cache is store by value.
*/
public boolean isStoreByValue();
@@ -416,7 +555,7 @@ public interface CacheMetrics {
* <p>
* The default value is {@code false}.
*
- * @return true if statistics collection is enabled
+ * @return {@code True} if statistics collection is enabled.
*/
public boolean isStatisticsEnabled();
@@ -425,7 +564,7 @@ public interface CacheMetrics {
* <p>
* The default value is {@code false}.
*
- * @return true if management is enabled
+ * @return {@code true} if management is enabled.
*/
public boolean isManagementEnabled();
@@ -434,7 +573,7 @@ public interface CacheMetrics {
* <p>
* The default value is {@code false}
*
- * @return {@code true} when a {@link Cache} is in
+ * @return {@code True} when a {@link Cache} is in
* "read-through" mode.
* @see CacheLoader
*/
@@ -448,7 +587,7 @@ public interface CacheMetrics {
* <p>
* The default value is {@code false}
*
- * @return {@code true} when a {@link Cache} is in "write-through" mode.
+ * @return {@code True} when a {@link Cache} is in "write-through" mode.
* @see CacheWriter
*/
public boolean isWriteThrough();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index c93c059..1eb7143 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -23,7 +23,6 @@ import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.managers.eventstorage.*;
-import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
@@ -31,7 +30,7 @@ import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.plugin.security.*;
import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.swapspace.*;
+
import org.jetbrains.annotations.*;
import javax.cache.expiry.*;
@@ -439,46 +438,10 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
return ctx.cache().cache(cacheName).containsKey(key);
}
- @Override public void writeToSwap(String spaceName, Object key, @Nullable Object val,
- @Nullable ClassLoader ldr) {
- assert ctx.swap().enabled();
-
- try {
- ctx.swap().write(spaceName, key, val, ldr);
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
- }
-
- @SuppressWarnings({"unchecked"})
- @Nullable @Override public <T> T readFromSwap(String spaceName, SwapKey key,
- @Nullable ClassLoader ldr) {
- try {
- assert ctx.swap().enabled();
-
- return ctx.swap().readValue(spaceName, key, ldr);
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
- }
-
@Override public int partition(String cacheName, Object key) {
return ctx.cache().cache(cacheName).affinity().partition(key);
}
- @Override public void removeFromSwap(String spaceName, Object key, @Nullable ClassLoader ldr) {
- try {
- assert ctx.swap().enabled();
-
- ctx.swap().remove(spaceName, key, null, ldr);
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
- }
-
@Override public IgniteNodeValidationResult validateNode(ClusterNode node) {
for (GridComponent comp : ctx) {
IgniteNodeValidationResult err = comp.validateNode(node);
@@ -508,26 +471,6 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
}
}
- @SuppressWarnings("unchecked")
- @Nullable @Override public <V> V readValueFromOffheapAndSwap(@Nullable String spaceName,
- Object key, @Nullable ClassLoader ldr) {
- try {
- IgniteInternalCache<Object, V> cache = ctx.cache().cache(spaceName);
-
- GridCacheContext cctx = cache.context();
-
- if (cctx.isNear())
- cctx = cctx.near().dht().context();
-
- GridCacheSwapEntry e = cctx.swap().read(cctx.toCacheKeyObject(key), true, true);
-
- return e != null ? CU.<V>value(e.value(), cctx, true) : null;
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
- }
-
@Override public MessageFormatter messageFormatter() {
return ctx.io().formatter();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
index e62e43f..cf8747d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.*;
+import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.internal.*;
@@ -138,20 +139,28 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* Reads value from swap.
*
* @param spaceName Space name.
+ * @param part Partition.
* @param key Key.
- * @param ldr Class loader (optional).
+ * @param cctx Cache context.
* @return Value.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public byte[] read(@Nullable String spaceName, SwapKey key, @Nullable ClassLoader ldr)
+ @Nullable public byte[] read(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
throws IgniteCheckedException {
assert key != null;
try {
- return getSpi().read(spaceName, key, context(ldr));
+ byte[] bytes = getSpi().read(spaceName, new SwapKey(key.value(cctx.cacheObjectContext(), false), part,
+ key.valueBytes(cctx.cacheObjectContext())), context(cctx.deploy().globalLoader()));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRead(bytes != null);
+
+ return bytes;
}
catch (IgniteSpiException e) {
- throw new IgniteCheckedException("Failed to read from swap space [space=" + spaceName + ", key=" + key + ']', e);
+ throw new IgniteCheckedException("Failed to read from swap space [space=" + spaceName +
+ ", key=" + key + ']', e);
}
}
@@ -159,35 +168,43 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* Reads value from swap.
*
* @param spaceName Space name.
- * @param key Swap key.
- * @param ldr Class loader (optional).
+ * @param part Partition.
+ * @param key Key.
+ * @param cctx Cache context.
* @return Value.
* @throws IgniteCheckedException If failed.
*/
@SuppressWarnings({"unchecked"})
- @Nullable public <T> T readValue(@Nullable String spaceName, SwapKey key, @Nullable ClassLoader ldr)
+ @Nullable public <T> T readValue(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
throws IgniteCheckedException {
assert key != null;
- return unmarshal(read(spaceName, key, ldr), ldr);
+ return unmarshal(read(spaceName, part, key, cctx), cctx.deploy().globalLoader());
}
/**
* Writes value to swap.
*
* @param spaceName Space name.
+ * @param part Partition.
* @param key Key.
* @param val Value.
- * @param ldr Class loader (optional).
+ * @param cctx Cache context.
* @throws IgniteCheckedException If failed.
*/
- public void write(@Nullable String spaceName, SwapKey key, byte[] val, @Nullable ClassLoader ldr)
+ public void write(@Nullable String spaceName, int part, KeyCacheObject key, byte[] val, GridCacheContext cctx)
throws IgniteCheckedException {
assert key != null;
assert val != null;
try {
- getSpi().store(spaceName, key, val, context(ldr));
+ SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false), part,
+ key.valueBytes(cctx.cacheObjectContext()));
+
+ getSpi().store(spaceName, swapKey, val, context(cctx.deploy().globalLoader()));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapWrite();
}
catch (IgniteSpiException e) {
throw new IgniteCheckedException("Failed to write to swap space [space=" + spaceName + ", key=" + key +
@@ -199,51 +216,81 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* Writes batch to swap.
*
* @param spaceName Space name.
- * @param batch Swapped entries.
- * @param ldr Class loader (optional).
+ * @param swapped Swapped entries.
+ * @param cctx Cache context.
* @throws IgniteCheckedException If failed.
*/
- public <K, V> void writeAll(String spaceName, Map<SwapKey, byte[]> batch,
- @Nullable ClassLoader ldr) throws IgniteCheckedException {
- getSpi().storeAll(spaceName, batch, context(ldr));
+ public void writeAll(String spaceName, Iterable<GridCacheBatchSwapEntry> swapped, GridCacheContext cctx)
+ throws IgniteCheckedException {
+ Map<SwapKey, byte[]> batch = new LinkedHashMap<>();
+
+ int cnt = 0;
+
+ for (GridCacheBatchSwapEntry entry : swapped) {
+ SwapKey swapKey = new SwapKey(entry.key().value(cctx.cacheObjectContext(), false),
+ entry.partition(),
+ entry.key().valueBytes(cctx.cacheObjectContext()));
+
+ batch.put(swapKey, entry.marshal());
+
+ cnt++;
+ }
+
+ getSpi().storeAll(spaceName, batch, context(cctx.deploy().globalLoader()));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapWrite(cnt);
}
/**
* Writes value to swap.
*
* @param spaceName Space name.
+ * @param part Partition.
* @param key Key.
* @param val Value.
- * @param ldr Class loader (optional).
- * @throws IgniteCheckedException If failed.
- */
- public void write(@Nullable String spaceName, Object key, @Nullable Object val, @Nullable ClassLoader ldr)
- throws IgniteCheckedException {
+ * @param cctx Cache context.
+ * */
+ public void write(@Nullable String spaceName, int part, KeyCacheObject key, @Nullable Object val,
+ GridCacheContext cctx) throws IgniteCheckedException {
assert key != null;
- write(spaceName, new SwapKey(key), marshal(val), ldr);
+ write(spaceName, part, key, marshal(val), cctx);
}
/**
* Removes value from swap.
*
* @param spaceName Space name.
+ * @param part Partition.
* @param key Key.
+ * @param cctx Cache context.
* @param c Optional closure that takes removed value and executes after actual
* removing. If there was no value in storage the closure is executed given
* {@code null} value as parameter.
- * @param ldr Class loader (optional).
* @throws IgniteCheckedException If failed.
*/
- public void remove(@Nullable String spaceName, SwapKey key, @Nullable IgniteInClosure<byte[]> c,
- @Nullable ClassLoader ldr) throws IgniteCheckedException {
+ public void remove(@Nullable String spaceName, int part, KeyCacheObject key,
+ final GridCacheContext cctx, @Nullable final IgniteInClosure<byte[]> c) throws IgniteCheckedException {
assert key != null;
try {
- getSpi().remove(spaceName, key, c, context(ldr));
+ SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false), part,
+ key.valueBytes(cctx.cacheObjectContext()));
+
+ getSpi().remove(spaceName, swapKey, new IgniteInClosure<byte[]>() {
+ @Override public void apply(byte[] bytes) {
+ if (c != null)
+ c.apply(bytes);
+
+ if (bytes != null && cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRemove();
+ }
+ }, context(cctx.deploy().globalLoader()));
}
catch (IgniteSpiException e) {
- throw new IgniteCheckedException("Failed to remove from swap space [space=" + spaceName + ", key=" + key + ']', e);
+ throw new IgniteCheckedException("Failed to remove from swap space [space=" + spaceName +
+ ", key=" + key + ']', e);
}
}
@@ -251,19 +298,32 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* Removes value from swap.
*
* @param spaceName Space name.
- * @param keys Collection of keys.
+ * @param keys Keys.
+ * @param cctx Cache context.
* @param c Optional closure that takes removed value and executes after actual
* removing. If there was no value in storage the closure is executed given
* {@code null} value as parameter.
- * @param ldr Class loader (optional).
* @throws IgniteCheckedException If failed.
*/
- public void removeAll(@Nullable String spaceName, Collection<SwapKey> keys,
- IgniteBiInClosure<SwapKey, byte[]> c, @Nullable ClassLoader ldr) throws IgniteCheckedException {
+ public void removeAll(@Nullable String spaceName, Collection<KeyCacheObject> keys, GridCacheContext cctx,
+ IgniteBiInClosure<SwapKey, byte[]> c) throws IgniteCheckedException {
assert keys != null;
+ Collection<SwapKey> swapKeys = new ArrayList<>(keys.size());
+
+ for (KeyCacheObject key : keys) {
+ SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false),
+ cctx.affinity().partition(key),
+ key.valueBytes(cctx.cacheObjectContext()));
+
+ swapKeys.add(swapKey);
+ }
+
try {
- getSpi().removeAll(spaceName, keys, c, context(ldr));
+ getSpi().removeAll(spaceName, swapKeys, c, context(cctx.deploy().globalLoader()));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRemove();
}
catch (IgniteSpiException e) {
throw new IgniteCheckedException("Failed to remove from swap space [space=" + spaceName + ", " +
@@ -272,24 +332,6 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
}
/**
- * Removes value from swap.
- *
- * @param spaceName Space name.
- * @param key Key.
- * @param c Optional closure that takes removed value and executes after actual
- * removing. If there was no value in storage the closure is executed given
- * {@code null} value as parameter.
- * @param ldr Class loader (optional).
- * @throws IgniteCheckedException If failed.
- */
- public void remove(@Nullable String spaceName, Object key, @Nullable IgniteInClosure<byte[]> c,
- @Nullable ClassLoader ldr) throws IgniteCheckedException {
- assert key != null;
-
- remove(spaceName, new SwapKey(key), c, ldr);
- }
-
- /**
* Gets size in bytes for swap space.
*
* @param spaceName Space name.
@@ -356,7 +398,7 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
*
* @param spaceName Space name.
* @return Iterator over space entries or {@code null} if space is unknown.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+ * @throws IgniteSpiException If failed.
*/
@Nullable public GridCloseableIterator<Map.Entry<byte[], byte[]>> rawIterator(@Nullable String spaceName)
throws IgniteCheckedException {
@@ -397,7 +439,7 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* @param spaceName Space name.
* @param ldr Class loader.
* @return Iterator over space entries or {@code null} if space is unknown.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+ * @throws IgniteSpiException If failed.
*/
@Nullable public <K> GridCloseableIterator<K> keysIterator(@Nullable String spaceName,
@Nullable ClassLoader ldr) throws IgniteCheckedException {
@@ -417,7 +459,6 @@ public class GridSwapSpaceManager extends GridManagerAdapter<SwapSpaceSpi> {
* @return Unmarshalled value.
* @throws IgniteCheckedException If failed.
*/
- @SuppressWarnings({"unchecked"})
private <T> T unmarshal(byte[] swapBytes, @Nullable ClassLoader ldr) throws IgniteCheckedException {
if (swapBytes == null)
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index 560de97..3dcda3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -25,6 +25,8 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import java.util.concurrent.atomic.*;
+import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.*;
+
/**
* Adapter for cache metrics.
*/
@@ -63,7 +65,7 @@ public class CacheMetricsImpl implements CacheMetrics {
private AtomicLong getTimeNanos = new AtomicLong();
/** Remove time taken nanos. */
- private AtomicLong removeTimeNanos = new AtomicLong();
+ private AtomicLong rmvTimeNanos = new AtomicLong();
/** Commit transaction time taken nanos. */
private AtomicLong commitTimeNanos = new AtomicLong();
@@ -71,6 +73,39 @@ public class CacheMetricsImpl implements CacheMetrics {
/** Commit transaction time taken nanos. */
private AtomicLong rollbackTimeNanos = new AtomicLong();
+ /** Number of reads from off-heap memory. */
+ private AtomicLong offHeapGets = new AtomicLong();
+
+ /** Number of writes to off-heap memory. */
+ private AtomicLong offHeapPuts = new AtomicLong();
+
+ /** Number of removed entries from off-heap memory. */
+ private AtomicLong offHeapRemoves = new AtomicLong();
+
+ /** Number of evictions from off-heap memory. */
+ private AtomicLong offHeapEvicts = new AtomicLong();
+
+ /** Number of off-heap hits. */
+ private AtomicLong offHeapHits = new AtomicLong();
+
+ /** Number of off-heap misses. */
+ private AtomicLong offHeapMisses = new AtomicLong();
+
+ /** Number of reads from swap. */
+ private AtomicLong swapGets = new AtomicLong();
+
+ /** Number of writes to swap. */
+ private AtomicLong swapPuts = new AtomicLong();
+
+ /** Number of removed entries from swap. */
+ private AtomicLong swapRemoves = new AtomicLong();
+
+ /** Number of swap hits. */
+ private AtomicLong swapHits = new AtomicLong();
+
+ /** Number of swap misses. */
+ private AtomicLong swapMisses = new AtomicLong();
+
/** Cache metrics. */
@GridToStringExclude
private transient CacheMetricsImpl delegate;
@@ -126,16 +161,160 @@ public class CacheMetricsImpl implements CacheMetrics {
}
/** {@inheritDoc} */
+ @Override public long getOffHeapGets() {
+ return offHeapGets.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapPuts() {
+ return offHeapPuts.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapRemovals() {
+ return offHeapRemoves.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapEvictions() {
+ return offHeapEvicts.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapHits() {
+ return offHeapHits.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapHitPercentage() {
+ long hits0 = offHeapHits.get();
+ long gets0 = offHeapGets.get();
+
+ if (hits0 == 0)
+ return 0;
+
+ return (float) hits0 / gets0 * 100.0f;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapMisses() {
+ return offHeapMisses.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapMissPercentage() {
+ long misses0 = offHeapMisses.get();
+ long reads0 = offHeapGets.get();
+
+ if (misses0 == 0)
+ return 0;
+
+ return (float) misses0 / reads0 * 100.0f;
+ }
+
+ /** {@inheritDoc} */
@Override public long getOffHeapEntriesCount() {
return cctx.cache().offHeapEntriesCount();
}
/** {@inheritDoc} */
+ @Override public long getOffHeapPrimaryEntriesCount() {
+ try {
+ return cctx.swap().offheapEntriesCount(true, false, NONE);
+ }
+ catch (IgniteCheckedException e) {
+ return 0;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapBackupEntriesCount() {
+ try {
+ return cctx.swap().offheapEntriesCount(false, true, NONE);
+ }
+ catch (IgniteCheckedException e) {
+ return 0;
+ }
+ }
+
+ /** {@inheritDoc} */
@Override public long getOffHeapAllocatedSize() {
return cctx.cache().offHeapAllocatedSize();
}
/** {@inheritDoc} */
+ @Override public long getOffHeapMaxSize() {
+ return cctx.config().getOffHeapMaxMemory();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapGets() {
+ return swapGets.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapPuts() {
+ return swapPuts.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapRemovals() {
+ return swapRemoves.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapHits() {
+ return swapHits.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapMisses() {
+ return swapMisses.get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapEntriesCount() {
+ try {
+ return cctx.cache().swapKeys();
+ }
+ catch (IgniteCheckedException e) {
+ return 0;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapSize() {
+ try {
+ return cctx.cache().swapSize();
+ }
+ catch (IgniteCheckedException e) {
+ return 0;
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapHitPercentage() {
+ long hits0 = swapHits.get();
+ long gets0 = swapGets.get();
+
+ if (hits0 == 0)
+ return 0;
+
+ return (float) hits0 / gets0 * 100.0f;
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapMissPercentage() {
+ long misses0 = swapMisses.get();
+ long reads0 = swapGets.get();
+
+ if (misses0 == 0)
+ return 0;
+
+ return (float) misses0 / reads0 * 100.0f;
+ }
+
+ /** {@inheritDoc} */
@Override public int getSize() {
return cctx.cache().size();
}
@@ -317,11 +496,24 @@ public class CacheMetricsImpl implements CacheMetrics {
txCommits.set(0);
txRollbacks.set(0);
putTimeNanos.set(0);
- removeTimeNanos.set(0);
+ rmvTimeNanos.set(0);
getTimeNanos.set(0);
commitTimeNanos.set(0);
rollbackTimeNanos.set(0);
+ offHeapGets.set(0);
+ offHeapPuts.set(0);
+ offHeapRemoves.set(0);
+ offHeapHits.set(0);
+ offHeapMisses.set(0);
+ offHeapEvicts.set(0);
+
+ swapGets.set(0);
+ swapPuts.set(0);
+ swapRemoves.set(0);
+ swapHits.set(0);
+ swapMisses.set(0);
+
if (delegate != null)
delegate.clear();
}
@@ -402,7 +594,7 @@ public class CacheMetricsImpl implements CacheMetrics {
/** {@inheritDoc} */
@Override public float getAverageRemoveTime() {
- long timeNanos = removeTimeNanos.get();
+ long timeNanos = rmvTimeNanos.get();
long removesCnt = rmCnt.get();
if (timeNanos == 0 || removesCnt == 0)
@@ -483,7 +675,6 @@ public class CacheMetricsImpl implements CacheMetrics {
delegate.onTxRollback(duration);
}
-
/**
* Increments the get time accumulator.
*
@@ -514,7 +705,7 @@ public class CacheMetricsImpl implements CacheMetrics {
* @param duration the time taken in nanoseconds.
*/
public void addRemoveTimeNanos(long duration) {
- removeTimeNanos.addAndGet(duration);
+ rmvTimeNanos.addAndGet(duration);
if (delegate != null)
delegate.addRemoveTimeNanos(duration);
@@ -526,7 +717,7 @@ public class CacheMetricsImpl implements CacheMetrics {
* @param duration the time taken in nanoseconds.
*/
public void addRemoveAndGetTimeNanos(long duration) {
- removeTimeNanos.addAndGet(duration);
+ rmvTimeNanos.addAndGet(duration);
getTimeNanos.addAndGet(duration);
if (delegate != null)
@@ -581,6 +772,108 @@ public class CacheMetricsImpl implements CacheMetrics {
return cctx.config().isManagementEnabled();
}
+ /**
+ * Off-heap read callback.
+ *
+ * @param hit Hit or miss flag.
+ */
+ public void onOffHeapRead(boolean hit) {
+ offHeapGets.incrementAndGet();
+
+ if (hit)
+ offHeapHits.incrementAndGet();
+ else
+ offHeapMisses.incrementAndGet();
+
+ if (delegate != null)
+ delegate.onOffHeapRead(hit);
+ }
+
+ /**
+ * Off-heap write callback.
+ */
+ public void onOffHeapWrite() {
+ offHeapPuts.incrementAndGet();
+
+ if (delegate != null)
+ delegate.onOffHeapWrite();
+ }
+
+ /**
+ * Off-heap remove callback.
+ */
+ public void onOffHeapRemove() {
+ offHeapRemoves.incrementAndGet();
+
+ if (delegate != null)
+ delegate.onOffHeapRemove();
+ }
+
+ /**
+ * Off-heap evict callback.
+ */
+ public void onOffHeapEvict() {
+ offHeapEvicts.incrementAndGet();
+
+ if (delegate != null)
+ delegate.onOffHeapRemove();
+ }
+
+ /**
+ * Swap read callback.
+ *
+ * @param hit Hit or miss flag.
+ */
+ public void onSwapRead(boolean hit) {
+ swapGets.incrementAndGet();
+
+ if (hit)
+ swapHits.incrementAndGet();
+ else
+ swapMisses.incrementAndGet();
+
+ if (delegate != null)
+ delegate.onSwapRead(hit);
+ }
+
+ /**
+ * Swap write callback.
+ */
+ public void onSwapWrite() {
+ onSwapWrite(1);
+ }
+
+ /**
+ * Swap write callback.
+ *
+ * @param cnt Amount of entries.
+ */
+ public void onSwapWrite(int cnt) {
+ swapPuts.addAndGet(cnt);
+
+ if (delegate != null)
+ delegate.onSwapWrite(cnt);
+ }
+
+ /**
+ * Swap remove callback.
+ */
+ public void onSwapRemove() {
+ onSwapRemove(1);
+ }
+
+ /**
+ * Swap remove callback.
+ *
+ * @param cnt Amount of entries.
+ */
+ public void onSwapRemove(int cnt) {
+ swapRemoves.addAndGet(cnt);
+
+ if (delegate != null)
+ delegate.onSwapRemove(cnt);
+ }
+
/** {@inheritDoc} */
@Override public String toString() {
return S.toString(CacheMetricsImpl.class, this);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsMXBeanImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsMXBeanImpl.java
index e9d547c..966027a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsMXBeanImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsMXBeanImpl.java
@@ -49,16 +49,116 @@ class CacheMetricsMXBeanImpl implements CacheMetricsMXBean {
}
/** {@inheritDoc} */
+ @Override public long getOffHeapGets() {
+ return cache.metrics0().getOffHeapGets();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapPuts() {
+ return cache.metrics0().getOffHeapPuts();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapRemovals() {
+ return cache.metrics0().getOffHeapRemovals();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapEvictions() {
+ return cache.metrics0().getOffHeapEvictions();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapHits() {
+ return cache.metrics0().getOffHeapHits();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapHitPercentage() {
+ return cache.metrics0().getOffHeapHitPercentage();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapMisses() {
+ return cache.metrics0().getOffHeapMisses();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapMissPercentage() {
+ return cache.metrics0().getOffHeapMissPercentage();
+ }
+
+ /** {@inheritDoc} */
@Override public long getOffHeapEntriesCount() {
return cache.metrics0().getOffHeapEntriesCount();
}
/** {@inheritDoc} */
+ @Override public long getOffHeapPrimaryEntriesCount() {
+ return cache.metrics0().getOffHeapPrimaryEntriesCount();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapBackupEntriesCount() {
+ return cache.metrics0().getOffHeapBackupEntriesCount();
+ }
+
+ /** {@inheritDoc} */
@Override public long getOffHeapAllocatedSize() {
return cache.metrics0().getOffHeapAllocatedSize();
}
/** {@inheritDoc} */
+ @Override public long getOffHeapMaxSize() {
+ return cache.metrics0().getOffHeapMaxSize();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapGets() {
+ return cache.metrics0().getSwapGets();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapPuts() {
+ return cache.metrics0().getSwapPuts();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapRemovals() {
+ return cache.metrics0().getSwapRemovals();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapHits() {
+ return cache.metrics0().getSwapHits();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapMisses() {
+ return cache.metrics0().getSwapMisses();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapHitPercentage() {
+ return cache.metrics0().getSwapHitPercentage();
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapMissPercentage() {
+ return cache.metrics0().getSwapMissPercentage();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapEntriesCount() {
+ return cache.metrics0().getSwapEntriesCount();
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapSize() {
+ return cache.metrics0().getSwapSize();
+ }
+
+ /** {@inheritDoc} */
@Override public int getSize() {
return cache.metrics0().getSize();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
index 4fe152a..cf16d9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
@@ -61,7 +61,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
private float getAvgTimeNanos = 0;
/** Remove time taken nanos. */
- private float removeAvgTimeNanos = 0;
+ private float rmvAvgTimeNanos = 0;
/** Commit transaction time taken nanos. */
private float commitAvgTimeNanos = 0;
@@ -75,12 +75,60 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** Number of entries that was swapped to disk. */
private long overflowSize;
+ /** Number of reads from off-heap. */
+ private long offHeapGets;
+
+ /** Number of writes to off-heap. */
+ private long offHeapPuts;
+
+ /** Number of removed entries from off-heap. */
+ private long offHeapRemoves;
+
+ /** Number of evictions from off-heap. */
+ private long offHeapEvicts;
+
+ /** Off-heap hits number. */
+ private long offHeapHits;
+
+ /** Off-heap misses number. */
+ private long offHeapMisses;
+
/** Number of entries stored in off-heap memory. */
- private long offHeapEntriesCount;
+ private long offHeapEntriesCnt;
+
+ /** Number of primary entries stored in off-heap memory. */
+ private long offHeapPrimaryEntriesCnt;
+
+ /** Number of backup entries stored in off-heap memory. */
+ private long offHeapBackupEntriesCnt;
/** Memory size allocated in off-heap. */
private long offHeapAllocatedSize;
+ /** Off-heap memory maximum size*/
+ private long offHeapMaxSize;
+
+ /** Number of reads from swap. */
+ private long swapGets;
+
+ /** Number of writes to swap. */
+ private long swapPuts;
+
+ /** Number of removed entries from swap. */
+ private long swapRemoves;
+
+ /** Number of entries stored in swap. */
+ private long swapEntriesCnt;
+
+ /** Swap hits number. */
+ private long swapHits;
+
+ /** Swap misses number. */
+ private long swapMisses;
+
+ /** Swap size. */
+ private long swapSize;
+
/** Number of non-{@code null} values in the cache. */
private int size;
@@ -91,7 +139,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
private boolean isEmpty;
/** Gets current size of evict queue used to batch up evictions. */
- private int dhtEvictQueueCurrentSize;
+ private int dhtEvictQueueCurrSize;
/** Transaction per-thread map size. */
private int txThreadMapSize;
@@ -106,7 +154,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
private int txPrepareQueueSize;
/** Start version counts map size. */
- private int txStartVersionCountsSize;
+ private int txStartVerCountsSize;
/** Number of cached committed transaction IDs. */
private int txCommittedVersionsSize;
@@ -127,7 +175,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
private int txDhtPrepareQueueSize;
/** DHT start version counts map size. */
- private int txDhtStartVersionCountsSize;
+ private int txDhtStartVerCountsSize;
/** Number of cached committed DHT transaction IDs. */
private int txDhtCommittedVersionsSize;
@@ -142,34 +190,34 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
private int writeBehindFlushSize;
/** Count of worker threads. */
- private int writeBehindFlushThreadCount;
+ private int writeBehindFlushThreadCnt;
/** Flush frequency in milliseconds. */
- private long writeBehindFlushFrequency;
+ private long writeBehindFlushFreq;
/** Maximum size of batch. */
private int writeBehindStoreBatchSize;
/** Count of cache overflow events since start. */
- private int writeBehindTotalCriticalOverflowCount;
+ private int writeBehindTotalCriticalOverflowCnt;
/** Count of cache overflow events since start. */
- private int writeBehindCriticalOverflowCount;
+ private int writeBehindCriticalOverflowCnt;
/** Count of entries in store-retry state. */
- private int writeBehindErrorRetryCount;
+ private int writeBehindErrorRetryCnt;
/** Total count of entries in cache store internal buffer. */
- private int writeBehindBufferSize;
+ private int writeBehindBufSize;
/** */
private String keyType;
/** */
- private String valueType;
+ private String valType;
/** */
- private boolean isStoreByValue;
+ private boolean isStoreByVal;
/** */
private boolean isStatisticsEnabled;
@@ -207,45 +255,64 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
putAvgTimeNanos = m.getAveragePutTime();
getAvgTimeNanos = m.getAverageGetTime();
- removeAvgTimeNanos = m.getAverageRemoveTime();
+ rmvAvgTimeNanos = m.getAverageRemoveTime();
commitAvgTimeNanos = m.getAverageTxCommitTime();
rollbackAvgTimeNanos = m.getAverageTxRollbackTime();
cacheName = m.name();
overflowSize = m.getOverflowSize();
- offHeapEntriesCount = m.getOffHeapEntriesCount();
+
+ offHeapGets = m.getOffHeapGets();
+ offHeapPuts = m.getOffHeapPuts();
+ offHeapRemoves = m.getOffHeapRemovals();
+ offHeapEvicts = m.getOffHeapEvictions();
+ offHeapHits = m.getOffHeapHits();
+ offHeapMisses = m.getOffHeapMisses();
+ offHeapEntriesCnt = m.getOffHeapEntriesCount();
+ offHeapPrimaryEntriesCnt = m.getOffHeapPrimaryEntriesCount();
+ offHeapBackupEntriesCnt = m.getOffHeapBackupEntriesCount();
offHeapAllocatedSize = m.getOffHeapAllocatedSize();
+ offHeapMaxSize = m.getOffHeapMaxSize();
+
+ swapGets = m.getSwapGets();
+ swapPuts = m.getSwapPuts();
+ swapRemoves = m.getSwapRemovals();
+ swapHits = m.getSwapHits();
+ swapMisses = m.getSwapMisses();
+ swapEntriesCnt = m.getSwapEntriesCount();
+ swapSize = m.getSwapSize();
+
size = m.getSize();
keySize = m.getKeySize();
isEmpty = m.isEmpty();
- dhtEvictQueueCurrentSize = m.getDhtEvictQueueCurrentSize();
+ dhtEvictQueueCurrSize = m.getDhtEvictQueueCurrentSize();
txThreadMapSize = m.getTxThreadMapSize();
txXidMapSize = m.getTxXidMapSize();
txCommitQueueSize = m.getTxCommitQueueSize();
txPrepareQueueSize = m.getTxPrepareQueueSize();
- txStartVersionCountsSize = m.getTxStartVersionCountsSize();
+ txStartVerCountsSize = m.getTxStartVersionCountsSize();
txCommittedVersionsSize = m.getTxCommittedVersionsSize();
txRolledbackVersionsSize = m.getTxRolledbackVersionsSize();
txDhtThreadMapSize = m.getTxDhtThreadMapSize();
txDhtXidMapSize = m.getTxDhtXidMapSize();
txDhtCommitQueueSize = m.getTxDhtCommitQueueSize();
txDhtPrepareQueueSize = m.getTxDhtPrepareQueueSize();
- txDhtStartVersionCountsSize = m.getTxDhtStartVersionCountsSize();
+ txDhtStartVerCountsSize = m.getTxDhtStartVersionCountsSize();
txDhtCommittedVersionsSize = m.getTxDhtCommittedVersionsSize();
txDhtRolledbackVersionsSize = m.getTxDhtRolledbackVersionsSize();
isWriteBehindEnabled = m.isWriteBehindEnabled();
writeBehindFlushSize = m.getWriteBehindFlushSize();
- writeBehindFlushThreadCount = m.getWriteBehindFlushThreadCount();
- writeBehindFlushFrequency = m.getWriteBehindFlushFrequency();
+ writeBehindFlushThreadCnt = m.getWriteBehindFlushThreadCount();
+ writeBehindFlushFreq = m.getWriteBehindFlushFrequency();
writeBehindStoreBatchSize = m.getWriteBehindStoreBatchSize();
- writeBehindTotalCriticalOverflowCount = m.getWriteBehindTotalCriticalOverflowCount();
- writeBehindCriticalOverflowCount = m.getWriteBehindCriticalOverflowCount();
- writeBehindErrorRetryCount = m.getWriteBehindErrorRetryCount();
- writeBehindBufferSize = m.getWriteBehindBufferSize();
+ writeBehindTotalCriticalOverflowCnt = m.getWriteBehindTotalCriticalOverflowCount();
+ writeBehindCriticalOverflowCnt = m.getWriteBehindCriticalOverflowCount();
+ writeBehindErrorRetryCnt = m.getWriteBehindErrorRetryCount();
+ writeBehindBufSize = m.getWriteBehindBufferSize();
keyType = m.getKeyType();
- valueType = m.getValueType();
- isStoreByValue = m.isStoreByValue();
+ valType = m.getValueType();
+ isStoreByVal = m.isStoreByValue();
isStatisticsEnabled = m.isStatisticsEnabled();
isManagementEnabled = m.isManagementEnabled();
isReadThrough = m.isReadThrough();
@@ -263,21 +330,23 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
isEmpty = loc.isEmpty();
isWriteBehindEnabled = loc.isWriteBehindEnabled();
writeBehindFlushSize = loc.getWriteBehindFlushSize();
- writeBehindFlushThreadCount = loc.getWriteBehindFlushThreadCount();
- writeBehindFlushFrequency = loc.getWriteBehindFlushFrequency();
+ writeBehindFlushThreadCnt = loc.getWriteBehindFlushThreadCount();
+ writeBehindFlushFreq = loc.getWriteBehindFlushFrequency();
writeBehindStoreBatchSize = loc.getWriteBehindStoreBatchSize();
- writeBehindBufferSize = loc.getWriteBehindBufferSize();
+ writeBehindBufSize = loc.getWriteBehindBufferSize();
size = loc.getSize();
keySize = loc.getKeySize();
keyType = loc.getKeyType();
- valueType = loc.getValueType();
- isStoreByValue = loc.isStoreByValue();
+ valType = loc.getValueType();
+ isStoreByVal = loc.isStoreByValue();
isStatisticsEnabled = loc.isStatisticsEnabled();
isManagementEnabled = loc.isManagementEnabled();
isReadThrough = loc.isReadThrough();
isWriteThrough = loc.isWriteThrough();
+ offHeapMaxSize = loc.getOffHeapMaxSize();
+
for (CacheMetrics e : metrics) {
reads += e.getCacheGets();
puts += e.getCachePuts();
@@ -290,7 +359,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
putAvgTimeNanos += e.getAveragePutTime();
getAvgTimeNanos += e.getAverageGetTime();
- removeAvgTimeNanos += e.getAverageRemoveTime();
+ rmvAvgTimeNanos += e.getAverageRemoveTime();
commitAvgTimeNanos += e.getAverageTxCommitTime();
rollbackAvgTimeNanos += e.getAverageTxRollbackTime();
@@ -299,19 +368,35 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
else
overflowSize = -1;
- offHeapEntriesCount += e.getOffHeapEntriesCount();
+ offHeapGets += e.getOffHeapGets();
+ offHeapPuts += e.getOffHeapPuts();
+ offHeapRemoves += e.getOffHeapRemovals();
+ offHeapEvicts += e.getOffHeapEvictions();
+ offHeapHits += e.getOffHeapHits();
+ offHeapMisses += e.getOffHeapMisses();
+ offHeapEntriesCnt += e.getOffHeapEntriesCount();
+ offHeapPrimaryEntriesCnt += e.getOffHeapPrimaryEntriesCount();
+ offHeapBackupEntriesCnt += e.getOffHeapBackupEntriesCount();
offHeapAllocatedSize += e.getOffHeapAllocatedSize();
+ swapGets += e.getSwapGets();
+ swapPuts += e.getSwapPuts();
+ swapRemoves += e.getSwapRemovals();
+ swapHits += e.getSwapHits();
+ swapMisses += e.getSwapMisses();
+ swapEntriesCnt += e.getSwapEntriesCount();
+ swapSize += e.getSwapSize();
+
if (e.getDhtEvictQueueCurrentSize() > -1)
- dhtEvictQueueCurrentSize += e.getDhtEvictQueueCurrentSize();
+ dhtEvictQueueCurrSize += e.getDhtEvictQueueCurrentSize();
else
- dhtEvictQueueCurrentSize = -1;
+ dhtEvictQueueCurrSize = -1;
txThreadMapSize += e.getTxThreadMapSize();
txXidMapSize += e.getTxXidMapSize();
txCommitQueueSize += e.getTxCommitQueueSize();
txPrepareQueueSize += e.getTxPrepareQueueSize();
- txStartVersionCountsSize += e.getTxStartVersionCountsSize();
+ txStartVerCountsSize += e.getTxStartVersionCountsSize();
txCommittedVersionsSize += e.getTxCommittedVersionsSize();
txRolledbackVersionsSize += e.getTxRolledbackVersionsSize();
@@ -336,9 +421,9 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
txDhtPrepareQueueSize = -1;
if (e.getTxDhtStartVersionCountsSize() > -1)
- txDhtStartVersionCountsSize += e.getTxDhtStartVersionCountsSize();
+ txDhtStartVerCountsSize += e.getTxDhtStartVersionCountsSize();
else
- txDhtStartVersionCountsSize = -1;
+ txDhtStartVerCountsSize = -1;
if (e.getTxDhtCommittedVersionsSize() > -1)
txDhtCommittedVersionsSize += e.getTxDhtCommittedVersionsSize();
@@ -351,19 +436,19 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
txDhtRolledbackVersionsSize = -1;
if (e.getWriteBehindTotalCriticalOverflowCount() > -1)
- writeBehindTotalCriticalOverflowCount += e.getWriteBehindTotalCriticalOverflowCount();
+ writeBehindTotalCriticalOverflowCnt += e.getWriteBehindTotalCriticalOverflowCount();
else
- writeBehindTotalCriticalOverflowCount = -1;
+ writeBehindTotalCriticalOverflowCnt = -1;
if (e.getWriteBehindCriticalOverflowCount() > -1)
- writeBehindCriticalOverflowCount += e.getWriteBehindCriticalOverflowCount();
+ writeBehindCriticalOverflowCnt += e.getWriteBehindCriticalOverflowCount();
else
- writeBehindCriticalOverflowCount = -1;
+ writeBehindCriticalOverflowCnt = -1;
if (e.getWriteBehindErrorRetryCount() > -1)
- writeBehindErrorRetryCount += e.getWriteBehindErrorRetryCount();
+ writeBehindErrorRetryCnt += e.getWriteBehindErrorRetryCount();
else
- writeBehindErrorRetryCount = -1;
+ writeBehindErrorRetryCnt = -1;
}
int size = metrics.size();
@@ -371,7 +456,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
if (size > 1) {
putAvgTimeNanos /= size;
getAvgTimeNanos /= size;
- removeAvgTimeNanos /= size;
+ rmvAvgTimeNanos /= size;
commitAvgTimeNanos /= size;
rollbackAvgTimeNanos /= size;
}
@@ -435,7 +520,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public float getAverageRemoveTime() {
- return removeAvgTimeNanos;
+ return rmvAvgTimeNanos;
}
/** {@inheritDoc} */
@@ -469,8 +554,63 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
}
/** {@inheritDoc} */
+ @Override public long getOffHeapGets() {
+ return offHeapGets;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapPuts() {
+ return offHeapPuts;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapRemovals() {
+ return offHeapRemoves;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapEvictions() {
+ return offHeapEvicts;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapHits() {
+ return offHeapHits;
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapHitPercentage() {
+ if (offHeapHits == 0 || offHeapGets == 0)
+ return 0;
+
+ return (float) offHeapHits / offHeapGets * 100.0f;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapMisses() {
+ return offHeapMisses;
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getOffHeapMissPercentage() {
+ if (offHeapMisses == 0 || offHeapGets == 0)
+ return 0;
+
+ return (float) offHeapMisses / offHeapGets * 100.0f;
+ }
+ /** {@inheritDoc} */
@Override public long getOffHeapEntriesCount() {
- return offHeapEntriesCount;
+ return offHeapEntriesCnt;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapPrimaryEntriesCount() {
+ return offHeapPrimaryEntriesCnt;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getOffHeapBackupEntriesCount() {
+ return offHeapBackupEntriesCnt;
}
/** {@inheritDoc} */
@@ -479,6 +619,62 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
}
/** {@inheritDoc} */
+ @Override public long getOffHeapMaxSize() {
+ return offHeapMaxSize;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapGets() {
+ return swapGets;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapPuts() {
+ return swapPuts;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapRemovals() {
+ return swapRemoves;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapHits() {
+ return swapHits;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapMisses() {
+ return swapMisses;
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapHitPercentage() {
+ if (swapHits == 0 || swapGets == 0)
+ return 0;
+
+ return (float) swapHits / swapGets * 100.0f;
+ }
+
+ /** {@inheritDoc} */
+ @Override public float getSwapMissPercentage() {
+ if (swapMisses == 0 || swapGets == 0)
+ return 0;
+
+ return (float) swapMisses / swapGets * 100.0f;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapEntriesCount() {
+ return swapEntriesCnt;
+ }
+
+ /** {@inheritDoc} */
+ @Override public long getSwapSize() {
+ return swapSize;
+ }
+
+ /** {@inheritDoc} */
@Override public int getSize() {
return size;
}
@@ -495,7 +691,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public int getDhtEvictQueueCurrentSize() {
- return dhtEvictQueueCurrentSize;
+ return dhtEvictQueueCurrSize;
}
/** {@inheritDoc} */
@@ -520,7 +716,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public int getTxStartVersionCountsSize() {
- return txStartVersionCountsSize;
+ return txStartVerCountsSize;
}
/** {@inheritDoc} */
@@ -555,7 +751,7 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public int getTxDhtStartVersionCountsSize() {
- return txDhtStartVersionCountsSize;
+ return txDhtStartVerCountsSize;
}
/** {@inheritDoc} */
@@ -580,12 +776,12 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public int getWriteBehindFlushThreadCount() {
- return writeBehindFlushThreadCount;
+ return writeBehindFlushThreadCnt;
}
/** {@inheritDoc} */
@Override public long getWriteBehindFlushFrequency() {
- return writeBehindFlushFrequency;
+ return writeBehindFlushFreq;
}
/** {@inheritDoc} */
@@ -595,22 +791,22 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public int getWriteBehindTotalCriticalOverflowCount() {
- return writeBehindTotalCriticalOverflowCount;
+ return writeBehindTotalCriticalOverflowCnt;
}
/** {@inheritDoc} */
@Override public int getWriteBehindCriticalOverflowCount() {
- return writeBehindCriticalOverflowCount;
+ return writeBehindCriticalOverflowCnt;
}
/** {@inheritDoc} */
@Override public int getWriteBehindErrorRetryCount() {
- return writeBehindErrorRetryCount;
+ return writeBehindErrorRetryCnt;
}
/** {@inheritDoc} */
@Override public int getWriteBehindBufferSize() {
- return writeBehindBufferSize;
+ return writeBehindBufSize;
}
/** {@inheritDoc} */
@@ -620,12 +816,12 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
/** {@inheritDoc} */
@Override public String getValueType() {
- return valueType;
+ return valType;
}
/** {@inheritDoc} */
@Override public boolean isStoreByValue() {
- return isStoreByValue;
+ return isStoreByVal;
}
/** {@inheritDoc} */
@@ -666,31 +862,49 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
out.writeFloat(putAvgTimeNanos);
out.writeFloat(getAvgTimeNanos);
- out.writeFloat(removeAvgTimeNanos);
+ out.writeFloat(rmvAvgTimeNanos);
out.writeFloat(commitAvgTimeNanos);
out.writeFloat(rollbackAvgTimeNanos);
out.writeLong(overflowSize);
- out.writeLong(offHeapEntriesCount);
+ out.writeLong(offHeapGets);
+ out.writeLong(offHeapPuts);
+ out.writeLong(offHeapRemoves);
+ out.writeLong(offHeapEvicts);
+ out.writeLong(offHeapHits);
+ out.writeLong(offHeapMisses);
+ out.writeLong(offHeapEntriesCnt);
+ out.writeLong(offHeapPrimaryEntriesCnt);
+ out.writeLong(offHeapBackupEntriesCnt);
out.writeLong(offHeapAllocatedSize);
- out.writeInt(dhtEvictQueueCurrentSize);
+ out.writeLong(offHeapMaxSize);
+
+ out.writeLong(swapGets);
+ out.writeLong(swapPuts);
+ out.writeLong(swapRemoves);
+ out.writeLong(swapHits);
+ out.writeLong(swapMisses);
+ out.writeLong(swapEntriesCnt);
+ out.writeLong(swapSize);
+
+ out.writeInt(dhtEvictQueueCurrSize);
out.writeInt(txThreadMapSize);
out.writeInt(txXidMapSize);
out.writeInt(txCommitQueueSize);
out.writeInt(txPrepareQueueSize);
- out.writeInt(txStartVersionCountsSize);
+ out.writeInt(txStartVerCountsSize);
out.writeInt(txCommittedVersionsSize);
out.writeInt(txRolledbackVersionsSize);
out.writeInt(txDhtThreadMapSize);
out.writeInt(txDhtXidMapSize);
out.writeInt(txDhtCommitQueueSize);
out.writeInt(txDhtPrepareQueueSize);
- out.writeInt(txDhtStartVersionCountsSize);
+ out.writeInt(txDhtStartVerCountsSize);
out.writeInt(txDhtCommittedVersionsSize);
out.writeInt(txDhtRolledbackVersionsSize);
- out.writeInt(writeBehindTotalCriticalOverflowCount);
- out.writeInt(writeBehindCriticalOverflowCount);
- out.writeInt(writeBehindErrorRetryCount);
+ out.writeInt(writeBehindTotalCriticalOverflowCnt);
+ out.writeInt(writeBehindCriticalOverflowCnt);
+ out.writeInt(writeBehindErrorRetryCnt);
}
/** {@inheritDoc} */
@@ -706,30 +920,48 @@ public class CacheMetricsSnapshot implements CacheMetrics, Externalizable {
putAvgTimeNanos = in.readFloat();
getAvgTimeNanos = in.readFloat();
- removeAvgTimeNanos = in.readFloat();
+ rmvAvgTimeNanos = in.readFloat();
commitAvgTimeNanos = in.readFloat();
rollbackAvgTimeNanos = in.readFloat();
overflowSize = in.readLong();
- offHeapEntriesCount = in.readLong();
+ offHeapGets = in.readLong();
+ offHeapPuts = in.readLong();
+ offHeapRemoves = in.readLong();
+ offHeapEvicts = in.readLong();
+ offHeapHits = in.readLong();
+ offHeapMisses = in.readLong();
+ offHeapEntriesCnt = in.readLong();
+ offHeapPrimaryEntriesCnt = in.readLong();
+ offHeapBackupEntriesCnt = in.readLong();
offHeapAllocatedSize = in.readLong();
- dhtEvictQueueCurrentSize = in.readInt();
+ offHeapMaxSize = in.readLong();
+
+ swapGets = in.readLong();
+ swapPuts = in.readLong();
+ swapRemoves = in.readLong();
+ swapHits = in.readLong();
+ swapMisses = in.readLong();
+ swapEntriesCnt = in.readLong();
+ swapSize = in.readLong();
+
+ dhtEvictQueueCurrSize = in.readInt();
txThreadMapSize = in.readInt();
txXidMapSize = in.readInt();
txCommitQueueSize = in.readInt();
txPrepareQueueSize = in.readInt();
- txStartVersionCountsSize = in.readInt();
+ txStartVerCountsSize = in.readInt();
txCommittedVersionsSize = in.readInt();
txRolledbackVersionsSize = in.readInt();
txDhtThreadMapSize = in.readInt();
txDhtXidMapSize = in.readInt();
txDhtCommitQueueSize = in.readInt();
txDhtPrepareQueueSize = in.readInt();
- txDhtStartVersionCountsSize = in.readInt();
+ txDhtStartVerCountsSize = in.readInt();
txDhtCommittedVersionsSize = in.readInt();
txDhtRolledbackVersionsSize = in.readInt();
- writeBehindTotalCriticalOverflowCount = in.readInt();
- writeBehindCriticalOverflowCount = in.readInt();
- writeBehindErrorRetryCount = in.readInt();
+ writeBehindTotalCriticalOverflowCnt = in.readInt();
+ writeBehindCriticalOverflowCnt = in.readInt();
+ writeBehindErrorRetryCnt = in.readInt();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index eb82218..f442f03 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -121,6 +121,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
warnFirstEvict();
writeToSwap(part, cctx.toCacheKeyObject(kb), vb);
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapEvict();
}
catch (IgniteCheckedException e) {
log.error("Failed to unmarshal off-heap entry [part=" + part + ", hash=" + hash + ']', e);
@@ -395,8 +398,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @return Reconstituted swap entry or {@code null} if entry is obsolete.
* @throws IgniteCheckedException If failed.
*/
- @Nullable private <X extends GridCacheSwapEntry> X swapEntry(X e) throws IgniteCheckedException
- {
+ @Nullable private <X extends GridCacheSwapEntry> X swapEntry(X e) throws IgniteCheckedException {
assert e != null;
checkIteratorQueue();
@@ -425,16 +427,13 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
// First check off-heap store.
- if (offheapEnabled)
- if (offheap.contains(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext())))
- return true;
+ if (offheapEnabled && offheap.contains(spaceName, part, key, cctx))
+ return true;
if (swapEnabled) {
assert key != null;
- byte[] valBytes = swapMgr.read(spaceName,
- new SwapKey(key.value(cctx.cacheObjectContext(), false), part, key.valueBytes(cctx.cacheObjectContext())),
- cctx.deploy().globalLoader());
+ byte[] valBytes = swapMgr.read(spaceName, part, key, cctx);
return valBytes != null;
}
@@ -444,7 +443,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
/**
* @param key Key to read.
- * @param keyBytes Key bytes.
* @param part Key partition.
* @param entryLocked {@code True} if cache entry is locked.
* @param readOffheap Read offheap flag.
@@ -454,7 +452,6 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
*/
@SuppressWarnings({"unchecked"})
@Nullable private GridCacheSwapEntry read(KeyCacheObject key,
- byte[] keyBytes,
int part,
boolean entryLocked,
boolean readOffheap,
@@ -479,7 +476,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// First check off-heap store.
if (readOffheap && offheapEnabled) {
- byte[] bytes = offheap.get(spaceName, part, key, keyBytes);
+ byte[] bytes = offheap.get(spaceName, part, key, cctx);
if (bytes != null)
return swapEntry(unmarshalSwapEntry(bytes));
@@ -490,9 +487,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
assert key != null;
- byte[] bytes = swapMgr.read(spaceName,
- new SwapKey(key.value(cctx.cacheObjectContext(), false), part, keyBytes),
- cctx.deploy().globalLoader());
+ byte[] bytes = swapMgr.read(spaceName, part, key, cctx);
if (bytes == null && lsnr != null)
return lsnr.entry;
@@ -522,7 +517,10 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// First try removing from offheap.
if (offheapEnabled) {
- byte[] entryBytes = offheap.remove(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ byte[] entryBytes = offheap.remove(spaceName, part, key, cctx);
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRead(entryBytes != null);
if (entryBytes != null) {
GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
@@ -567,8 +565,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @return Value from swap or {@code null}.
* @throws IgniteCheckedException If failed.
*/
- @Nullable private GridCacheSwapEntry readAndRemoveSwap(final KeyCacheObject key,
- final int part)
+ @Nullable private GridCacheSwapEntry readAndRemoveSwap(final KeyCacheObject key, final int part)
throws IgniteCheckedException {
if (!swapEnabled)
return null;
@@ -576,12 +573,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
final GridTuple<GridCacheSwapEntry> t = F.t1();
final GridTuple<IgniteCheckedException> err = F.t1();
- SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false),
- part,
- key.valueBytes(cctx.cacheObjectContext()));
-
- swapMgr.remove(spaceName, swapKey, new CI1<byte[]>() {
+ swapMgr.remove(spaceName, part, key, cctx, new CI1<byte[]>() {
@Override public void apply(byte[] rmv) {
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onSwapRead(rmv != null);
+
if (rmv != null) {
try {
GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(rmv));
@@ -624,7 +620,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
}
- }, cctx.deploy().globalLoader());
+ });
if (err.get() != null)
throw err.get();
@@ -649,12 +645,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
if (!offheapEnabled && !swapEnabled)
return null;
- return read(entry.key(),
- entry.key().valueBytes(cctx.cacheObjectContext()),
- entry.partition(),
- locked,
- readOffheap,
- readSwap);
+ return read(entry.key(), entry.partition(), locked, readOffheap, readSwap);
}
/**
@@ -670,8 +661,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- IgniteBiTuple<Long, Integer> ptr =
- offheap.valuePointer(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ IgniteBiTuple<Long, Integer> ptr = offheap.valuePointer(spaceName, part, key, cctx);
if (ptr != null) {
assert ptr.get1() != null;
@@ -700,7 +690,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- return read(key, key.valueBytes(cctx.cacheObjectContext()), part, false, readOffheap, readSwap);
+ return read(key, part, false, readOffheap, readSwap);
}
/**
@@ -729,7 +719,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
final GridCacheQueryManager qryMgr = cctx.queries();
- Collection<SwapKey> unprocessedKeys = null;
+ Collection<KeyCacheObject> unprocessedKeys = null;
+
final Collection<GridCacheBatchSwapEntry> res = new ArrayList<>(keys.size());
// First try removing from offheap.
@@ -738,7 +729,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
byte[] entryBytes =
- offheap.remove(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ offheap.remove(spaceName, part, key, cctx);
if (entryBytes != null) {
GridCacheSwapEntry entry = swapEntry(unmarshalSwapEntry(entryBytes));
@@ -775,11 +766,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
if (unprocessedKeys == null)
unprocessedKeys = new ArrayList<>(keys.size());
- SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false),
- cctx.affinity().partition(key),
- key.valueBytes(cctx.cacheObjectContext()));
-
- unprocessedKeys.add(swapKey);
+ unprocessedKeys.add(key);
}
}
@@ -789,13 +776,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
else {
unprocessedKeys = new ArrayList<>(keys.size());
- for (KeyCacheObject key : keys) {
- SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false),
- cctx.affinity().partition(key),
- key.valueBytes(cctx.cacheObjectContext()));
-
- unprocessedKeys.add(swapKey);
- }
+ for (KeyCacheObject key : keys)
+ unprocessedKeys.add(key);
}
assert swapEnabled;
@@ -804,9 +786,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// Swap is enabled.
final GridTuple<IgniteCheckedException> err = F.t1();
- swapMgr.removeAll(spaceName,
- unprocessedKeys,
- new IgniteBiInClosure<SwapKey, byte[]>() {
+ swapMgr.removeAll(spaceName, unprocessedKeys, cctx, new IgniteBiInClosure<SwapKey, byte[]>() {
@Override public void apply(SwapKey swapKey, byte[] rmv) {
if (rmv != null) {
try {
@@ -859,8 +839,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
}
- },
- cctx.deploy().globalLoader());
+ }
+ );
if (err.get() != null)
throw err.get();
@@ -880,7 +860,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- return offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ return offheap.removex(spaceName, part, key, cctx);
}
/**
@@ -904,7 +884,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- offheap.enableEviction(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ offheap.enableEviction(spaceName, part, key, cctx);
}
/**
@@ -942,10 +922,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
// First try offheap.
if (offheapEnabled) {
- byte[] val = offheap.remove(spaceName,
- part,
- key.value(cctx.cacheObjectContext(), false),
- key.valueBytes(cctx.cacheObjectContext()));
+ byte[] val = offheap.remove(spaceName, part, key, cctx);
if (val != null) {
if (c != null)
@@ -955,16 +932,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
- if (swapEnabled) {
- SwapKey swapKey = new SwapKey(key.value(cctx.cacheObjectContext(), false),
- part,
- key.valueBytes(cctx.cacheObjectContext()));
-
- swapMgr.remove(spaceName,
- swapKey,
- c,
- cctx.deploy().globalLoader());
- }
+ if (swapEnabled)
+ swapMgr.remove(spaceName, part, key, cctx, c);
}
/**
@@ -1004,13 +973,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
keyClsLdrId,
valClsLdrId);
- if (offheapEnabled) {
- offheap.put(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()), entry.marshal());
-
- if (cctx.events().isRecordable(EVT_CACHE_OBJECT_TO_OFFHEAP))
- cctx.events().addEvent(part, key, cctx.nodeId(), (IgniteUuid)null, null,
- EVT_CACHE_OBJECT_TO_OFFHEAP, null, false, null, true, null, null, null);
- }
+ if (offheapEnabled)
+ offheap.put(spaceName, part, key, entry.marshal(), cctx);
else if (swapEnabled)
writeToSwap(part, key, entry.marshal());
@@ -1035,32 +999,14 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
if (offheapEnabled) {
for (GridCacheBatchSwapEntry swapEntry : swapped) {
- offheap.put(spaceName,
- swapEntry.partition(),
- swapEntry.key(),
- swapEntry.key().valueBytes(cctx.cacheObjectContext()),
- swapEntry.marshal());
-
- if (cctx.events().isRecordable(EVT_CACHE_OBJECT_TO_OFFHEAP))
- cctx.events().addEvent(swapEntry.partition(), swapEntry.key(), cctx.nodeId(),
- (IgniteUuid)null, null, EVT_CACHE_OBJECT_TO_OFFHEAP, null, false, null, true, null, null, null);
+ offheap.put(spaceName, swapEntry.partition(), swapEntry.key(), swapEntry.marshal(), cctx);
if (qryMgr != null)
qryMgr.onSwap(swapEntry.key());
}
}
else {
- Map<SwapKey, byte[]> batch = new LinkedHashMap<>();
-
- for (GridCacheBatchSwapEntry entry : swapped) {
- SwapKey swapKey = new SwapKey(entry.key().value(cctx.cacheObjectContext(), false),
- entry.partition(),
- entry.key().valueBytes(cctx.cacheObjectContext()));
-
- batch.put(swapKey, entry.marshal());
- }
-
- swapMgr.writeAll(spaceName, batch, cctx.deploy().globalLoader());
+ swapMgr.writeAll(spaceName, swapped, cctx);
if (cctx.events().isRecordable(EVT_CACHE_OBJECT_SWAPPED)) {
for (GridCacheBatchSwapEntry batchSwapEntry : swapped) {
@@ -1082,17 +1028,10 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
* @param entry Entry bytes.
* @throws IgniteCheckedException If failed.
*/
- private void writeToSwap(int part,
- KeyCacheObject key,
- byte[] entry)
- throws IgniteCheckedException
- {
+ private void writeToSwap(int part, KeyCacheObject key, byte[] entry) throws IgniteCheckedException {
checkIteratorQueue();
- swapMgr.write(spaceName,
- new SwapKey(key.value(cctx.cacheObjectContext(), false), part, key.valueBytes(cctx.cacheObjectContext())),
- entry,
- cctx.deploy().globalLoader());
+ swapMgr.write(spaceName, part, key, entry, cctx);
if (cctx.events().isRecordable(EVT_CACHE_OBJECT_SWAPPED))
cctx.events().addEvent(part, key, cctx.nodeId(), (IgniteUuid) null, null,
@@ -1274,7 +1213,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ offheap.removex(spaceName, part, key, cctx);
}
else
it.removeX();
@@ -1432,6 +1371,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
return it.hasNext();
}
+ @SuppressWarnings("unchecked")
@Override protected void onRemove() throws IgniteCheckedException {
if (cur == null)
throw new IllegalStateException("Method next() has not yet been called, or the remove() method " +
@@ -1616,7 +1556,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ offheap.removex(spaceName, part, key, cctx);
}
@Override protected void onClose() throws IgniteCheckedException {
@@ -1646,7 +1586,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
int part = cctx.affinity().partition(key);
- offheap.removex(spaceName, part, key, key.valueBytes(cctx.cacheObjectContext()));
+ offheap.removex(spaceName, part, key, cctx);
}
};
}
[33/34] incubator-ignite git commit: ignite-37 Improve offheap
metrics for cache
Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
index a99c4c0..c044ffb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.offheap;
import org.apache.ignite.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.*;
+import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.offheap.*;
@@ -32,6 +33,8 @@ import org.jsr166.*;
import java.util.*;
+import static org.apache.ignite.events.EventType.*;
+
/**
* Manages offheap memory caches.
*/
@@ -97,13 +100,15 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* Ensures that we have {@code keyBytes}.
*
* @param key Key.
- * @param keyBytes Optional key bytes.
- * @return Key bytes
+ * @param cctx Cache context.
+ * @return Key bytes.
* @throws IgniteCheckedException If failed.
*/
- private byte[] keyBytes(Object key, @Nullable byte[] keyBytes) throws IgniteCheckedException {
+ private byte[] keyBytes(KeyCacheObject key, GridCacheContext cctx) throws IgniteCheckedException {
assert key != null;
+ byte[] keyBytes = key.valueBytes(cctx.cacheObjectContext());
+
return keyBytes != null ? keyBytes : marsh.marshal(key);
}
@@ -126,15 +131,20 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
- * @return {@code true} If offheap space contains value for the given key.
+ * @param cctx Cache context.
+ * @return {@code True} If offheap space contains value for the given key.
* @throws IgniteCheckedException If failed.
*/
- public boolean contains(@Nullable String spaceName, int part, Object key, byte[] keyBytes)
+ public boolean contains(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
- return m != null && m.contains(part, U.hash(key), keyBytes(key, keyBytes));
+ boolean hit = m != null && m.contains(part, U.hash(key), keyBytes(key, cctx));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRead(hit);
+
+ return hit;
}
/**
@@ -143,15 +153,20 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
+ * @param cctx Cache context.
* @return Value bytes.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public byte[] get(@Nullable String spaceName, int part, Object key, byte[] keyBytes)
+ @Nullable public byte[] get(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
- return m == null ? null : m.get(part, U.hash(key), keyBytes(key, keyBytes));
+ byte[] bytes = m == null ? null : m.get(part, U.hash(key), keyBytes(key, cctx));
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRead(bytes != null);
+
+ return bytes;
}
/**
@@ -162,15 +177,15 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
+ * @param cctx Cache context.
* @return Tuple where first value is pointer and second is value size.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public IgniteBiTuple<Long, Integer> valuePointer(@Nullable String spaceName, int part, Object key,
- byte[] keyBytes) throws IgniteCheckedException {
+ @Nullable public IgniteBiTuple<Long, Integer> valuePointer(@Nullable String spaceName, int part, KeyCacheObject key,
+ GridCacheContext cctx) throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
- return m == null ? null : m.valuePointer(part, U.hash(key), keyBytes(key, keyBytes));
+ return m == null ? null : m.valuePointer(part, U.hash(key), keyBytes(key, cctx));
}
/**
@@ -179,15 +194,15 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
+ * @param cctx Cache context.
* @throws IgniteCheckedException If failed.
*/
- public void enableEviction(@Nullable String spaceName, int part, Object key, byte[] keyBytes)
+ public void enableEviction(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
if (m != null)
- m.enableEviction(part, U.hash(key), keyBytes(key, keyBytes));
+ m.enableEviction(part, U.hash(key), keyBytes(key, cctx));
}
/**
@@ -196,14 +211,13 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
- * @param ldr Class loader.
- * @return Value bytes.
+ * @param cctx Cache context.
+ * @param ldr Class loader. @return Value bytes.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public <T> T getValue(@Nullable String spaceName, int part, Object key, byte[] keyBytes,
- @Nullable ClassLoader ldr) throws IgniteCheckedException {
- byte[] valBytes = get(spaceName, part, key, keyBytes);
+ @Nullable public <T> T getValue(@Nullable String spaceName, int part, KeyCacheObject key,
+ GridCacheContext cctx, @Nullable ClassLoader ldr) throws IgniteCheckedException {
+ byte[] valBytes = get(spaceName, part, key, cctx);
if (valBytes == null)
return null;
@@ -217,14 +231,23 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
+ * @param cctx Cache context.
* @return Value bytes.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public byte[] remove(@Nullable String spaceName, int part, Object key, byte[] keyBytes) throws IgniteCheckedException {
+ @Nullable public byte[] remove(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
+ throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
- return m == null ? null : m.remove(part, U.hash(key), keyBytes(key, keyBytes));
+ if (m == null)
+ return null;
+
+ byte[] bytes = m.remove(part, U.hash(key), keyBytes(key, cctx));
+
+ if(bytes != null && cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRemove();
+
+ return bytes;
}
/**
@@ -233,11 +256,11 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
* @param valBytes Value bytes.
+ * @param cctx Cache context.
* @throws IgniteCheckedException If failed.
*/
- public void put(@Nullable String spaceName, int part, Object key, byte[] keyBytes, byte[] valBytes)
+ public void put(@Nullable String spaceName, int part, KeyCacheObject key, byte[] valBytes, GridCacheContext cctx)
throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
@@ -245,7 +268,14 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
throw new IgniteCheckedException("Failed to write data to off-heap space, no space registered for name: " +
spaceName);
- m.put(part, U.hash(key), keyBytes(key, keyBytes), valBytes);
+ m.put(part, U.hash(key), keyBytes(key, cctx), valBytes);
+
+ if (cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapWrite();
+
+ if (cctx.events().isRecordable(EVT_CACHE_OBJECT_TO_OFFHEAP))
+ cctx.events().addEvent(part, key, cctx.nodeId(), (IgniteUuid)null, null,
+ EVT_CACHE_OBJECT_TO_OFFHEAP, null, false, null, true, null, null, null);
}
/**
@@ -254,14 +284,23 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
* @param spaceName Space name.
* @param part Partition.
* @param key Key.
- * @param keyBytes Key bytes.
- * @return {@code true} If succeeded.
+ * @param cctx Cache context.
+ * @return {@code True} If succeeded.
* @throws IgniteCheckedException If failed.
*/
- public boolean removex(@Nullable String spaceName, int part, Object key, byte[] keyBytes) throws IgniteCheckedException {
+ public boolean removex(@Nullable String spaceName, int part, KeyCacheObject key, GridCacheContext cctx)
+ throws IgniteCheckedException {
GridOffHeapPartitionedMap m = offheap(spaceName);
- return m != null && m.removex(part, U.hash(key), keyBytes(key, keyBytes));
+ if (m == null)
+ return false;
+
+ boolean rmv = m.removex(part, U.hash(key), keyBytes(key, cctx));
+
+ if(rmv && cctx.config().isStatisticsEnabled())
+ cctx.cache().metrics0().onOffHeapRemove();
+
+ return rmv;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java
index 2ad07b5..5cdc72f 100644
--- a/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java
@@ -100,14 +100,94 @@ public interface CacheMetricsMXBean extends CacheStatisticsMXBean, CacheMXBean,
public long getOverflowSize();
/** {@inheritDoc} */
+ @MXBeanDescription("Number of gets from off-heap memory.")
+ public long getOffHeapGets();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of puts to off-heap memory.")
+ public long getOffHeapPuts();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of removed entries from off-heap memory.")
+ public long getOffHeapRemovals();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of evictions from off-heap memory.")
+ public long getOffHeapEvictions();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of hits on off-heap memory.")
+ public long getOffHeapHits();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Percentage of hits on off-heap memory.")
+ public float getOffHeapHitPercentage();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of misses on off-heap memory.")
+ public long getOffHeapMisses();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Percentage of misses on off-heap memory.")
+ public float getOffHeapMissPercentage();
+
+ /** {@inheritDoc} */
@MXBeanDescription("Number of entries stored in off-heap memory.")
public long getOffHeapEntriesCount();
/** {@inheritDoc} */
+ @MXBeanDescription("Number of primary entries stored in off-heap memory.")
+ public long getOffHeapPrimaryEntriesCount();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of backup stored in off-heap memory.")
+ public long getOffHeapBackupEntriesCount();
+
+ /** {@inheritDoc} */
@MXBeanDescription("Memory size allocated in off-heap.")
public long getOffHeapAllocatedSize();
/** {@inheritDoc} */
+ @MXBeanDescription("Off-heap memory maximum size.")
+ public long getOffHeapMaxSize();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of gets from swap.")
+ public long getSwapGets();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of puts to swap.")
+ public long getSwapPuts();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of removed entries from swap.")
+ public long getSwapRemovals();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of hits on swap.")
+ public long getSwapHits();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of misses on swap.")
+ public long getSwapMisses();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Percentage of hits on swap.")
+ public float getSwapHitPercentage();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Percentage of misses on swap.")
+ public float getSwapMissPercentage();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Number of entries stored in swap.")
+ public long getSwapEntriesCount();
+
+ /** {@inheritDoc} */
+ @MXBeanDescription("Size of swap.")
+ public long getSwapSize();
+
+ /** {@inheritDoc} */
@MXBeanDescription("Number of non-null values in the cache.")
public int getSize();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index 871512c..b13cc97 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -29,7 +29,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.plugin.security.*;
import org.apache.ignite.resources.*;
-import org.apache.ignite.spi.swapspace.*;
+
import org.jetbrains.annotations.*;
import javax.management.*;
@@ -453,19 +453,20 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
boolean isSpiConsistent = false;
- String tipStr = " (fix configuration or set " + "-D" + IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system property)";
+ String tipStr = " (fix configuration or set " +
+ "-D" + IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system property)";
if (rmtCls == null) {
if (!optional && starting)
- throw new IgniteSpiException("Remote SPI with the same name is not configured" + tipStr + " [name=" + name +
- ", loc=" + locCls + ']');
+ throw new IgniteSpiException("Remote SPI with the same name is not configured" + tipStr +
+ " [name=" + name + ", loc=" + locCls + ']');
sb.a(format(">>> Remote SPI with the same name is not configured: " + name, locCls));
}
else if (!locCls.equals(rmtCls)) {
if (!optional && starting)
- throw new IgniteSpiException("Remote SPI with the same name is of different type" + tipStr + " [name=" + name +
- ", loc=" + locCls + ", rmt=" + rmtCls + ']');
+ throw new IgniteSpiException("Remote SPI with the same name is of different type" + tipStr +
+ " [name=" + name + ", loc=" + locCls + ", rmt=" + rmtCls + ']');
sb.a(format(">>> Remote SPI with the same name is of different type: " + name, locCls, rmtCls));
}
@@ -627,27 +628,11 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
}
/** {@inheritDoc} */
- @Override public void writeToSwap(String spaceName, Object key, @Nullable Object val,
- @Nullable ClassLoader ldr) {
- /* No-op. */
- }
-
- /** {@inheritDoc} */
- @Override public <T> T readFromSwap(String spaceName, SwapKey key, @Nullable ClassLoader ldr) {
- return null;
- }
-
- /** {@inheritDoc} */
@Override public int partition(String cacheName, Object key) {
return -1;
}
/** {@inheritDoc} */
- @Override public void removeFromSwap(String spaceName, Object key, @Nullable ClassLoader ldr) {
- // No-op.
- }
-
- /** {@inheritDoc} */
@Override public Collection<ClusterNode> nodes() {
return locNode == null ? Collections.<ClusterNode>emptyList() : Collections.singletonList(locNode);
}
@@ -713,12 +698,6 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
}
/** {@inheritDoc} */
- @Nullable @Override public <T> T readValueFromOffheapAndSwap(@Nullable String spaceName, Object key,
- @Nullable ClassLoader ldr) {
- return null;
- }
-
- /** {@inheritDoc} */
@Override public MessageFormatter messageFormatter() {
return msgFormatter;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
index 6852b6d..55f46e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
@@ -24,7 +24,6 @@ import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.managers.eventstorage.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.plugin.security.*;
-import org.apache.ignite.spi.swapspace.*;
import org.jetbrains.annotations.*;
import javax.cache.*;
@@ -253,30 +252,6 @@ public interface IgniteSpiContext {
public <K> boolean containsKey(String cacheName, K key);
/**
- * Writes object to swap.
- *
- * @param spaceName Swap space name.
- * @param key Key.
- * @param val Value.
- * @param ldr Class loader (optional).
- * @throws IgniteException If any exception occurs.
- */
- public void writeToSwap(String spaceName, Object key, @Nullable Object val, @Nullable ClassLoader ldr)
- throws IgniteException;
-
- /**
- * Reads object from swap.
- *
- * @param spaceName Swap space name.
- * @param key Key.
- * @param ldr Class loader (optional).
- * @return Swapped value.
- * @throws IgniteException If any exception occurs.
- */
- @Nullable public <T> T readFromSwap(String spaceName, SwapKey key, @Nullable ClassLoader ldr)
- throws IgniteException;
-
- /**
* Calculates partition number for given key.
*
* @param cacheName Cache name.
@@ -286,16 +261,6 @@ public interface IgniteSpiContext {
public int partition(String cacheName, Object key);
/**
- * Removes object from swap.
- *
- * @param spaceName Swap space name.
- * @param key Key.
- * @param ldr Class loader (optional).
- * @throws IgniteException If any exception occurs.
- */
- public void removeFromSwap(String spaceName, Object key, @Nullable ClassLoader ldr) throws IgniteException;
-
- /**
* Validates that new node can join grid topology, this method is called on coordinator
* node before new node joins topology.
*
@@ -322,18 +287,6 @@ public interface IgniteSpiContext {
public SecuritySubject authenticatedSubject(UUID subjId) throws IgniteException;
/**
- * Reads swapped cache value from off-heap and swap.
- *
- * @param spaceName Off-heap space name.
- * @param key Key.
- * @param ldr Class loader for unmarshalling.
- * @return Value.
- * @throws IgniteException If any exception occurs.
- */
- @Nullable public <T> T readValueFromOffheapAndSwap(@Nullable String spaceName, Object key,
- @Nullable ClassLoader ldr) throws IgniteException;
-
- /**
* Gets message formatter.
*
* @return Message formatter.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
index e7db285..7a88426 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
@@ -387,15 +387,13 @@ public class FileSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi,
Space space = space(spaceName, false);
- if (space == null)
- return;
-
- byte[] val = space.remove(key, c != null);
+ byte[] val = space == null ? null : space.remove(key, c != null);
if (c != null)
c.apply(val);
- notifyListener(EVT_SWAP_SPACE_DATA_REMOVED, spaceName);
+ if (space != null)
+ notifyListener(EVT_SWAP_SPACE_DATA_REMOVED, spaceName);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/test/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManagerSelfTest.java
index 043311e..27e0fea 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManagerSelfTest.java
@@ -21,10 +21,11 @@ import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.swapspace.*;
+import org.apache.ignite.marshaller.*;
import org.apache.ignite.spi.swapspace.file.*;
import org.apache.ignite.testframework.junits.common.*;
@@ -40,7 +41,10 @@ import static org.apache.ignite.events.EventType.*;
@GridCommonTest(group = "Kernal Self")
public class GridSwapSpaceManagerSelfTest extends GridCommonAbstractTest {
/** */
- private static final String spaceName = "swapspace_mgr";
+ private static final String SPACE_NAME = "swapspace_mgr";
+
+ /** Partition. */
+ private static final int PART = Integer.MAX_VALUE;
/**
*
@@ -64,7 +68,7 @@ public class GridSwapSpaceManagerSelfTest extends GridCommonAbstractTest {
* @param ignite Grid instance.
* @return Swap space manager.
*/
- private GridSwapSpaceManager getSwapSpaceManager(Ignite ignite) {
+ private static GridSwapSpaceManager getSwapSpaceManager(Ignite ignite) {
assert ignite != null;
return ((IgniteKernal) ignite).context().swap();
@@ -89,7 +93,7 @@ public class GridSwapSpaceManagerSelfTest extends GridCommonAbstractTest {
SwapSpaceEvent e = (SwapSpaceEvent) evt;
- assert spaceName.equals(e.space());
+ assert SPACE_NAME.equals(e.space());
assert ignite.cluster().localNode().id().equals(e.node().id());
switch (evt.type()) {
@@ -123,41 +127,55 @@ public class GridSwapSpaceManagerSelfTest extends GridCommonAbstractTest {
GridSwapSpaceManager mgr = getSwapSpaceManager(ignite);
+ ignite.getOrCreateCache((String)null);
+
+ GridKernalContext ctx = ((IgniteKernal)ignite).context();
+
+ GridCacheContext cctx = ((IgniteCacheProxy)ignite.cache(null)).context();
+
+ Marshaller marsh = ctx.config().getMarshaller();
+
assert mgr != null;
// Empty data space.
- assertEquals(0, mgr.swapSize(spaceName));
+ assertEquals(0, mgr.swapSize(SPACE_NAME));
+
+ String key1 = "key1";
+
+ String key2 = "key2";
+
+ KeyCacheObject ckey1 = new KeyCacheObjectImpl(key1, marsh.marshal(key1));
- SwapKey key = new SwapKey("key1");
+ KeyCacheObject ckey2 = new KeyCacheObjectImpl(key2, marsh.marshal(key2));
String val = "value";
- mgr.write(spaceName, key, val.getBytes(), null);
+ mgr.write(SPACE_NAME, PART, ckey1, marsh.marshal(val), cctx);
- mgr.write(spaceName, new SwapKey("key2"), val.getBytes(), null);
+ mgr.write(SPACE_NAME, PART, ckey2, marsh.marshal(val), cctx);
assert storeCnt.await(10, SECONDS);
- byte[] arr = mgr.read(spaceName, key, null);
+ byte[] arr = mgr.read(SPACE_NAME, PART, ckey1, cctx);
assert arr != null;
- assert val.equals(new String(arr));
+ assert val.equals(marsh.unmarshal(arr, cctx.deploy().globalLoader()));
final GridTuple<Boolean> b = F.t(false);
- mgr.remove(spaceName, key, new CI1<byte[]>() {
+ mgr.remove(SPACE_NAME, PART, ckey1, cctx, new CI1<byte[]>() {
@Override public void apply(byte[] rmv) {
b.set(rmv != null);
}
- }, null);
+ });
assert b.get();
assert rmvCnt.await(10, SECONDS);
assert readCnt.await(10, SECONDS);
- mgr.clear(spaceName);
+ mgr.clear(SPACE_NAME);
assert clearCnt.await(10, SECONDS) : "Count: " + clearCnt.getCount();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
new file mode 100644
index 0000000..3d44600
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
@@ -0,0 +1,412 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.cache.local;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.eviction.fifo.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.swapspace.file.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+/**
+ *
+ */
+public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractTest {
+ /** Grid count. */
+ private static final int GRID_CNT = 1;
+
+ /** Keys count. */
+ private static final int KEYS_CNT = 1000;
+
+ /** Max size. */
+ private static final int MAX_SIZE = 100;
+
+ /** Entry size. */
+ private static final int ENTRY_SIZE = 86; // Calculated as allocated size divided on entries count.
+
+ /** Offheap max count. */
+ private static final int OFFHEAP_MAX_CNT = KEYS_CNT / 2;
+
+ /** Offheap max size. */
+ private static final int OFFHEAP_MAX_SIZE = ENTRY_SIZE * OFFHEAP_MAX_CNT;
+
+ /** Cache. */
+ private IgniteCache<Integer, Integer> cache;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
+
+ return cfg;
+ }
+
+ /**
+ * @param offHeapSize Max off-heap size.
+ * @param swapEnabled Swap enabled.
+ */
+ private void createCache(int offHeapSize, boolean swapEnabled) {
+ CacheConfiguration ccfg = defaultCacheConfiguration();
+
+ ccfg.setStatisticsEnabled(true);
+
+ ccfg.setCacheMode(CacheMode.LOCAL);
+ ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+ ccfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
+
+ ccfg.setOffHeapMaxMemory(offHeapSize);
+ ccfg.setSwapEnabled(swapEnabled);
+
+ ccfg.setEvictionPolicy(new FifoEvictionPolicy(MAX_SIZE));
+
+ cache = grid(0).getOrCreateCache(ccfg);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ super.beforeTestsStarted();
+
+ startGrids(GRID_CNT);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ super.afterTestsStopped();
+
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ if (cache != null)
+ cache.close();
+ }
+
+ /**
+ * @throws Exception if failed.
+ */
+ public void testOffHeapMetrics() throws Exception {
+ createCache(0, false);
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.put(i, i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
+ assertEquals(0, cache.metrics().getOffHeapHits());
+ assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
+ assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
+ assertEquals(0, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(0, cache.metrics().getOffHeapEvictions());
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapEntriesCount());
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(0, cache.metrics().getOffHeapEvictions());
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
+ assertEquals(100 / 3.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
+ assertEquals(100 - (100 / 3.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(0, cache.metrics().getOffHeapEvictions());
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.remove(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getOffHeapGets());
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getOffHeapHits());
+ assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
+ assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(0, cache.metrics().getOffHeapEvictions());
+ assertEquals(0, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+ }
+
+ /**
+ * @throws Exception if failed.
+ */
+ public void testSwapMetrics() throws Exception {
+ createCache(-1, true);
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.put(i, i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapGets());
+ assertEquals(0, cache.metrics().getSwapHits());
+ assertEquals(0f, cache.metrics().getSwapHitPercentage());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
+ assertEquals(100f, cache.metrics().getSwapMissPercentage());
+ assertEquals(0, cache.metrics().getSwapRemovals());
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getSwapEntriesCount());
+
+ for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 3, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
+ assertEquals(100 / 3.0, cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+ assertEquals(100 - (100 / 3.0), cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+
+ assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getSwapEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.remove(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getSwapHits());
+ assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+ assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getSwapRemovals());
+
+ assertEquals(0, cache.metrics().getSwapEntriesCount());
+ }
+
+ /**
+ * @throws Exception if failed.
+ */
+ public void testOffHeapAndSwapMetrics() throws Exception {
+ createCache(OFFHEAP_MAX_SIZE, true);
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.put(i, i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
+ assertEquals(0, cache.metrics().getOffHeapHits());
+ assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
+ assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
+ assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
+ assertEquals(0, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapGets());
+ assertEquals(0, cache.metrics().getSwapHits());
+ assertEquals(0f, cache.metrics().getSwapHitPercentage());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
+ assertEquals(100f, cache.metrics().getSwapMissPercentage());
+ assertEquals(0, cache.metrics().getSwapRemovals());
+
+ assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
+ assertEquals(0, cache.metrics().getOffHeapHits());
+ assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
+ assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(0, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
+ assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+
+ assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapEntriesCount());
+
+ for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
+ cache.get(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
+ assertEquals(0, cache.metrics().getOffHeapHits());
+ assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapMisses());
+ assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(0, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 3, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
+ assertEquals(100 / 3.0, cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+ assertEquals(100 - (100 / 3.0), cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+
+ assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapEntriesCount());
+
+ for (int i = 0; i < KEYS_CNT; i++)
+ cache.remove(i);
+
+ printStat();
+
+ assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
+ assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getOffHeapGets());
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapHits());
+ assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getOffHeapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE, cache.metrics().getOffHeapMisses());
+ assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
+ cache.metrics().getOffHeapMissPercentage(), 0.1);
+ assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapRemovals());
+
+ assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
+ assertEquals(0, cache.metrics().getOffHeapEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
+ assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+
+ assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
+ assertEquals(KEYS_CNT * 4 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapGets());
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapHits());
+ assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE - OFFHEAP_MAX_CNT) / (KEYS_CNT * 4.0 - MAX_SIZE - OFFHEAP_MAX_CNT),
+ cache.metrics().getSwapHitPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+ assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE - OFFHEAP_MAX_CNT),
+ cache.metrics().getSwapMissPercentage(), 0.1);
+ assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapRemovals());
+
+ assertEquals(0, cache.metrics().getSwapEntriesCount());
+ }
+
+ /**
+ * Prints stats.
+ */
+ protected void printStat() {
+ System.out.println("!!! -------------------------------------------------------");
+ System.out.println("!!! Puts: cache = " + cache.metrics().getCachePuts() +
+ ", offheap = " + cache.metrics().getOffHeapPuts() +
+ ", swap = " + cache.metrics().getSwapPuts());
+ System.out.println("!!! Gets: cache = " + cache.metrics().getCacheGets() +
+ ", offheap = " + cache.metrics().getOffHeapGets() +
+ ", swap = " + cache.metrics().getSwapGets());
+ System.out.println("!!! Removes: cache = " + cache.metrics().getCacheRemovals() +
+ ", offheap = " + cache.metrics().getOffHeapRemovals() +
+ ", swap = " + cache.metrics().getSwapRemovals());
+ System.out.println("!!! Evictions: cache = " + cache.metrics().getCacheEvictions() +
+ ", offheap = " + cache.metrics().getOffHeapEvictions() +
+ ", swap = none" );
+ System.out.println("!!! Hits: cache = " + cache.metrics().getCacheHits() +
+ ", offheap = " + cache.metrics().getOffHeapHits() +
+ ", swap = " + cache.metrics().getSwapHits());
+ System.out.println("!!! Hit(%): cache = " + cache.metrics().getCacheHitPercentage() +
+ ", offheap = " + cache.metrics().getOffHeapHitPercentage() +
+ ", swap = " + cache.metrics().getSwapHitPercentage());
+ System.out.println("!!! Misses: cache = " + cache.metrics().getCacheMisses() +
+ ", offheap = " + cache.metrics().getOffHeapMisses() +
+ ", swap = " + cache.metrics().getSwapMisses());
+ System.out.println("!!! Miss(%): cache = " + cache.metrics().getCacheMissPercentage() +
+ ", offheap = " + cache.metrics().getOffHeapMissPercentage() +
+ ", swap = " + cache.metrics().getSwapMissPercentage());
+ System.out.println("!!! Entries: cache = " + cache.metrics().getSize() +
+ ", offheap = " + cache.metrics().getOffHeapEntriesCount() +
+ ", swap = " + cache.metrics().getSwapEntriesCount());
+ System.out.println("!!! Size: cache = none" +
+ ", offheap = " + cache.metrics().getOffHeapAllocatedSize() +
+ ", swap = " + cache.metrics().getSwapSize());
+ System.out.println();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index bc04f90..5867fb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -29,7 +29,7 @@ import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.plugin.security.*;
import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.swapspace.*;
+
import org.jetbrains.annotations.*;
import java.io.*;
@@ -447,28 +447,11 @@ public class GridSpiTestContext implements IgniteSpiContext {
}
/** {@inheritDoc} */
- @Override public void writeToSwap(String spaceName, Object key, @Nullable Object val,
- @Nullable ClassLoader ldr) {
- /* No-op. */
- }
-
- /** {@inheritDoc} */
- @Override public <T> T readFromSwap(String spaceName, SwapKey key, @Nullable ClassLoader ldr) {
- return null;
- }
-
- /** {@inheritDoc} */
@Override public int partition(String cacheName, Object key) {
return -1;
}
/** {@inheritDoc} */
- @Override public void removeFromSwap(String spaceName, Object key,
- @Nullable ClassLoader ldr) {
- // No-op.
- }
-
- /** {@inheritDoc} */
@Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node) {
return null;
}
@@ -484,12 +467,6 @@ public class GridSpiTestContext implements IgniteSpiContext {
}
/** {@inheritDoc} */
- @Nullable @Override public <T> T readValueFromOffheapAndSwap(@Nullable String spaceName, Object key,
- @Nullable ClassLoader ldr) {
- return null;
- }
-
- /** {@inheritDoc} */
@Override public MessageFormatter messageFormatter() {
if (formatter == null) {
formatter = new MessageFormatter() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95698790/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
index 1adf55f..9a0e5fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
@@ -39,6 +39,7 @@ public class IgniteCacheMetricsSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCacheReplicatedMetricsSelfTest.class);
suite.addTestSuite(GridCachePartitionedMetricsSelfTest.class);
suite.addTestSuite(GridCachePartitionedHitsAndMissesSelfTest.class);
+ suite.addTestSuite(CacheLocalOffHeapAndSwapMetricsSelfTest.class);
// Atomic cache.
suite.addTestSuite(GridCacheAtomicLocalMetricsSelfTest.class);
[29/34] incubator-ignite git commit: Merge branches 'ignite-830' and
'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-830
Posted by sb...@apache.org.
Merge branches 'ignite-830' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-830
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f8f21816
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f8f21816
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f8f21816
Branch: refs/heads/ignite-37
Commit: f8f21816752ffe39a85ae756b8bf6cdaeec4bd4c
Parents: 195839c d2af9e2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue May 26 09:43:57 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue May 26 09:43:57 2015 +0700
----------------------------------------------------------------------
.gitignore | 3 +-
DEVNOTES.txt | 34 +-
LICENSE | 238 +
LICENSE.txt | 238 -
NOTICE | 12 +
NOTICE.txt | 12 -
assembly/release-base.xml | 10 +-
assembly/release-schema-import.xml | 50 +
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +
bin/include/build-classpath.sh | 71 +
bin/include/functions.sh | 2 +-
bin/include/target-classpath.bat | 46 -
bin/include/target-classpath.sh | 71 -
dev-tools/.gitignore | 2 +
dev-tools/build.gradle | 54 +
dev-tools/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 51017 bytes
.../gradle/wrapper/gradle-wrapper.properties | 6 +
dev-tools/gradlew | 164 +
dev-tools/slurp.sh | 66 +
dev-tools/src/main/groovy/jiraslurp.groovy | 487 ++
examples/pom.xml | 2 +-
.../streaming/StreamTransformerExample.java | 4 +-
.../streaming/StreamVisitorExample.java | 4 +-
.../ignite/examples/streaming/package-info.java | 1 -
.../streaming/wordcount/CacheConfig.java | 7 +-
.../streaming/wordcount/QueryWords.java | 12 +-
.../streaming/wordcount/StreamWords.java | 12 +-
.../streaming/wordcount/package-info.java | 1 -
.../socket/WordsSocketStreamerClient.java | 82 +
.../socket/WordsSocketStreamerServer.java | 124 +
.../wordcount/socket/package-info.java | 21 +
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../config/grid-client-config.properties | 50 +-
modules/clients/pom.xml | 2 +-
.../ClientPropertiesConfigurationSelfTest.java | 12 +-
.../ClientAbstractConnectivitySelfTest.java | 14 +
modules/cloud/pom.xml | 4 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 2 -
modules/codegen/pom.xml | 2 +-
.../ignite/codegen/MessageCodeGenerator.java | 4 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/java/META-INF/LICENSE | 238 +
modules/core/src/main/java/META-INF/NOTICE | 12 +
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../org/apache/ignite/IgniteJdbcDriver.java | 81 +-
.../internal/GridEventConsumeHandler.java | 26 +
.../ignite/internal/GridUpdateNotifier.java | 66 +-
.../apache/ignite/internal/IgniteKernal.java | 109 +-
.../org/apache/ignite/internal/IgnitionEx.java | 151 +-
.../client/GridClientConfiguration.java | 2 +-
.../internal/direct/DirectByteBufferStream.java | 4 +-
.../interop/InteropAwareEventFilter.java | 37 +
.../internal/interop/InteropBootstrap.java | 34 +
.../interop/InteropBootstrapFactory.java | 39 +
.../internal/interop/InteropException.java | 71 +
.../internal/interop/InteropIgnition.java | 166 +
.../interop/InteropLocalEventListener.java | 28 +
.../interop/InteropNoCallbackException.java | 50 +
.../internal/interop/InteropProcessor.java | 36 +
.../managers/communication/GridIoManager.java | 14 +-
.../communication/GridIoMessageFactory.java | 4 +-
.../GridLifecycleAwareMessageFilter.java | 5 +-
.../eventstorage/GridEventStorageManager.java | 29 +-
.../cache/DynamicCacheDescriptor.java | 16 +-
.../processors/cache/GridCacheAdapter.java | 589 +-
.../processors/cache/GridCacheContext.java | 7 +
.../cache/GridCacheEvictionManager.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 320 +-
.../processors/cache/GridCacheMapEntry.java | 123 +-
.../processors/cache/GridCacheMessage.java | 8 +-
.../processors/cache/GridCacheMvccManager.java | 4 +-
.../GridCachePartitionExchangeManager.java | 7 +-
.../processors/cache/GridCacheProcessor.java | 189 +-
.../processors/cache/GridCacheProxyImpl.java | 24 -
.../processors/cache/GridCacheSwapManager.java | 215 +-
.../processors/cache/GridCacheTtlManager.java | 156 +-
.../processors/cache/GridCacheUtils.java | 6 +-
.../processors/cache/IgniteInternalCache.java | 27 -
...ridCacheOptimisticCheckPreparedTxFuture.java | 434 --
...idCacheOptimisticCheckPreparedTxRequest.java | 232 -
...dCacheOptimisticCheckPreparedTxResponse.java | 179 -
.../distributed/GridCacheTxRecoveryFuture.java | 506 ++
.../distributed/GridCacheTxRecoveryRequest.java | 261 +
.../GridCacheTxRecoveryResponse.java | 182 +
.../GridDistributedCacheAdapter.java | 210 +-
.../distributed/GridDistributedLockRequest.java | 111 +-
.../GridDistributedTxFinishRequest.java | 70 +-
.../distributed/GridDistributedTxMapping.java | 5 +-
.../GridDistributedTxPrepareRequest.java | 112 +-
.../GridDistributedTxRemoteAdapter.java | 22 +-
.../distributed/dht/GridDhtCacheAdapter.java | 22 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 2 -
.../distributed/dht/GridDhtLockRequest.java | 45 +-
.../dht/GridDhtOffHeapCacheEntry.java | 63 +
.../dht/GridDhtTransactionalCacheAdapter.java | 15 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 3 -
.../distributed/dht/GridDhtTxFinishRequest.java | 43 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 38 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 95 +-
.../cache/distributed/dht/GridDhtTxMapping.java | 2 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 100 +-
.../dht/GridDhtTxPrepareRequest.java | 60 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 8 +-
.../distributed/dht/GridNoStorageCacheMap.java | 4 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 7 +-
.../atomic/GridDhtAtomicOffHeapCacheEntry.java | 63 +
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 8 +
.../dht/atomic/GridNearAtomicUpdateFuture.java | 44 +-
.../dht/atomic/GridNearAtomicUpdateRequest.java | 36 +-
.../atomic/GridNearAtomicUpdateResponse.java | 18 +-
.../dht/colocated/GridDhtColocatedCache.java | 5 +-
.../colocated/GridDhtColocatedLockFuture.java | 37 +-
.../GridDhtColocatedOffHeapCacheEntry.java | 63 +
.../colocated/GridDhtDetachedCacheEntry.java | 4 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 6 +
.../dht/preloader/GridDhtForceKeysResponse.java | 54 +-
.../GridDhtPartitionsExchangeFuture.java | 2 +-
.../distributed/near/GridNearCacheAdapter.java | 13 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetResponse.java | 8 +-
.../distributed/near/GridNearLockFuture.java | 11 -
.../distributed/near/GridNearLockRequest.java | 61 +-
.../near/GridNearOffHeapCacheEntry.java | 60 +
.../near/GridNearOptimisticTxPrepareFuture.java | 768 ++
.../GridNearPessimisticTxPrepareFuture.java | 347 +
.../near/GridNearTransactionalCache.java | 4 -
.../near/GridNearTxFinishRequest.java | 28 +-
.../cache/distributed/near/GridNearTxLocal.java | 109 +-
.../near/GridNearTxPrepareFuture.java | 1050 ---
.../near/GridNearTxPrepareFutureAdapter.java | 231 +
.../near/GridNearTxPrepareRequest.java | 52 +-
.../near/GridNearTxPrepareResponse.java | 28 +-
.../distributed/near/GridNearTxRemote.java | 24 +-
.../processors/cache/local/GridLocalCache.java | 8 +-
.../cache/local/GridLocalCacheEntry.java | 18 +
.../local/atomic/GridLocalAtomicCache.java | 27 +-
.../cache/query/GridCacheQueryManager.java | 21 +-
.../cache/query/GridCacheSqlQuery.java | 2 +-
.../cache/query/GridCacheTwoStepQuery.java | 17 +
.../cache/transactions/IgniteInternalTx.java | 19 +-
.../transactions/IgniteTransactionsImpl.java | 4 +-
.../cache/transactions/IgniteTxAdapter.java | 76 +-
.../cache/transactions/IgniteTxEntry.java | 48 +-
.../cache/transactions/IgniteTxHandler.java | 106 +-
.../transactions/IgniteTxLocalAdapter.java | 185 +-
.../cache/transactions/IgniteTxLocalEx.java | 21 +-
.../cache/transactions/IgniteTxManager.java | 271 +-
.../datastreamer/DataStreamerImpl.java | 2 +
.../processors/igfs/IgfsDataManager.java | 3 +
.../processors/igfs/IgfsDeleteWorker.java | 4 +
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../internal/processors/igfs/IgfsUtils.java | 11 +-
.../offheap/GridOffHeapProcessor.java | 17 +
.../processors/resource/GridResourceField.java | 16 +-
.../processors/resource/GridResourceIoc.java | 389 +-
.../processors/resource/GridResourceMethod.java | 13 +
.../resource/GridResourceProcessor.java | 20 +-
.../ignite/internal/util/IgniteUtils.java | 28 +-
.../util/lang/GridComputeJobWrapper.java | 96 -
.../util/lang/GridFilteredIterator.java | 2 +-
.../ignite/internal/util/lang/GridFunc.java | 7218 +++++-------------
.../internal/util/nio/GridBufferedParser.java | 4 -
.../internal/util/nio/GridDelimitedParser.java | 91 +
.../util/nio/GridNioDelimitedBuffer.java | 106 +
.../util/offheap/GridOffHeapPartitionedMap.java | 9 +
.../unsafe/GridUnsafePartitionedMap.java | 155 +-
.../internal/visor/query/VisorQueryArg.java | 14 +-
.../internal/visor/query/VisorQueryJob.java | 2 +
.../apache/ignite/lang/IgniteAsyncSupport.java | 4 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 19 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 4 -
.../spi/discovery/tcp/TcpDiscoverySpi.java | 74 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 14 +-
.../org/apache/ignite/stream/StreamAdapter.java | 111 +
.../ignite/stream/StreamTupleExtractor.java | 33 +
.../stream/socket/SocketMessageConverter.java | 31 +
.../ignite/stream/socket/SocketStreamer.java | 218 +
.../ignite/stream/socket/package-info.java | 21 +
.../resources/META-INF/classnames.properties | 13 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../internal/GridUpdateNotifierSelfTest.java | 30 +-
.../processors/cache/CacheGetFromJobTest.java | 110 +
.../cache/CacheOffheapMapEntrySelfTest.java | 168 +
.../cache/CacheRemoveAllSelfTest.java | 81 +
.../GridCacheAbstractFailoverSelfTest.java | 12 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 227 +-
.../cache/GridCacheAbstractSelfTest.java | 4 +-
.../cache/GridCacheSwapReloadSelfTest.java | 20 +-
.../IgniteCacheEntryListenerAbstractTest.java | 4 +-
.../cache/IgniteCacheNearLockValueSelfTest.java | 145 +
.../IgniteCacheP2pUnmarshallingErrorTest.java | 189 +
...gniteCacheP2pUnmarshallingNearErrorTest.java | 56 +
...CacheP2pUnmarshallingRebalanceErrorTest.java | 80 +
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 109 +
.../cache/IgniteCachePeekModesAbstractTest.java | 15 +-
.../cache/OffHeapTieredTransactionSelfTest.java | 127 +
...CacheLoadingConcurrentGridStartSelfTest.java | 163 +
.../GridCacheAbstractNodeRestartSelfTest.java | 101 +-
...GridCacheLoadingConcurrentGridStartTest.java | 154 -
.../distributed/GridCacheLockAbstractTest.java | 2 -
.../distributed/IgniteTxGetAfterStopTest.java | 131 +
...xOriginatingNodeFailureAbstractSelfTest.java | 2 +-
.../dht/GridCacheDhtPreloadSelfTest.java | 2 +-
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 43 +
...achePartitionedNearDisabledLockSelfTest.java | 47 +
...ionedNearDisabledOffHeapFullApiSelfTest.java | 8 +-
...DisabledOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...abledOffHeapTieredAtomicFullApiSelfTest.java | 56 +
...earDisabledOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...rDisabledPrimaryNodeFailureRecoveryTest.java | 31 +
...rtitionedPrimaryNodeFailureRecoveryTest.java | 31 +
...woBackupsPrimaryNodeFailureRecoveryTest.java | 37 +
...ePrimaryNodeFailureRecoveryAbstractTest.java | 533 ++
...idCacheAtomicReplicatedFailoverSelfTest.java | 6 +
...CacheAtomicOffHeapTieredFullApiSelfTest.java | 32 +
...icOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...yWriteOrderOffHeapTieredFullApiSelfTest.java | 33 +
...erOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
...achePartitionedMultiNodeFullApiSelfTest.java | 15 +-
.../GridCachePartitionedNodeRestartTest.java | 4 +-
...dCachePartitionedOffHeapFullApiSelfTest.java | 8 +-
...titionedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...PartitionedOffHeapTieredFullApiSelfTest.java | 32 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 72 +
...ePartitionedOptimisticTxNodeRestartTest.java | 4 +-
.../GridCachePartitionedTxSalvageSelfTest.java | 25 +-
.../near/IgniteCacheNearOnlyTxTest.java | 190 +
.../near/NoneRebalanceModeSelfTest.java | 67 +
.../GridCacheReplicatedFailoverSelfTest.java | 6 +
.../GridCacheReplicatedLockSelfTest.java | 5 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 82 +
...idCacheReplicatedOffHeapFullApiSelfTest.java | 8 +-
...plicatedOffHeapMultiNodeFullApiSelfTest.java | 8 +-
...eReplicatedOffHeapTieredFullApiSelfTest.java | 33 +
...edOffHeapTieredMultiNodeFullApiSelfTest.java | 33 +
.../RandomEvictionPolicyCacheSizeSelfTest.java | 72 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 2 +-
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../expiry/IgniteCacheTtlCleanupSelfTest.java | 85 +
...LocalAtomicOffHeapTieredFullApiSelfTest.java | 32 +
.../GridCacheLocalIsolatedNodesSelfTest.java | 18 +-
.../GridCacheLocalOffHeapFullApiSelfTest.java | 6 +-
...dCacheLocalOffHeapTieredFullApiSelfTest.java | 32 +
.../igfs/IgfsClientCacheSelfTest.java | 132 +
.../processors/igfs/IgfsOneClientNodeTest.java | 133 +
.../processors/igfs/IgfsStreamsSelfTest.java | 2 +-
.../util/nio/GridNioDelimitedBufferTest.java | 112 +
...idFileSwapSpaceSpiMultithreadedLoadTest.java | 4 +-
.../tcp/TcpClientDiscoverySelfTest.java | 8 +
.../discovery/tcp/TcpDiscoveryRestartTest.java | 199 +
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 65 +-
.../stream/socket/SocketStreamerSelfTest.java | 315 +
.../ignite/stream/socket/package-info.java | 21 +
.../ignite/testsuites/IgniteBasicTestSuite.java | 2 +
.../IgniteCacheEvictionSelfTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 10 +-
.../IgniteCacheFullApiSelfTestSuite.java | 18 +
...gniteCacheP2pUnmarshallingErrorTestSuit.java | 41 +
.../testsuites/IgniteCacheRestartTestSuite.java | 11 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 296 +-
.../testsuites/IgniteCacheTestSuite2.java | 144 +
.../testsuites/IgniteCacheTestSuite3.java | 142 +
.../testsuites/IgniteCacheTestSuite4.java | 135 +
.../IgniteCacheTxRecoverySelfTestSuite.java | 4 +
.../ignite/testsuites/IgniteIgfsTestSuite.java | 3 +
.../testsuites/IgniteStreamTestSuite.java | 39 +
.../testsuites/IgniteUtilSelfTestSuite.java | 1 +
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 4 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
.../processors/hadoop/v2/HadoopV2Context.java | 10 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 4 +
.../processors/query/h2/sql/GridSqlQuery.java | 20 +
.../query/h2/sql/GridSqlQueryParser.java | 10 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 11 +-
.../processors/query/h2/sql/GridSqlSelect.java | 2 +-
.../processors/query/h2/sql/GridSqlUnion.java | 2 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 3 +
.../h2/twostep/GridReduceQueryExecutor.java | 119 +-
.../cache/GridCacheOffHeapAndSwapSelfTest.java | 11 +-
.../cache/GridCacheOffHeapSelfTest.java | 11 +-
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 +
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 21 +
...niteCacheP2pUnmarshallingQueryErrorTest.java | 56 +
...eQueryMultiThreadedOffHeapTiredSelfTest.java | 37 +
.../IgniteCacheQueryMultiThreadedSelfTest.java | 29 +-
.../IgniteCacheQuerySelfTestSuite.java | 4 +
.../IgniteCacheWithIndexingTestSuite.java | 2 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../processors/cache/jta/CacheJtaManager.java | 4 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
.../ignite/scalar/ScalarConversions.scala | 8 -
.../scalar/tests/ScalarCacheQueriesSpec.scala | 154 +-
.../ignite/scalar/tests/ScalarCacheSpec.scala | 23 +-
.../scalar/tests/ScalarConversionsSpec.scala | 43 +-
.../scalar/tests/ScalarProjectionSpec.scala | 128 +-
.../scalar/tests/ScalarReturnableSpec.scala | 41 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 8 +-
.../ignite/schema/generator/CodeGenerator.java | 47 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 4 +-
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +-
.../visor/commands/VisorArgListSpec.scala | 60 +-
.../commands/VisorFileNameCompleterSpec.scala | 34 +-
.../commands/ack/VisorAckCommandSpec.scala | 20 +-
.../commands/alert/VisorAlertCommandSpec.scala | 68 +-
.../cache/VisorCacheClearCommandSpec.scala | 48 +-
.../commands/cache/VisorCacheCommandSpec.scala | 66 +-
.../config/VisorConfigurationCommandSpec.scala | 8 +-
.../cswap/VisorCacheSwapCommandSpec.scala | 24 +-
.../deploy/VisorDeployCommandSpec.scala | 10 +-
.../disco/VisorDiscoveryCommandSpec.scala | 46 +-
.../events/VisorEventsCommandSpec.scala | 28 +-
.../visor/commands/gc/VisorGcCommandSpec.scala | 30 +-
.../commands/help/VisorHelpCommandSpec.scala | 57 +-
.../commands/kill/VisorKillCommandSpec.scala | 58 +-
.../commands/log/VisorLogCommandSpec.scala | 10 +-
.../commands/mem/VisorMemoryCommandSpec.scala | 77 +-
.../commands/node/VisorNodeCommandSpec.scala | 22 +-
.../commands/open/VisorOpenCommandSpec.scala | 16 +-
.../commands/ping/VisorPingCommandSpec.scala | 16 +-
.../commands/start/VisorStartCommandSpec.scala | 126 +-
.../commands/tasks/VisorTasksCommandSpec.scala | 112 +-
.../commands/top/VisorTopologyCommandSpec.scala | 52 +-
.../commands/vvm/VisorVvmCommandSpec.scala | 30 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../config/benchmark-client-mode.properties | 89 +
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 5 +
pom.xml | 318 +-
356 files changed, 16270 insertions(+), 12185 deletions(-)
----------------------------------------------------------------------
[06/34] incubator-ignite git commit: 1.0.6-SNAPSHOT
Posted by sb...@apache.org.
1.0.6-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/883ad9ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/883ad9ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/883ad9ca
Branch: refs/heads/ignite-37
Commit: 883ad9ca4702d8a9fd4ae4bcc942465acb8ba9e1
Parents: f8186e8
Author: Ignite Teamcity <ig...@apache.org>
Authored: Thu May 21 12:09:51 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Thu May 21 12:09:51 2015 +0300
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
modules/core/src/main/resources/ignite.properties | 2 +-
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
32 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index e09d7cd..064b804 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
</parent>
<artifactId>ignite-examples</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 9541928..a248f85 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aop</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 88e6358..a6604f9 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-aws</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 0098cc8..96b6542 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-clients</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index 2c3cba5..a5601e2 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
</parent>
<artifactId>ignite-cloud</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<jcloud.version>1.9.0</jcloud.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 1e521f8..ed4aa8f 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-codegen</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index e110a2d..72d993f 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-core</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 80bffed..58aed26 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
# limitations under the License.
#
-ignite.version=1.0.4
+ignite.version=1.0.6
ignite.build=0
ignite.revision=DEV
ignite.rel.date=01011970
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 32bcbd1..2357695 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-p2p</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 06feea3..bffe625 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-extdata-uri</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index a5e1061..f0a559b 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-gce</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index 113e4ce..b8111f1 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-geospatial</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index ca83bcb..782f0c9 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hadoop</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index ae5b481..d9caf79 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-hibernate</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index c19f839..3ac136c 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-indexing</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index 38847ca..d81c7cb 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jcl</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index e0d21b5..e02e601 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-jta</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 6b3e6ba..b07549f 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-log4j</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 1c60fda..4be6b4a 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-rest-http</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index a6a3de2..295d3de 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-scalar</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 3234d2c..1a36beb 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schedule</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 2320b2f..0cda51b 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-schema-import</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index dd3ddfe..d2fdcef 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-slf4j</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index be40124..8494ad0 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-spring</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index c1db109..ba29b8a 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-ssh</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 9d77c37..1e9f270 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-tools</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 2cbffab..b5f5b75 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-urideploy</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 977ef18..45e0f30 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-console</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index 4834d44..edc45b6 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-visor-plugins</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<!-- Ignite dependencies -->
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 6dec7e6..1479e79 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-web</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 2e43355..0c20fbb 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-yardstick</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<properties>
<yardstick.version>0.7.0</yardstick.version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/883ad9ca/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5846d18..16bd08d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.apache.ignite</groupId>
<artifactId>ignite</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.6-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
[28/34] incubator-ignite git commit: ignite-456
Posted by sb...@apache.org.
ignite-456
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d2af9e25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d2af9e25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d2af9e25
Branch: refs/heads/ignite-37
Commit: d2af9e255922077ab5881579c27d363575a6c5df
Parents: edf6ffc
Author: artem.shutak <as...@gridgain.com>
Authored: Mon May 25 18:55:14 2015 +0300
Committer: artem.shutak <as...@gridgain.com>
Committed: Mon May 25 18:55:14 2015 +0300
----------------------------------------------------------------------
dev-tools/slurp.sh | 2 --
dev-tools/src/main/groovy/jiraslurp.groovy | 30 ++++++++++++++++---------
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2af9e25/dev-tools/slurp.sh
----------------------------------------------------------------------
diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh
index 12b91f3..1636f21 100755
--- a/dev-tools/slurp.sh
+++ b/dev-tools/slurp.sh
@@ -58,8 +58,6 @@ git checkout ${DEFAULT_BRANCH}
git pull
export TC_URL=${TC_URL}
-export GIT_USER_NAME=${GIT_USER_NAME}
-export GIT_USER_EMAIL=${GIT_USER_EMAIL}
export JIRA_USER=${JIRA_USER}
export JIRA_PWD=${JIRA_PWD}
export TASK_RUNNER_PWD=${TASK_RUNNER_PWD}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d2af9e25/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 109dfc0..0920001 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -238,6 +238,19 @@ def findAttachments = {
attachments
}
+def tryGitAmAbort = {
+ try {
+ checkprocess "git am --abort".execute(null, new File("../"))
+
+ println "Succsessfull: git am --abort."
+ }
+ catch (Throwable e) {
+ println "Error: git am --abort fails: "
+
+ e.printStackTrace()
+ }
+}
+
/**
* Applys patch from jira to given git state.
*/
@@ -254,7 +267,11 @@ def applyPatch = { jira, attachementURL ->
patchFile << new URL("$ATTACHMENT_URL/$attachementURL/").text
+ println "Got patch content."
+
try {
+ tryGitAmAbort()
+
checkprocess "git branch".execute()
checkprocess "git config user.email \"$userEmail\"".execute(null, new File("../"))
@@ -266,6 +283,8 @@ def applyPatch = { jira, attachementURL ->
checkprocess "git branch".execute()
+ println "Trying to apply patch."
+
checkprocess "git am dev-tools/${patchFile.name}".execute(null, new File("../"))
println "Patch was applied successfully."
@@ -273,16 +292,7 @@ def applyPatch = { jira, attachementURL ->
catch (Exception e) {
println "Patch was not applied successfully. Aborting patch applying."
- try {
- checkprocess "git am --abort".execute(null, new File("../"))
-
- print "Succsessfull: git am --abort."
- }
- catch (Exception e2) {
- print "Error: git am --abort fails: "
-
- e2.printStackTrace()
- }
+ tryGitAmAbort()
throw e;
}
[26/34] incubator-ignite git commit: ignite-456: get contributors list
Posted by sb...@apache.org.
ignite-456: get contributors list
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/515d54ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/515d54ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/515d54ca
Branch: refs/heads/ignite-37
Commit: 515d54caf0ccdc6397255729cb58ddb005aea82d
Parents: 6093619
Author: null <null>
Authored: Mon May 25 16:28:32 2015 +0300
Committer: null <null>
Committed: Mon May 25 16:28:32 2015 +0300
----------------------------------------------------------------------
dev-tools/slurp.sh | 6 -
dev-tools/src/main/groovy/jiraslurp.groovy | 166 +++++++++++++++---------
2 files changed, 106 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/515d54ca/dev-tools/slurp.sh
----------------------------------------------------------------------
diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh
old mode 100644
new mode 100755
index bf1e91a..12b91f3
--- a/dev-tools/slurp.sh
+++ b/dev-tools/slurp.sh
@@ -51,11 +51,6 @@ TASK_RUNNER_USER='task_runner'
#
TASK_RUNNER_PWD=''
-#
-# Space separated logins of jira useres which were approved to auto triggering patches. Like 'user1 user2 user3'.
-#
-JIRA_CONTRIBUTORS=''
-
git fetch
git checkout ${DEFAULT_BRANCH}
@@ -69,6 +64,5 @@ export JIRA_USER=${JIRA_USER}
export JIRA_PWD=${JIRA_PWD}
export TASK_RUNNER_PWD=${TASK_RUNNER_PWD}
export TASK_RUNNER_USER=${TASK_RUNNER_USER}
-export JIRA_CONTRIBUTORS=${JIRA_CONTRIBUTORS}
gradle slurp -b dev-tools/build.gradle
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/515d54ca/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index d70bb32..109dfc0 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -15,6 +15,10 @@
* limitations under the License.
*/
+/*
+ * Start of util methods.
+ */
+
def envVariable = { name, defaultVar ->
def res = System.getenv(name as String)
@@ -34,6 +38,79 @@ def envVariableAsList = { name, defaultList ->
}
/**
+ * Monitors given process and show errors if exist.
+ */
+def checkprocess = { process ->
+ process.waitFor()
+
+ if (process.exitValue() != 0) {
+ println "Return code: " + process.exitValue()
+ println "Errout:\n" + process.err.text
+
+ assert process.exitValue() == 0 || process.exitValue() == 128
+ }
+}
+
+/**
+ * Util method to send http request.
+ */
+def sendHttpRequest = { requestMethod, urlString, user, pwd, postData, contentType ->
+ URL url = new URL(urlString as String);
+
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+
+ String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
+
+ conn.setRequestProperty("Authorization", "Basic " + encoded);
+
+ conn.setDoOutput(true);
+ conn.setRequestMethod(requestMethod);
+
+ if (postData) {
+ conn.setRequestProperty("Content-Type", contentType);
+ conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
+
+ OutputStream os = conn.getOutputStream();
+ os.write(postData.getBytes());
+ os.flush();
+ os.close();
+ }
+
+ conn.connect();
+
+ // Read response.
+ BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+
+ String response = "";
+ String line;
+
+ while ((line = br.readLine()) != null)
+ response += line
+
+ br.close();
+
+ response
+}
+
+/**
+ * Util method to send http POST request.
+ */
+def sendPostRequest = { urlString, user, pwd, postData, contentType ->
+ sendHttpRequest("POST", urlString, user, pwd, postData, contentType);
+}
+
+/**
+ * Util method to send http GET request.
+ */
+def sendGetRequest = { urlString, user, pwd->
+ sendHttpRequest("GET", urlString, user, pwd, null, null);
+}
+
+/*
+ * End of util methods.
+ */
+
+/**
* Parsing a special filter from Apache Ignite JIRA and picking up latest by ID
* attachments to process.
*/
@@ -47,10 +124,34 @@ final def JIRA_CMD = System.getProperty('JIRA_COMMAND', 'jira.sh')
// Envariement variables.
final def TC_PROJECT_NAME = envVariable("PROJECT_NAME", "Ignite")
-
-final def CONTRIBUTORS = envVariableAsList("JIRA_CONTRIBUTORS", [])
final def TC_BUILD_EXCLUDE_LIST = envVariableAsList("BUILD_ID_EXCLUDES", ["Ignite_RunAllTestBuilds"])
+final def JIRA_USER = System.getenv('JIRA_USER')
+final def JIRA_PWD = System.getenv('JIRA_PWD')
+
+final def CONTRIBUTORS = []
+
+def contributors = {
+ if (!CONTRIBUTORS) {
+ def response = sendGetRequest(
+ "$JIRA_URL/jira/rest/api/2/project/12315922/role/10010" as String,
+ JIRA_USER,
+ JIRA_PWD)
+
+ println "Response on contributors request = $response"
+
+ def json = new groovy.json.JsonSlurper().parseText(response)
+
+ json.actors.each {
+ CONTRIBUTORS.add(it.name)
+ }
+
+ println "Contributors list: $CONTRIBUTORS"
+ }
+
+ CONTRIBUTORS
+}
+
/**
* Gets jiras for which test tasks were already triggered.
*
@@ -87,7 +188,7 @@ def getLatestAttachment = { jira ->
.find {
def fName = it.@name.toString()
- CONTRIBUTORS.contains(it.@author as String) &&
+ contributors().contains(it.@author as String) &&
(fName.endsWith(".patch") || fName.endsWith(".txt") || fName.endsWith(".diff"))
}
@@ -138,20 +239,6 @@ def findAttachments = {
}
/**
- * Monitors given process and show errors if exist.
- */
-def checkprocess = { process ->
- process.waitFor()
-
- if (process.exitValue() != 0) {
- println "Return code: " + process.exitValue()
- println "Errout:\n" + process.err.text
-
- assert process.exitValue() == 0 || process.exitValue() == 128
- }
-}
-
-/**
* Applys patch from jira to given git state.
*/
def applyPatch = { jira, attachementURL ->
@@ -232,50 +319,9 @@ def getTestBuilds = { ->
}
/**
- * Util method to send post request.
- */
-def sendPostRequest = { urlString, user, pwd, postData, contentType ->
- URL url = new URL(urlString as String);
-
- HttpURLConnection conn = (HttpURLConnection)url.openConnection();
-
- String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
-
- conn.setRequestProperty("Authorization", "Basic " + encoded);
-
- conn.setDoOutput(true);
- conn.setRequestMethod("POST");
- conn.setRequestProperty("Content-Type", contentType);
- conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
-
- OutputStream os = conn.getOutputStream();
- os.write(postData.getBytes());
- os.flush();
- os.close();
-
- conn.connect();
-
- // Read response.
- BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
-
- String response = "";
- String line;
-
- while ((line = br.readLine()) != null)
- response += line
-
- br.close();
-
- response
-}
-
-/**
* Adds comment to jira ticket.
*/
def addJiraComment = { jiraNum, comment ->
- def user = System.getenv('JIRA_USER')
- def pwd = System.getenv('JIRA_PWD')
-
try {
println "Comment: $comment"
@@ -283,8 +329,8 @@ def addJiraComment = { jiraNum, comment ->
def response = sendPostRequest(
"$JIRA_URL/jira/rest/api/2/issue/$jiraNum/comment" as String,
- user,
- pwd,
+ JIRA_USER,
+ JIRA_PWD,
jsonComment,
"application/json")
[02/34] incubator-ignite git commit: # ignite-830 Add sort for node
addresses in Visor console.
Posted by sb...@apache.org.
# ignite-830 Add sort for node addresses in Visor console.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/195839c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/195839c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/195839c7
Branch: refs/heads/ignite-37
Commit: 195839c745c64e3b7f7a23f1cefaad2e59601ec1
Parents: d617759
Author: Andrey <an...@gridgain.com>
Authored: Thu Apr 30 13:57:22 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Apr 30 13:57:22 2015 +0700
----------------------------------------------------------------------
.../visor/commands/node/VisorNodeCommand.scala | 2 +-
.../commands/tasks/VisorTasksCommand.scala | 2 +-
.../scala/org/apache/ignite/visor/visor.scala | 61 ++++++++++++++++++--
3 files changed, 57 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/195839c7/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
index 064d33e..f4a1f87 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
@@ -159,7 +159,7 @@ class VisorNodeCommand extends VisorConsoleCommand {
t += ("ID8", nid8(node))
t += ("Order", node.order)
- (0 /: node.addresses())((b, a) => { t += ("Address (" + b + ")", a); b + 1 })
+ (0 /: sortAddresses(node.addresses))((b, a) => { t += ("Address (" + b + ")", a); b + 1 })
val m = node.metrics
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/195839c7/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
index 16bce29..e158506 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
@@ -1216,7 +1216,7 @@ class VisorTasksCommand extends VisorConsoleCommand {
eLst.foreach(e => {
e.nodeIds.foreach(id => {
- val host = ignite.cluster.node(id).addresses.headOption
+ val host = sortAddresses(ignite.cluster.node(id).addresses).headOption
if (host.isDefined) {
var eSet = hMap.getOrElse(host.get, Set.empty[VisorExecution])
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/195839c7/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 356c80a..293fe58 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -1699,7 +1699,7 @@ object visor extends VisorTag {
ignite.cluster.nodes().foreach(n => {
setVarIfAbsent(nid8(n), "n")
- val ip = n.addresses().headOption
+ val ip = sortAddresses(n.addresses()).headOption
if (ip.isDefined)
setVarIfAbsent(ip.get, "h")
@@ -1714,7 +1714,7 @@ object visor extends VisorTag {
val node = ignite.cluster.node(de.eventNode().id())
if (node != null) {
- val ip = node.addresses().headOption
+ val ip = sortAddresses(node.addresses).headOption
if (ip.isDefined)
setVarIfAbsent(ip.get, "h")
@@ -1743,11 +1743,11 @@ object visor extends VisorTag {
if (nv.isDefined)
mem.remove(nv.get._1)
- val ip = de.eventNode().addresses.headOption
+ val ip = sortAddresses(de.eventNode().addresses).headOption
if (ip.isDefined) {
val last = !ignite.cluster.nodes().exists(n =>
- n.addresses.size > 0 && n.addresses.head == ip.get
+ n.addresses.size > 0 && sortAddresses(n.addresses).head == ip.get
)
if (last) {
@@ -1858,7 +1858,7 @@ object visor extends VisorTag {
id8 +
(if (v.isDefined) "(@" + v.get._1 + ")" else "") +
", " +
- (if (n == null) NA else n.addresses().headOption.getOrElse(NA))
+ (if (n == null) NA else sortAddresses(n.addresses).headOption.getOrElse(NA))
}
}
@@ -2099,7 +2099,7 @@ object visor extends VisorTag {
neighbors.foreach(n => {
id8s = id8s :+ nodeId8(n.id)
- ips = ips ++ n.addresses()
+ ips = ips ++ n.addresses
cpuLoadSum += n.metrics().getCurrentCpuLoad
@@ -2834,4 +2834,53 @@ object visor extends VisorTag {
else
Long.MaxValue
}
+
+ /**
+ * Sort addresses to properly display in Visor.
+ *
+ * @param addrs Addresses to sort.
+ * @return Sorted list.
+ */
+ def sortAddresses(addrs: Iterable[String]) = {
+ def ipToLong(ip: String) = {
+ try {
+ val octets = if (ip.contains(".")) ip.split('.') else ip.split(':')
+
+ var dec = BigDecimal.valueOf(0L)
+
+ for (i <- 0 until octets.length) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
+
+ dec
+ }
+ catch {
+ case _: Exception => BigDecimal.valueOf(0L)
+ }
+ }
+
+ /**
+ * Sort addresses to properly display in Visor.
+ *
+ * @param addr Address to detect type for.
+ * @return IP class type for sorting in order: public addresses IPv4 + private IPv4 + localhost + IPv6.
+ */
+ def addrType(addr: String) = {
+ if (addr.contains(':'))
+ 4 // IPv6
+ else {
+ try {
+ InetAddress.getByName(addr) match {
+ case ip if ip.isLoopbackAddress => 3 // localhost
+ case ip if ip.isSiteLocalAddress => 2 // private IPv4
+ case _ => 1 // other IPv4
+ }
+ }
+ catch {
+ case ignore: UnknownHostException => 5
+ }
+ }
+ }
+
+ addrs.map(addr => (addrType(addr), ipToLong(addr), addr)).toSeq.
+ sortWith((l, r) => if (l._1 == r._1) l._2.compare(r._2) < 0 else l._1 < r._1).map(_._3)
+ }
}
[18/34] incubator-ignite git commit: [IGNITE-909]: Support
HadoopExternalSplit in HadoopV2Context to get pig jobs to function.
Posted by sb...@apache.org.
[IGNITE-909]: Support HadoopExternalSplit in HadoopV2Context to get pig jobs to function.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c2734e41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c2734e41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c2734e41
Branch: refs/heads/ignite-37
Commit: c2734e4135c5bda3126c0ad865eb0c8e886c16ad
Parents: b375aaa
Author: Evans Ye <in...@gmail.com>
Authored: Fri May 22 16:00:42 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Fri May 22 16:00:42 2015 +0300
----------------------------------------------------------------------
.../internal/processors/hadoop/v2/HadoopV2Context.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2734e41/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
index 3f8e2b6..53159b1 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Context.java
@@ -89,12 +89,12 @@ public class HadoopV2Context extends JobContextImpl implements MapContext, Reduc
inputSplit = new FileSplit(new Path(fileBlock.file()), fileBlock.start(), fileBlock.length(), null);
}
- else if (split instanceof HadoopExternalSplit)
- throw new UnsupportedOperationException(); // TODO
- else if (split instanceof HadoopSplitWrapper)
- inputSplit = (InputSplit) HadoopUtils.unwrapSplit((HadoopSplitWrapper) split);
else
- throw new IllegalStateException();
+ try {
+ inputSplit = (InputSplit) ((HadoopV2TaskContext)ctx).getNativeSplit(split);
+ } catch (IgniteCheckedException e) {
+ throw new IllegalStateException(e);
+ }
}
return inputSplit;
[32/34] incubator-ignite git commit: Merge branch
'ignite-sprint-4-1.0.6-7.0.6' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-4-1.0.6-7.0.6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5
# Conflicts:
# examples/pom.xml
# modules/aop/pom.xml
# modules/aws/pom.xml
# modules/clients/pom.xml
# modules/cloud/pom.xml
# modules/codegen/pom.xml
# modules/core/pom.xml
# modules/core/src/main/resources/ignite.properties
# modules/extdata/p2p/pom.xml
# modules/extdata/uri/pom.xml
# modules/gce/pom.xml
# modules/geospatial/pom.xml
# modules/hadoop/pom.xml
# modules/hibernate/pom.xml
# modules/indexing/pom.xml
# modules/jcl/pom.xml
# modules/jta/pom.xml
# modules/log4j/pom.xml
# modules/rest-http/pom.xml
# modules/scalar/pom.xml
# modules/schedule/pom.xml
# modules/schema-import/pom.xml
# modules/slf4j/pom.xml
# modules/spring/pom.xml
# modules/ssh/pom.xml
# modules/tools/pom.xml
# modules/urideploy/pom.xml
# modules/visor-console/pom.xml
# modules/visor-plugins/pom.xml
# modules/web/pom.xml
# modules/yardstick/pom.xml
# pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d70dbd4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d70dbd4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d70dbd4c
Branch: refs/heads/ignite-37
Commit: d70dbd4ccee8e886a76f5643106927f29dd1bce0
Parents: f39a3a9 8977537
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue May 26 10:16:07 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue May 26 10:16:07 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheProxy.java | 3 +-
.../GridDistributedTxRemoteAdapter.java | 10 ++--
.../processors/query/GridQueryIndexing.java | 16 ++++++
.../processors/query/GridQueryProcessor.java | 52 +++++++-------------
.../query/h2/GridH2IndexingGeoSelfTest.java | 20 +++++++-
.../processors/query/h2/IgniteH2Indexing.java | 17 +++++++
.../query/h2/opt/GridH2AbstractKeyValueRow.java | 18 +++++--
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 4 +-
.../query/h2/sql/GridSqlOperationType.java | 2 +-
.../h2/twostep/GridReduceQueryExecutor.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 2 +-
.../local/IgniteCacheLocalQuerySelfTest.java | 6 +++
12 files changed, 102 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d70dbd4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d70dbd4c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
[15/34] incubator-ignite git commit: ignite-925 - exception message
on disabled indexing
Posted by sb...@apache.org.
ignite-925 - exception message on disabled indexing
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/be24c395
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/be24c395
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/be24c395
Branch: refs/heads/ignite-37
Commit: be24c395e67254a828c86e2701fb787dd5843ed7
Parents: 6aa16b8
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri May 22 13:59:40 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri May 22 13:59:40 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/processors/cache/IgniteCacheProxy.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be24c395/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 2de5bf0..f840015 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -542,7 +542,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
private void validate(Query qry) {
if (!GridQueryProcessor.isEnabled(ctx.config()) && !(qry instanceof ScanQuery) &&
!(qry instanceof ContinuousQuery))
- throw new CacheException("Indexing is disabled for cache: " + ctx.cache().name());
+ throw new CacheException("Indexing is disabled for cache: " + ctx.cache().name() +
+ ". Use setIndexedTypes or setTypeMetadata methods on CacheConfiguration to enable.");
}
/** {@inheritDoc} */
[05/34] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-4' into ignite-sprint-4-1.0.6-7.0.6
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-4' into ignite-sprint-4-1.0.6-7.0.6
Conflicts:
pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f8186e8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f8186e8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f8186e8e
Branch: refs/heads/ignite-37
Commit: f8186e8e35d5c2cd06aafcc9245b9839e2e5e384
Parents: f811f51 cff73bf
Author: avinogradov <av...@gridgain.com>
Authored: Thu May 21 12:03:42 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Thu May 21 12:03:42 2015 +0300
----------------------------------------------------------------------
LICENSE | 238 +++++++++++++++++++++++
LICENSE.txt | 238 -----------------------
NOTICE | 12 ++
NOTICE.txt | 12 --
assembly/release-base.xml | 4 +-
modules/core/src/main/java/META-INF/LICENSE | 238 +++++++++++++++++++++++
modules/core/src/main/java/META-INF/NOTICE | 12 ++
parent/pom.xml | 1 -
pom.xml | 37 +++-
9 files changed, 529 insertions(+), 263 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f8186e8e/pom.xml
----------------------------------------------------------------------
[14/34] incubator-ignite git commit: Added config with client mode
for Yardstick.
Posted by sb...@apache.org.
Added config with client mode for Yardstick.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/02f3a12d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/02f3a12d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/02f3a12d
Branch: refs/heads/ignite-37
Commit: 02f3a12dbbe48f70df922f580dfa75b68add6912
Parents: d3cb5c4
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri May 22 13:47:18 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri May 22 13:47:18 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-client-mode.properties | 89 ++++++++++++++++++++
1 file changed, 89 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/02f3a12d/modules/yardstick/config/benchmark-client-mode.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-client-mode.properties b/modules/yardstick/config/benchmark-client-mode.properties
new file mode 100644
index 0000000..8941417
--- /dev/null
+++ b/modules/yardstick/config/benchmark-client-mode.properties
@@ -0,0 +1,89 @@
+# 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.
+
+#
+# Contains all multicast benchmarks
+#
+
+# JVM options.
+JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
+
+# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
+JVM_OPTS=${JVM_OPTS}" \
+-Xloggc:./gc.log \
+-XX:+PrintGCDetails \
+-verbose:gc \
+-XX:+UseParNewGC \
+-XX:+UseConcMarkSweepGC \
+-XX:+UseTLAB \
+-XX:NewSize=128m \
+-XX:MaxNewSize=128m \
+-XX:MaxTenuringThreshold=0 \
+-XX:SurvivorRatio=1024 \
+-XX:+UseCMSInitiatingOccupancyOnly \
+-XX:CMSInitiatingOccupancyFraction=60 \
+"
+#Ignite version
+ver="RELEASE-"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+RESTART_SERVERS=true
+
+# Probe point writer class name.
+# BENCHMARK_WRITER=
+
+# Comma-separated list of the hosts to run BenchmarkServers on.
+SERVER_HOSTS=localhost,localhost,localhost
+
+# Comma-separated list of the hosts to run BenchmarkDrivers on.
+DRIVER_HOSTS=localhost
+
+# Remote username.
+# REMOTE_USER=
+
+# Number of nodes, used to wait for the specified number of nodes to start.
+nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
+
+# 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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -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 --client -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-1-backup\
+"
[17/34] incubator-ignite git commit: # Fixed downloaded Hive version
to repair the Hadoop tests.
Posted by sb...@apache.org.
# Fixed downloaded Hive version to repair the Hadoop tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b375aaa9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b375aaa9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b375aaa9
Branch: refs/heads/ignite-37
Commit: b375aaa90f31dd3ef140e10f30343a5d8f8eed57
Parents: 0acdc3d
Author: iveselovskiy <iv...@gridgain.com>
Authored: Fri May 22 15:57:11 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Fri May 22 15:57:11 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b375aaa9/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
index 183087c..179f7f0 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
@@ -129,7 +129,7 @@ public class IgniteHadoopTestSuite extends TestSuite {
* @throws Exception If failed.
*/
public static void downloadHive() throws Exception {
- String ver = IgniteSystemProperties.getString("hive.version", "0.13.1");
+ String ver = IgniteSystemProperties.getString("hive.version", "1.2.0");
X.println("Will use Hive version: " + ver);
[13/34] incubator-ignite git commit: # ignite-sprint-5 fixed
TopologyVersionAwareJob
Posted by sb...@apache.org.
# ignite-sprint-5 fixed TopologyVersionAwareJob
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d3cb5c4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d3cb5c4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d3cb5c4e
Branch: refs/heads/ignite-37
Commit: d3cb5c4e42632c6d9b92d9a84749f2732d00f6e5
Parents: 4929c7d
Author: sboikov <sb...@gridgain.com>
Authored: Fri May 22 09:02:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri May 22 09:02:27 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheAdapter.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d3cb5c4e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 8d7b135..d390037 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -5510,7 +5510,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Nullable @Override public final Object execute() {
- waitAffinityReadyFuture();
+ if (!waitAffinityReadyFuture())
+ return null;
IgniteInternalCache cache = ((IgniteKernal)ignite).context().cache().cache(cacheName);
@@ -5525,8 +5526,10 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/**
* Holds (suspends) job execution until our cache version becomes equal to remote cache's version.
+ *
+ * @return {@code True} if topology check passed.
*/
- private void waitAffinityReadyFuture() {
+ private boolean waitAffinityReadyFuture() {
GridCacheProcessor cacheProc = ((IgniteKernal)ignite).context().cache();
AffinityTopologyVersion locTopVer = cacheProc.context().exchange().readyAffinityVersion();
@@ -5535,15 +5538,20 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
IgniteInternalFuture<?> fut = cacheProc.context().exchange().affinityReadyFuture(topVer);
if (fut != null && !fut.isDone()) {
+ jobCtx.holdcc();
+
fut.listen(new CI1<IgniteInternalFuture<?>>() {
- @Override public void apply(IgniteInternalFuture<?> t) {
+ @Override
+ public void apply(IgniteInternalFuture<?> t) {
jobCtx.callcc();
}
});
- jobCtx.holdcc();
+ return false;
}
}
+
+ return true;
}
}
[10/34] incubator-ignite git commit: ignite-930 - test
Posted by sb...@apache.org.
ignite-930 - test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/60c388f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/60c388f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/60c388f7
Branch: refs/heads/ignite-37
Commit: 60c388f7aa732cd44969815497bf461309989f86
Parents: f811f51
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri May 22 08:00:46 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri May 22 08:00:46 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/60c388f7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index daca7dc..2bfca8a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -691,7 +691,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
*/
private static class TestValue implements Serializable {
/** Value. */
- @QuerySqlField
+ @QuerySqlField(index = true)
private int val;
/**