You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/03/06 10:26:46 UTC
[1/4] ignite git commit: ignite-db-x fix ttl tests
Repository: ignite
Updated Branches:
refs/heads/ignite-3477 76cd44d6f -> 13c3cfc1a
ignite-db-x fix ttl tests
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/65c0d1b6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/65c0d1b6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/65c0d1b6
Branch: refs/heads/ignite-3477
Commit: 65c0d1b6c8c12fd7d17a47da5682f357a6868c01
Parents: c6df060
Author: Dmitriy Govorukhin <dg...@gridgain.com>
Authored: Thu Mar 2 12:19:48 2017 +0300
Committer: Dmitriy Govorukhin <dg...@gridgain.com>
Committed: Thu Mar 2 12:19:48 2017 +0300
----------------------------------------------------------------------
.../cache/ttl/CacheTtlAbstractSelfTest.java | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/65c0d1b6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index 6a94c72..1067ccf 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -329,21 +329,9 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
for (int i = 0; i < gridCnt; ++i) {
IgniteCache<Integer, Integer> cache = jcache(i);
- log.info("Size [node=" + i +
- ", heap=" + cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP) +
- ", offheap=" + cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP) + ']');
-
- if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED) {
- assertEquals("Unexpected size, node: " + i, 0, cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
- assertEquals("Unexpected size, node: " + i, size, cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
- }
- else {
- assertEquals("Unexpected size, node: " + i, size > MAX_CACHE_SIZE ? MAX_CACHE_SIZE : size,
- cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
+ log.info("Size [node=" + i + ", " + cache.localSize(PRIMARY, BACKUP, NEAR) + ']');
- assertEquals("Unexpected size, node: " + i,
- size > MAX_CACHE_SIZE ? size - MAX_CACHE_SIZE : 0, cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
- }
+ assertEquals("Unexpected size, node: " + i, size, cache.localSize(PRIMARY, BACKUP, NEAR));
for (int key = 0; key < size; key++)
assertNotNull(cache.localPeek(key));
[3/4] ignite git commit: ignite-db-x remove unnecessary test
Posted by ag...@apache.org.
ignite-db-x remove unnecessary test
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cebc4ff0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cebc4ff0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cebc4ff0
Branch: refs/heads/ignite-3477
Commit: cebc4ff08a667341dbd543ab5491d25cd18aa369
Parents: 2f213d9
Author: Dmitriy Govorukhin <dg...@gridgain.com>
Authored: Mon Mar 6 13:00:12 2017 +0300
Committer: Dmitriy Govorukhin <dg...@gridgain.com>
Committed: Mon Mar 6 13:00:12 2017 +0300
----------------------------------------------------------------------
.../core/src/test/java/FullTextIndexTest.java | 316 -------------------
1 file changed, 316 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cebc4ff0/modules/core/src/test/java/FullTextIndexTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/FullTextIndexTest.java b/modules/core/src/test/java/FullTextIndexTest.java
deleted file mode 100644
index 05a9541..0000000
--- a/modules/core/src/test/java/FullTextIndexTest.java
+++ /dev/null
@@ -1,316 +0,0 @@
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import javax.cache.Cache;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.QueryEntity;
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.cache.QueryIndexType;
-import org.apache.ignite.cache.query.QueryCursor;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.TextQuery;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Created by amashenkov on 17.02.17.
- */
-public class FullTextIndexTest extends GridCommonAbstractTest {
- /** */
- private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
- /**
- * @return Ignite instance.
- */
- protected Ignite ignite() {
- return grid(0);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTest() throws Exception {
- super.afterTest();
-
- ignite().cache(null).removeAll();
- }
-
- /** {@inheritDoc} */
- @Override protected void beforeTestsStarted() throws Exception {
- super.beforeTestsStarted();
-
- startGridsMultiThreaded(1);
- }
-
- /** {@inheritDoc} */
- @Override protected void afterTestsStopped() throws Exception {
- super.afterTestsStopped();
-
- stopAllGrids();
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings("unchecked")
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration c = super.getConfiguration(gridName);
-
- c.setDiscoverySpi(new TcpDiscoverySpi().setForceServerMode(true).setIpFinder(ipFinder));
-
- // Otherwise noop swap space will be chosen on Windows.
-// c.setSwapSpaceSpi(new FileSwapSpaceSpi());
-
- CacheConfiguration cc = defaultCacheConfiguration();
-
- List<QueryEntity> entityList = new ArrayList<>();
-
- QueryEntity qryEntity = new QueryEntity();
-
- qryEntity.setKeyType(Integer.class.getName());
- qryEntity.setValueType(ObjectValue.class.getName());
- qryEntity.addQueryField("strVal", String.class.getName(), null);
-
- QueryIndex index = new QueryIndex(); // Default index type
- index.setFieldNames(Collections.singletonList("strVal"), true);
-
- qryEntity.setIndexes(Arrays.asList(index));
-
- entityList.add(qryEntity);
-
- qryEntity = new QueryEntity();
-
- qryEntity.setKeyType(Integer.class.getName());
- qryEntity.setValueType(ObjectValue2.class.getName());
- qryEntity.addQueryField("strVal", String.class.getName(), null);
-
- index = new QueryIndex();
- index.setIndexType(QueryIndexType.FULLTEXT);
- index.setFieldNames(Collections.singletonList("strVal"), true);
-
- qryEntity.setIndexes(Arrays.asList(index));
-
- entityList.add(qryEntity);
-
- qryEntity = new QueryEntity();
-
- qryEntity.setKeyType(Integer.class.getName());
- qryEntity.setValueType(String.class.getName());
-
-// index = new QueryIndex();
-// index.setIndexType(QueryIndexType.SORTED);
-
- qryEntity.setIndexes(Arrays.asList(index));
-
- entityList.add(qryEntity);
-
- cc.setQueryEntities(entityList);
-
- c.setCacheConfiguration(cc);
-
- return c;
- }
-
- /**
- * JUnit.
- *
- * @throws Exception In case of error.
- */
- public void testObjectSortedIndex() throws Exception {
- IgniteCache<Integer, ObjectValue> cache = ignite().cache(null);
-
- cache.put(1, new ObjectValue("value 1"));
- cache.put(2, new ObjectValue("value 2"));
- cache.put(3, new ObjectValue("value 3"));
-
- QueryCursor<Cache.Entry<Integer, ObjectValue>> qry
- = cache.query(new SqlQuery<Integer, ObjectValue>(ObjectValue.class, "strVal like ?").setArgs("value%"));
-
- int expCnt = 3;
-
- List<Cache.Entry<Integer, ObjectValue>> results = qry.getAll();
-
- assertEquals(expCnt, results.size());
-
- qry = cache.query(new SqlQuery<Integer, ObjectValue>(ObjectValue.class, "strVal > ?").setArgs("value 1"));
-
- results = qry.getAll();
-
- assertEquals(expCnt - 1, results.size());
-
- qry = cache.query(new TextQuery<Integer, ObjectValue>(ObjectValue.class, "value"));
-
- results = qry.getAll();
-
- assertEquals(0, results.size());
- }
-
- /**
- * JUnit.
- *
- * @throws Exception In case of error.
- */
- public void testObjectTextIndex() throws Exception {
- IgniteCache<Integer, ObjectValue2> cache = ignite(0).cache(null);
-
- cache.put(1, new ObjectValue2("value 1"));
- cache.put(2, new ObjectValue2("value 2"));
- cache.put(3, new ObjectValue2("value 3"));
-
- QueryCursor<Cache.Entry<Integer, ObjectValue2>> qry
- = cache.query(new SqlQuery<Integer, ObjectValue2>(ObjectValue2.class, "strVal like ?").setArgs("value%"));
-
- int expCnt = 3;
-
- List<Cache.Entry<Integer, ObjectValue2>> results = qry.getAll();
-
- assertEquals(expCnt, results.size());
-
- qry = cache.query(new SqlQuery<Integer, ObjectValue2>(ObjectValue2.class, "strVal > ?").setArgs("value 1"));
-
- results = qry.getAll();
-
- assertEquals(expCnt - 1, results.size());
-
- qry = cache.query(new TextQuery<Integer, ObjectValue2>(ObjectValue2.class, "value"));
-
- results = qry.getAll();
-
- assertEquals(3, results.size());
- }
-
- /**
- * JUnit.
- *
- * @throws Exception In case of error.
- */
- public void testStringDefaultIndex() throws Exception {
- IgniteCache<Integer, String> cache = ignite(0).cache(null);
-
- cache.put(1, "value 1");
- cache.put(2, "value 2");
- cache.put(3, "value 3");
-
- QueryCursor<Cache.Entry<Integer, String>> qry
- = cache.query(new SqlQuery<Integer, String>(String.class, "_val like ?").setArgs("value%"));
-
- int expCnt = 3;
-
- List<Cache.Entry<Integer, String>> results = qry.getAll();
-
- assertEquals(expCnt, results.size());
-
- qry = cache.query(new SqlQuery<Integer, String>(String.class, "_val > ?").setArgs("value 1"));
-
- results = qry.getAll();
-
- assertEquals(expCnt - 1, results.size());
-
- qry = cache.query(new TextQuery<Integer, String>(String.class, "value"));
-
- results = qry.getAll();
-
- // There is no way to disable FULLTEXT index. So, next line will fails.
- assertEquals(0, results.size());
- }
-
- /**
- * Another test value object.
- */
- private static class ObjectValue {
- /** Value. */
- private String strVal;
-
- /**
- * @param strVal String value.
- */
- ObjectValue(String strVal) {
- this.strVal = strVal;
- }
-
- /**
- * Gets value.
- *
- * @return Value.
- */
- public String value() {
- return strVal;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- ObjectValue other = (ObjectValue)o;
-
- return strVal == null ? other.strVal == null : strVal.equals(other.strVal);
-
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return strVal != null ? strVal.hashCode() : 0;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(ObjectValue.class, this);
- }
- }
-
- /**
- * Another test value object.
- */
- private static class ObjectValue2 {
- /** Value. */
- private String strVal;
-
- /**
- * @param strVal String value.
- */
- ObjectValue2(String strVal) {
- this.strVal = strVal;
- }
-
- /**
- * Gets value.
- *
- * @return Value.
- */
- public String value() {
- return strVal;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- ObjectValue2 other = (ObjectValue2)o;
-
- return strVal == null ? other.strVal == null : strVal.equals(other.strVal);
-
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return strVal != null ? strVal.hashCode() : 0;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(ObjectValue2.class, this);
- }
- }
-}
[2/4] ignite git commit: assert fix
Posted by ag...@apache.org.
assert fix
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2f213d98
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2f213d98
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2f213d98
Branch: refs/heads/ignite-3477
Commit: 2f213d9862421646d3cac6e61111ef71ea294c9e
Parents: 65c0d1b
Author: Konstantin Dudkov <kd...@ya.ru>
Authored: Mon Mar 6 11:52:18 2017 +0300
Committer: Konstantin Dudkov <kd...@ya.ru>
Committed: Mon Mar 6 11:52:18 2017 +0300
----------------------------------------------------------------------
.../internal/processors/query/h2/database/InlineIndexHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2f213d98/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelper.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelper.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelper.java
index 9492241..f385146 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelper.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelper.java
@@ -342,7 +342,7 @@ public class InlineIndexHelper {
return -2;
int c = comp.compare(v1, v);
- assert c > -2;
+ c = c != 0 ? c > 0 ? 1 : -1 : 0;
if (size > 0)
return fixSort(c, sortType());
[4/4] ignite git commit: Merge branch 'ignite-3477' of
https://git-wip-us.apache.org/repos/asf/ignite into ignite-db-x
Posted by ag...@apache.org.
Merge branch 'ignite-3477' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-db-x
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/13c3cfc1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/13c3cfc1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/13c3cfc1
Branch: refs/heads/ignite-3477
Commit: 13c3cfc1a37df5e74d578c9a247f6ffa1253e55a
Parents: cebc4ff 76cd44d
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Mar 6 13:25:15 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Mar 6 13:25:15 2017 +0300
----------------------------------------------------------------------
.../yardstick/IgniteAbstractBenchmark.java | 6 ++
.../yardstick/IgniteBenchmarkArguments.java | 11 +++
.../yardstick/cache/IgnitePutAllBenchmark.java | 95 +++++++++++++++++---
.../cache/IgnitePutAllTxBenchmark.java | 43 +--------
4 files changed, 103 insertions(+), 52 deletions(-)
----------------------------------------------------------------------