You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Igor Sapego (Jira)" <ji...@apache.org> on 2020/12/16 09:50:00 UTC

[jira] [Updated] (IGNITE-13863) Python thin client hangs when object has Boolean field

     [ https://issues.apache.org/jira/browse/IGNITE-13863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Sapego updated IGNITE-13863:
---------------------------------
    Description: 
The first run of python client returns empty result set, all consequence runs just hang:

{code:java}
from pygridgain import Client, GenericObjectMeta
import collections
from pygridgain.datatypes import  *

if __name__ == '__main__':
    client = Client()
    client.connect('localhost', 10800)
    cache = client.get_cache('Batch')
    #client.register_binary_type(BatchConfigurationPK)
    #client.register_binary_type(BatchConfiguration)
    result = cache.scan()
    print([b for b in result])
{code}


{code:java}
public class ObjectTest {

  @QuerySqlField
  private String field1;

  @QuerySqlField
  private String field2;

  @QuerySqlField
  private String field3;

  @QuerySqlField
  private String field4;

  @QuerySqlField
  private Boolean enabled;


  public ObjectTest(String field1, String field2, String field3) {
    this.field1 = field1;
    this.field2 = field2;
    this.field3 = field3;
  }
}
{code}

{code:java}
public static void main(String[] args) throws IgniteException {
        Ignite ignite = Ignition.start("examples/config/example-ignite.xml");

        IgniteCache cache = ignite.getOrCreateCache("Batch");

        for (int i = 0; i < 100; i++) {
            cache.put(i, new ObjectTest("" + i, "" + i, "" + i));
        }
    }
{code}



  was:
The first run of python client returns empty result set, all consequence runs just hang:

{code:java}
from pygridgain import Client, GenericObjectMeta
import collections
from pygridgain.datatypes import  *

if __name__ == '__main__':
    client = Client()
    client.connect('localhost', 10800)
    cache = client.get_cache('Batch')
    #client.register_binary_type(BatchConfigurationPK)
    #client.register_binary_type(BatchConfiguration)
    result = cache.scan()
    print([b for b in result])
{code}


{code:java}

public class ObjectTest {

  @QuerySqlField
  private String field1;

  @QuerySqlField
  private String field2;

  @QuerySqlField
  private String field3;

  @QuerySqlField
  private String field4;

  @QuerySqlField
  private Boolean enabled;


  public ObjectTest(String field1, String field2, String field3) {
    this.field1 = field1;
    this.field2 = field2;
    this.field3 = field3;
  }
}
{code}

{code:java}

public static void main(String[] args) throws IgniteException {
        Ignite ignite = Ignition.start("examples/config/example-ignite.xml");

        IgniteCache cache = ignite.getOrCreateCache("Batch");

        for (int i = 0; i < 100; i++) {
            cache.put(i, new ObjectTest("" + i, "" + i, "" + i));
        }
    }
{code}




> Python thin client hangs when object has Boolean field
> ------------------------------------------------------
>
>                 Key: IGNITE-13863
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13863
>             Project: Ignite
>          Issue Type: Bug
>          Components: thin client
>    Affects Versions: 2.9
>            Reporter: Igor Sapego
>            Assignee: Igor Sapego
>            Priority: Major
>
> The first run of python client returns empty result set, all consequence runs just hang:
> {code:java}
> from pygridgain import Client, GenericObjectMeta
> import collections
> from pygridgain.datatypes import  *
> if __name__ == '__main__':
>     client = Client()
>     client.connect('localhost', 10800)
>     cache = client.get_cache('Batch')
>     #client.register_binary_type(BatchConfigurationPK)
>     #client.register_binary_type(BatchConfiguration)
>     result = cache.scan()
>     print([b for b in result])
> {code}
> {code:java}
> public class ObjectTest {
>   @QuerySqlField
>   private String field1;
>   @QuerySqlField
>   private String field2;
>   @QuerySqlField
>   private String field3;
>   @QuerySqlField
>   private String field4;
>   @QuerySqlField
>   private Boolean enabled;
>   public ObjectTest(String field1, String field2, String field3) {
>     this.field1 = field1;
>     this.field2 = field2;
>     this.field3 = field3;
>   }
> }
> {code}
> {code:java}
> public static void main(String[] args) throws IgniteException {
>         Ignite ignite = Ignition.start("examples/config/example-ignite.xml");
>         IgniteCache cache = ignite.getOrCreateCache("Batch");
>         for (int i = 0; i < 100; i++) {
>             cache.put(i, new ObjectTest("" + i, "" + i, "" + i));
>         }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)