ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Suntsov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-2078) Need to clean cache after query in CacheQueryExample
Date Thu, 03 Dec 2015 11:40:11 GMT
Ilya Suntsov created IGNITE-2078:
------------------------------------

             Summary: Need to clean cache after query in CacheQueryExample
                 Key: IGNITE-2078
                 URL: https://issues.apache.org/jira/browse/IGNITE-2078
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 1.5
         Environment: OS X 10.10.2
jdk 1.7
            Reporter: Ilya Suntsov
            Assignee: Yakov Zhdanov
             Fix For: 1.5


Steps to reproduce:
1. Build examples 
2. Start several nodes: org/apache/ignite/examples/ExampleNodeStartup.java
3. Run org/apache/ignite/examples/datagrid/CacheQueryExample.java
Example output:
{noformat}
>>> Cache query example started.

>>> People with salaries between 0 and 1000 (queried with SCAN query): 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]

>>> People with salaries between 0 and 1000 (queried with SQL query): 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]

>>> People with salaries between 1000 and 2000 (queried with SQL query): 
>>>     Entry [key=AffinityKey [key=6165286975353599015, affKey=-7983468300595888028],
val=Person [firstName=Jane, lastName=Smith, id=6165286975353599015, orgId=-7983468300595888028,
resume=Jane Smith has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=-3732623193094597924, affKey=-6908357575301716955],
val=Person [firstName=John, lastName=Doe, id=-3732623193094597924, orgId=-6908357575301716955,
resume=John Doe has Master Degree., salary=2000.0]]

>>> Following people are 'ApacheIgnite' employees: 

>>> Following people are 'Other' employees: 
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]

>>> Following people have 'Master Degree' in their resumes: 
>>>     Entry [key=AffinityKey [key=6165286975353599015, affKey=-7983468300595888028],
val=Person [firstName=Jane, lastName=Smith, id=6165286975353599015, orgId=-7983468300595888028,
resume=Jane Smith has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=-3732623193094597924, affKey=-6908357575301716955],
val=Person [firstName=John, lastName=Doe, id=-3732623193094597924, orgId=-6908357575301716955,
resume=John Doe has Master Degree., salary=2000.0]]

>>> Following people have 'Bachelor Degree' in their resumes: 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]

>>> Average salary for 'ApacheIgnite' employees: 
>>>     [null]

>>> Names of all employees:
>>>     [Jane Smith]
>>>     [Jane Doe]
>>>     [John Doe]
>>>     [John Smith]

>>> Names of all employees and organizations they belong to:
>>>     [John Smith, Other]

>>> Cache query example finished.
[13:01:23] Ignite node stopped OK [uptime=00:00:01:297]
{noformat}
4. Start example second time (don't stop nodes).
Example output:
{noformat}
>>> Cache query example started.

>>> People with salaries between 0 and 1000 (queried with SCAN query): 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=5197178966669880766, affKey=1592024302498385925],
val=Person [firstName=John, lastName=Smith, id=5197178966669880766, orgId=1592024302498385925,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=8974786509558363413, affKey=5589626694668844],
val=Person [firstName=Jane, lastName=Doe, id=8974786509558363413, orgId=5589626694668844,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]

>>> People with salaries between 0 and 1000 (queried with SQL query): 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=5197178966669880766, affKey=1592024302498385925],
val=Person [firstName=John, lastName=Smith, id=5197178966669880766, orgId=1592024302498385925,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=8974786509558363413, affKey=5589626694668844],
val=Person [firstName=Jane, lastName=Doe, id=8974786509558363413, orgId=5589626694668844,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]

>>> People with salaries between 1000 and 2000 (queried with SQL query): 
>>>     Entry [key=AffinityKey [key=-3732623193094597924, affKey=-6908357575301716955],
val=Person [firstName=John, lastName=Doe, id=-3732623193094597924, orgId=-6908357575301716955,
resume=John Doe has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=5870108035079820267, affKey=5589626694668844],
val=Person [firstName=John, lastName=Doe, id=5870108035079820267, orgId=5589626694668844,
resume=John Doe has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=4778749539838745402, affKey=1592024302498385925],
val=Person [firstName=Jane, lastName=Smith, id=4778749539838745402, orgId=1592024302498385925,
resume=Jane Smith has Master Degree., salary=2000.0]]

>>> Following people are 'ApacheIgnite' employees: 
>>>     Entry [key=AffinityKey [key=8974786509558363413, affKey=5589626694668844],
val=Person [firstName=Jane, lastName=Doe, id=8974786509558363413, orgId=5589626694668844,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=5870108035079820267, affKey=5589626694668844],
val=Person [firstName=John, lastName=Doe, id=5870108035079820267, orgId=5589626694668844,
resume=John Doe has Master Degree., salary=2000.0]]

>>> Following people are 'Other' employees: 
>>>     Entry [key=AffinityKey [key=4778749539838745402, affKey=1592024302498385925],
val=Person [firstName=Jane, lastName=Smith, id=4778749539838745402, orgId=1592024302498385925,
resume=Jane Smith has Master Degree., salary=2000.0]]

>>> Following people have 'Master Degree' in their resumes: 
>>>     Entry [key=AffinityKey [key=-3732623193094597924, affKey=-6908357575301716955],
val=Person [firstName=John, lastName=Doe, id=-3732623193094597924, orgId=-6908357575301716955,
resume=John Doe has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=5870108035079820267, affKey=5589626694668844],
val=Person [firstName=John, lastName=Doe, id=5870108035079820267, orgId=5589626694668844,
resume=John Doe has Master Degree., salary=2000.0]]
>>>     Entry [key=AffinityKey [key=4778749539838745402, affKey=1592024302498385925],
val=Person [firstName=Jane, lastName=Smith, id=4778749539838745402, orgId=1592024302498385925,
resume=Jane Smith has Master Degree., salary=2000.0]]

>>> Following people have 'Bachelor Degree' in their resumes: 
>>>     Entry [key=AffinityKey [key=1717604734904449, affKey=-6908357575301716955],
val=Person [firstName=Jane, lastName=Doe, id=1717604734904449, orgId=-6908357575301716955,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=-591199628496362239, affKey=-7983468300595888028],
val=Person [firstName=John, lastName=Smith, id=-591199628496362239, orgId=-7983468300595888028,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=5197178966669880766, affKey=1592024302498385925],
val=Person [firstName=John, lastName=Smith, id=5197178966669880766, orgId=1592024302498385925,
resume=John Smith has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=8974786509558363413, affKey=5589626694668844],
val=Person [firstName=Jane, lastName=Doe, id=8974786509558363413, orgId=5589626694668844,
resume=Jane Doe has Bachelor Degree., salary=1000.0]]
>>>     Entry [key=AffinityKey [key=5197178966669880766, affKey=1592024302498385925],
val=Person [firstName=John, lastName=Smith, id=5197178966669880766, orgId=1592024302498385925,
resume=John Smith has Bachelor Degree., salary=1000.0]]

>>> Average salary for 'ApacheIgnite' employees: 
>>>     [1500.0]

>>> Names of all employees:
>>>     [John Smith]
>>>     [Jane Doe]
>>>     [John Doe]
>>>     [John Smith]
>>>     [Jane Doe]
>>>     [John Doe]
>>>     [Jane Smith]

>>> Names of all employees and organizations they belong to:
>>>     [Jane Doe, ApacheIgnite]
>>>     [John Doe, ApacheIgnite]
>>>     [Jane Smith, Other]

>>> Cache query example finished.
[13:01:50] Ignite node stopped OK [uptime=00:00:00:438]
{noformat}

Results are different. We have duplicate rows in second time. 





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message