Re: Question on BinaryObject

2023-01-17 Thread Pavel Tupitsyn
Hello, yes, your understanding is correct. On Tue, Jan 17, 2023 at 6:46 PM Peter wrote: > Hello, > > Do I understand correctly, that each BinaryObject that is returned by > IgniteCache.get() and IgniteCache.getAll() method calls on a local node > contains an internal on-heap

Question on BinaryObject

2023-01-17 Thread Peter
Hello, Do I understand correctly, that each BinaryObject that is returned by IgniteCache.get() and IgniteCache.getAll() method calls on a local node contains an internal on-heap byte array, and object unmarshalling occurs from that array, and not from off-heap memory?

Re:Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-20 Thread y
апреля 2022 г., y : Hi , When using binary to insert data, I need to get an exist BinaryObject/BinaryObjectBuilder from the database, similar to the code below. 442062c6$3$1803c222cba$Coremail$hty1994712$163.com If I create a BinaryObjectBuilder directly, inserting binary data does not map to

Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-19 Thread vtchernyi
some fields, build and put in the cache. The builder on the step 3 seems to be the same as the one on the cluent node. Hope that helps,Vladimir 13:06, 18 апреля 2022 г., y <hty1994...@163.com>:Hi ,When using binary to insert data, I need to  get an exist BinaryObject/BinaryObjectBuilder  from t

Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-19 Thread y
network and get its builder (obj.toBuilder()); 4. set some fields, build and put in the cache. The builder on the step 3 seems to be the same as the one on the cluent node. Hope that helps, Vladimir 13:06, 18 апреля 2022 г., y : Hi , When using binary to insert data, I need to get an

Re:Re: Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-19 Thread y
lder (obj.toBuilder()); 4. set some fields, build and put in the cache. The builder on the step 3 seems to be the same as the one on the cluent node. Hope that helps, Vladimir 13:06, 18 апреля 2022 г., y : Hi , When using binary to insert data, I need to get an exist BinaryObject/BinaryObj

Re: Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-19 Thread Vladimir Tchernyi
on the cluent > node. > > Hope that helps, > Vladimir > > 13:06, 18 апреля 2022 г., y : > > Hi , > When using binary to insert data, I need to get *an > exist BinaryObject/BinaryObjectBuilder* from the database, similar to > the code below. > 442062c6$3$1803c22

Re[2]: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-19 Thread Zhenya Stanilovsky
e cluent node. >  >Hope that helps, >Vladimir >  13:06, 18 апреля 2022 г., y < hty1994...@163.com >: >>Hi , >>When using binary to insert data, I need to  get an exist  >>BinaryObject/BinaryObjectBuilder   from the database, similar to the code

Re:Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-18 Thread y
13:06, 18 апреля 2022 г., y : Hi , When using binary to insert data, I need to get an exist BinaryObject/BinaryObjectBuilder from the database, similar to the code below. 442062c6$3$1803c222cba$Coremail$hty1994712$163.com If I create a BinaryObjectBuilder directly, inserting binary data does n

Re: BinaryObject Data Can Not Mapping To SQL-Data

2022-04-18 Thread vtchernyi
, 18 апреля 2022 г., y :Hi ,When using binary to insert data, I need to  get an exist BinaryObject/BinaryObjectBuilder  from the database, similar to the code below. 442062c6$3$1803c222cba$Coremail$hty1994712$163.comIf I create a BinaryObjectBuilder directly, inserting binary data does not map to table

BinaryObject Data Can Not Mapping To SQL-Data

2022-04-18 Thread y
Hi , When using binary to insert data, I need to get an exist BinaryObject/BinaryObjectBuilder from the database, similar to the code below. If I create a BinaryObjectBuilder directly, inserting binary data does not map to table data. The following code will not throw error, but the data is

[2.7.6] Question about BinaryObject/SQL schema

2021-01-26 Thread maxi628
Hello everyone. I'm creating a partitioned cache with persistence enabled. I use java's thin client to connect my app to ignite. I have a pool of reusable connections, as suggested in the documentation since IgniteClient isn't thread safe. After the cache is created, I'm using SQL "ALTER TABLE" t

Re: BinaryObject with '.' (dots) in field names

2020-10-02 Thread akurbanov
Hello Scott, Unfortunately, there is no workaround available to safely use dot within BinaryObject field name. I am not aware of any other things, dot seems to be the only one symbol that affects how BinaryObject is aligned. Best regards, Anton -- Sent from: http://apache-ignite-users.70518

Re: BinaryObject with '.' (dots) in field names

2020-10-02 Thread scottmf
Thanks Anton. We can deal with it by using a placeholder for the dot when interacting with ignite. (Since in our notation we already have dots) Going back to the questions, 1. It sounds like we cannot work around this limitation since it is a reserved character, is that correct? 2. Are there an

Re: BinaryObject with '.' (dots) in field names

2020-10-02 Thread akurbanov
"org" that is missing in this object (the field should be a BinaryObject field named "org" with 3 nested fields), thus, the returned data will be evaluated as nulls. Best regards, Anton -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

BinaryObject with '.' (dots) in field names

2020-10-01 Thread scottmf
y();queryEntity.setKeyType("java.lang.String"); queryEntity.setValueType("deployment"); queryEntity.setFields(fields); cfg.setQueryEntities(Collections.singleton(queryEntity)); IgniteCache deployment = ignite.getOrCreateCache(cfg).withKeepBinar

RE: Unable to read fields value from BinaryObject

2020-09-11 Thread Alexandr Shapkin
: Thursday, September 10, 2020 3:04 PMTo: user@ignite.apache.orgSubject: Re: Unable to read fields value from BinaryObject Hi, Yes, I can reproduce the behavior. It could be an issue with the custombinary mappers.  The weird thing is that the CustomBinaryIdMapper works fine with a singlenode, i.e. if it

Re: Unable to read fields value from BinaryObject

2020-09-10 Thread Alexandr Shapkin
Hi, Yes, I can reproduce the behavior. It could be an issue with the custom binary mappers. The weird thing is that the CustomBinaryIdMapper works fine with a single node, i.e. if it reads and writes the value from a cache, then the mapper is working. But fails on the other node. Meanwhile, it'

Unable to read fields value from BinaryObject

2020-09-07 Thread Wasim Bari
We are facing issue while retrieving values from binary objects if we use custom id mapper. We have two ignite clients. 1) Producer--> Creates cache and add entries to it. 2) Consumer--> Consumes cache entries created by producer. Reads data in BinaryObject form and extracts values from it

Re: BinaryObject field is not update

2020-05-18 Thread Ilya Kasnacheev
in trouble, please help me. > > I use Java ThinClient and Ignite Cache Server. > In client code, I update BinaryObject by BinaryObjectBuilder API. > ex) BinaryObject bo = clientCache.get(KEY); > clientCache.put(KEY, bo.toBuilder().setField("AddField&quo

Re: BinaryObject field is not update

2020-05-14 Thread akorensh
Hi, See: https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/CacheClientBinaryPutGetExample.java and: https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/binary/BinaryObject.html https://apacheignite.readme.io/docs/

BinaryObject field is not update

2020-05-09 Thread takumi
Hello. As I am in trouble, please help me. I use Java ThinClient and Ignite Cache Server. In client code, I update BinaryObject by BinaryObjectBuilder API. ex) BinaryObject bo = clientCache.get(KEY); clientCache.put(KEY, bo.toBuilder().setField("AddField", ...).buil

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-24 Thread Ilya Kasnacheev
Hello! I have added comment to this ticket describing why does it happen and how to fix it. In Ignite, when you get key from your value binary object, it's actually a wrapper pointing at some position in its parent (value) binary object. When you try to put it to cache, indexing cannot process it

Re: BinaryObject and CustomKey

2020-04-20 Thread Evgenii Zhuravlev
; BinaryObjectBuilder builder1 = ignite.binary().builder("keys"); > > BinaryObjectBuilder builder2 = ignite.binary().builder("fields"); > > BinaryObject b1 = null; > > BinaryObject b2 = null; > > builder1.setField(&qu

Re: BinaryObject and CustomKey

2020-04-20 Thread narges saleh
? IgniteDataStreamer streamer = grid.dataStreamer("Customer"); streamer.keepBinary(true); BinaryObjectBuilder builder1 = ignite.binary().builder("keys"); BinaryObjectBuilder builder2 = ignite.binary().builder("fields"); BinaryObject b1 = null;

Re: BinaryObject and CustomKey

2020-04-20 Thread Evgenii Zhuravlev
Hi, >How do I do streamer.addData to add the binary objects? If you want to work without classes, you can use binary object builder, just take it for these types: ignite.binary().builder(CustomKey); ignite.binary().builder(Customer); And set fields in it: builder.setField("Client_ID", value);

BinaryObject and CustomKey

2020-04-20 Thread narges saleh
Hi All, If I have a query entity defined with composite CustomKey, how do I insert to the cache,here, Customer, via the DataStreamer, using binary object builder? Do I need to define an object for the composite CustomKey? I am trying to define all the tables/caches via the configuration file. How d

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-17 Thread akorensh
Maxim, I've an appropriate ticket: https://issues.apache.org/jira/browse/IGNITE-12911 Thanks, Alex -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-17 Thread max904
Thank you, Alex! Yes, I figured that this line indeed causes this crash. And yes, I'm using queries and I need this line. For now, I'm using the workaround I've described (of rebuilding the key BinaryObject). But it's quite expensive operation and I would like to avoid it. This

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-17 Thread max904
Thank you, Alex! Yes, I figured that this line indeed causes this crash. And yes, I'm using queries and I need this line. For now, I'm using the workaround I've described (of rebuilding the key BinaryObject). But it's quite expensive operation and I would like to avoid it. This

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-16 Thread akorensh
Hi, I was able to reproduce your use-case. This line causes the issues you describe: cacheConfig.setIndexedTypes(EmployeeId.class, Employee.class); Comment it out, and everything works. If you need Indexes, define them as need be, but remove these lines: employeeCache.put(key2,

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-15 Thread max904
.class.getName()); key1Builder.setField("employeeNumber", 65348765, Integer.class); key1Builder.setField("departmentNumber", 123, Integer.class); BinaryObject key1 = key1Builder.build(); BinaryObjectBuilder emp1Builder = ignite.binary().builder(Employee.class.getName

Re: Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-10 Thread akorensh
Hi, When running your code I created the cache as follows: IgniteCache employeeCache = ignite.getOrCreateCache("employeeCache").withKeepBinary(); With the ".WithKeepBinary()" flag set code works, otherwise there are serialization errors. If you still get errors w/this flag set, s

Ignite crashes with CorruptedTreeException: "B+Tree is corrupted" on a composite BinaryObject scenario

2020-04-09 Thread max904
Ignite crashes when I use composite BinaryObject as a key and also include it into the value object. Here is the BinaryObject scenario: // create a new composite key BinaryObjectBuilder key1Builder = Ignition.ignite().binary().builder(EmployeeId.class.getName()); key1Builder.setField

Re: Are data in NearCache BinaryObject?

2019-12-12 Thread Prasad Bhalerao
ks, > Nap > > On Thu, Dec 12, 2019 at 5:37 AM Ilya Kasnacheev > wrote: > >> Hello! >> >> It is actually hard to say without debugging. I expect that it is >> BinaryObject or primitive type or byte[]. >> >> It is possible to enable onheap caching,

Re: Are data in NearCache BinaryObject?

2019-12-12 Thread Cong Guo
use a NearCache, but if the data in NearCache are still serialized, this method does not work for my application. Thanks, Nap On Thu, Dec 12, 2019 at 5:37 AM Ilya Kasnacheev wrote: > Hello! > > It is actually hard to say without debugging. I expect that it is > BinaryObject or primi

Re: Are data in NearCache BinaryObject?

2019-12-12 Thread Ilya Kasnacheev
Hello! It is actually hard to say without debugging. I expect that it is BinaryObject or primitive type or byte[]. It is possible to enable onheap caching, in this case objects will be held as is, and also sed copyOnRead=false, in this case objects will not even be copied. However, I'm not

Are data in NearCache BinaryObject?

2019-12-11 Thread Cong Guo
Hi, Are the entries stored in local NearCache on my client node in the format of deserialized java objects or BinaryObject? Will the entry in local on-heap NearCache be deserialized from BinaryObject when I call the get function? Thanks, Nap

Re: Can I update specific field of a binaryobject

2019-03-11 Thread Ilya Kasnacheev
Hello! You can do cache.invoke() with a callback that will update a single field in an object. It will be sent to a specific node in cluster and object in question will not be transferred via network, but processed locally. Note that UPDATE will probably only send request to node containing relev

Re: Can I update specific field of a binaryobject

2019-03-08 Thread Justin Ji
Besides the question above, I have another question. If I use a composed key like this: public class DpKey implements Serializable { //key=devId + "_" + dpId private String key; @AffinityKeyMapped private String devId; //getter setter } Now I need to add records like this, Ignit

Can I update specific field of a binaryobject

2019-03-08 Thread BinaryTree
Hi Igniters - As far as I am known, igniteCache.put(K, V) will replace the value of K with V, but sometimes I just would like to update a specific field of V instead of the whole object. I know that I can update the specific field via igniteCache.query(SqlFieldsQuery), but how-ignite-sql-wor

Re: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-31 Thread Ilya Kasnacheev
t; setObject() with an explicit Types value to specify the type to use. > > at > org.apache.hive.jdbc.HivePreparedStatement.setObject(HivePreparedStatement.java:624) > > at > org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.fillParameter(CacheAbstractJdbcStore.java:1385) &

Re: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-29 Thread Ilya Kasnacheev
events BIGINT, result_code BIGINT, > result_code_events BIGINT, result_code_imsi VARCHAR(16), > result_code_imsi_vector_item_count BIGINT, termination_cause BIGINT, > termination_cause_event BIGINT) clustered by (id) into 2 buckets STORED AS > orc TBLPROPERTIES('transact

RE: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-24 Thread Premachandran, Mahesh (Nokia - IN/Bangalore)
, result_code_events BIGINT, result_code_imsi VARCHAR(16), result_code_imsi_vector_item_count BIGINT, termination_cause BIGINT, termination_cause_event BIGINT) clustered by (id) into 2 buckets STORED AS orc TBLPROPERTIES('transactional'='true'); I am populating a Bi

Re: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-24 Thread Ilya Kasnacheev
ith the client. > > > > Mahesh > > > > *From:* Ilya Kasnacheev > *Sent:* Wednesday, January 23, 2019 6:43 PM > *To:* user@ignite.apache.org > *Subject:* Re: Error while persisting from Ignite to Hive for a > BinaryObject > > > > Hello! > > > > I

RE: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-23 Thread Premachandran, Mahesh (Nokia - IN/Bangalore)
PM To: user@ignite.apache.org Subject: Re: Error while persisting from Ignite to Hive for a BinaryObject Hello! I think that your CacheStore implementation is confused by nested fields or binary object values (what is the type of apn_id?). Consider using CacheJdbcBlobStoreFactory instead which

Re: Error while persisting from Ignite to Hive for a BinaryObject

2019-01-23 Thread Ilya Kasnacheev
Hello! I think that your CacheStore implementation is confused by nested fields or binary object values (what is the type of apn_id?). Consider using CacheJdbcBlobStoreFactory instead which will serialize value to one big field in BinaryObject formar. Regards, -- Ilya Kasnacheev ср, 23 янв

Error while persisting from Ignite to Hive for a BinaryObject

2019-01-23 Thread Premachandran, Mahesh (Nokia - IN/Bangalore)
Hi all, I am trying to stream some data from Kafka to Ignite using IgniteDataStreamer and use 3rd party persistence to move it to HIVE. The data on Kafka is in avro format, which I am deserailising, populating an Ignite BinaryObject using the binary builder and pushing it to Ignite. It works

Re: BinaryObject nested fields syntax?

2018-11-25 Thread Evgenii Zhuravlev
Hi, In this case, customer should be also a BinaryObject, so, you have to access it at first and only after get a certain field. Evgenii сб, 24 нояб. 2018 г. в 00:38, joseheitor : > Given the following model data structure for a given document record: > > { > "tran

BinaryObject nested fields syntax?

2018-11-24 Thread joseheitor
rform a ScanQuery: String date = "2017-12-01"; int amount = 1000; String lastname = "Klebes"; IgniteCache cache = database.getCache().withKeepBinary(); ScanQuery filter = new ScanQuery<>( new IgniteBiPredicate() { @Override public boolean apply(Inte

Re: How to use BinaryObject Cache API to query a table created from JDBC?

2018-10-12 Thread aealexsandrov
S (5, 'John Doe5', 3);"); conn.createStatement().execute("INSERT INTO Person (id, name, city_id) VALUES (6, 'John Doe6', 3);"); conn.createStatement().execute("INSERT INTO Person (id, name, city_id) VALUES (7, '

How to use BinaryObject Cache API to query a table created from JDBC?

2018-10-12 Thread Ray
| 9 | ++++ How can I query this table using BinaryObject Cache API? I tried the code below, but it returns null for object o. public class TestKey { private String a; private Str

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-10-03 Thread Ilya Kasnacheev
Hello! This is the first time such problem is observed, so maybe your case is very uncommon for some reason. Ignite has a thing called "free list" which helps plug holes in Durable Memory pages normally. Regards, -- Ilya Kasnacheev пт, 28 сент. 2018 г. в 18:40, Serg : > Hi, > > I have change

Re: BinaryObject vs a HashMap

2018-10-02 Thread Ilya Kasnacheev
Hello! You cannot avoid deserialization since data is stored in off-heap in serialized form and also perhaps sent over network. If you have a lot of different types, using HashMap will be preferred (with primitive keys/values). You could also try storing byte[] values to have precise control over

BinaryObject vs a HashMap

2018-10-02 Thread Mikael
Hi! Is there some meta data storage overhead for binary object "types" ? I need a cache where the value is pretty much a small key value store (5-10 keys and values, all strings, every value different) and with that few values maybe just two arrays with keys and values or a hash map, but as I

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-28 Thread Serg
Hi, I have changed my data model and the problem is gone. But look like I should be care with data which I upload and will be nice to know which data I can use, maybe I missed smth in docs about data preparation? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-28 Thread ilya.kasnacheev
Hello! It is still a problem for you? I can see slight decrease of fill factor on your chart coupled with slight increase of data region usage. With regards to fragmentation it is to be expected. I have tried your test: 15:04:54,356 INFO [grid-timeout-worker-#23] Metrics for local node (to disa

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-20 Thread Serg
Hello Ilya, I have found that cause of problem the objects which have different size of data. As result I have situation where pageFillFactor increased and offHeapSize is decreased and this trend never end. Grafana screen: https://www.awesomescreenshot.com/image/3619800/ad604d44bae0f241a2618197c

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-11 Thread Ilya Kasnacheev
/SergeyMagid/ignite-reproduce-grow-memory > > Differents in this tests only is data which inserted to cache. > I have previously suppose that problem caused with BinaryObject only but I > reproduced this problem without BinaryObject too. > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-11 Thread Serg
Hi Ilya, I created reproducer with two tests https://github.com/SergeyMagid/ignite-reproduce-grow-memory Differents in this tests only is data which inserted to cache. I have previously suppose that problem caused with BinaryObject only but I reproduced this problem without BinaryObject too

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-10 Thread Ilya Kasnacheev
Hello! There's a WAL reader somewhere in the code, it could help if you have persistence. Note that both invocation and output of this tool is confusing. It would be nice if you had a reproducer which would show this behavior. The snippet that you have posted previously isn't very clear on expect

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-10 Thread Serg
Hi Ilya, Yes growing not so quick but in production we lost near 1GB every day with 15GB of data on each node. I had simplify data classes by remove annotations and this does not help. Is it possible debug off-heap memory? How I can understand where memory goes? -- Sent from: http://apache-ig

Re: Off heap constantly grow on use BinaryObject as field of cached data

2018-09-07 Thread Ilya Kasnacheev
private MapBinaryObject*> customFields; > } > > @Data > private class CustomInfo { > > private Date updateTime; > private boolean deleted; > > } > > /if we do not use BinaryObject in Contact all works as expected./ > > *Prob

Off heap constantly grow on use BinaryObject as field of cached data

2018-09-07 Thread Serg
ate boolean deleted; } /if we do not use BinaryObject in Contact all works as expected./ *Problem* Off-heap memory allocate time to time for the same key new memory pages. As a result, memory is constantly growing, but the data size is not increasing. If we stop ignite and load data again off-h

Re: Determining BinaryObject field type

2018-03-28 Thread David Harvey
I had stopped at BinaryObject, and didn't follow the indirection though type() to BinaryType. I think I assumed that this had only information at the higher level, and wouldn't drill down into the fields. This also answers a question about how to enumerate the fields. Thanks. -DH On W

Re: Determining BinaryObject field type

2018-03-28 Thread Pavel Vinokurov
Dave, There is one way to delete meta data. You could find typeId using ignite.binary().type("package.Employeee").typeId() and remove .bin files in all *binary_meta* subfolders. ​

Re: Determining BinaryObject field type

2018-03-28 Thread Pavel Vinokurov
different > database returns a TIMESTAMP, but our binary object wants a DATE. In > this test case, I could figure out that, but in the general case, I have a > BinaryObject type name, and a field name, and an exception if I try to put > the wrong type in that field. > > The

Determining BinaryObject field type

2018-03-23 Thread Dave Harvey
TIMESTAMP, but our binary object wants a DATE. In this test case, I could figure out that, but in the general case, I have a BinaryObject type name, and a field name, and an exception if I try to put the wrong type in that field. The hokey general solutions I have come up with are: 1) Parse the

Re: query on BinaryObject index and table

2018-02-14 Thread Vladimir Ozerov
supplied, by default it is equal to value type name, e.g. BinaryObject :) > > Also, note that SQL tables have fixed schemas. This means you won't be > able to add a random set of fields in BinaryObject and be able to do SQL > queries on them all. You will have to declare all fields that you

Re: How to use BinaryObject from existing data

2018-01-25 Thread vkulichenko
When you create a table via SQL, you already fully describe its schema, so there is no need for QueryEntity. Can you clarify what you're trying to achieve? -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to use BinaryObject from existing data

2018-01-24 Thread Humphrey
Is it possible to create a table by SQL and then add the QueryEntity (probably when creating the table) so later we are able to search with SqlFieldsQuery property? I mean without creating first a POJO first and defined in the cache configuration. -- Sent from: http://apache-ignite-users.70518.

Re: How to use BinaryObject from existing data

2018-01-24 Thread ezhuravlev
Hi, In your case, you, most possibly use Id as key, and it could be Long or Int. So, you just need to get it by this key. The example you provided describes the case with complex primary key. Evgenii -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

How to use BinaryObject from existing data

2018-01-24 Thread Thomas Isaksen
Hi I have created a table with three columns which I populated using sql. The table is called descriptor and the columns are id,name,description Now I wonder, how can I query this table to get a list of BinaryObjects? In the documentation I found this example: BinaryObject key = ignite.binary

Re: query on BinaryObject index and table

2018-01-22 Thread Denis Magda
Denis > On Jan 22, 2018, at 5:44 AM, Ilya Kasnacheev > wrote: > > Hello Rajesh! > > Table name can be specified in cache configuration's query entity. If not > supplied, by default it is equal to value type name, e.g. BinaryObject :) > > Also, note that SQL

Re: query on BinaryObject index and table

2018-01-22 Thread Ilya Kasnacheev
Hello Rajesh! Table name can be specified in cache configuration's query entity. If not supplied, by default it is equal to value type name, e.g. BinaryObject :) Also, note that SQL tables have fixed schemas. This means you won't be able to add a random set of fields in BinaryObject a

Re: query on BinaryObject index and table

2018-01-21 Thread Rajesh Kishore
etField("name", "organization-" + i).build()); if ( i > 0 && i % 100 == 0 ) System.out.println("Done: " + i); } } } IgniteCache binaryCache = ignite.cache(ORG_CACHE).withKeepBinary(); BinaryOb

Re: query on BinaryObject index and table

2018-01-20 Thread Denis Magda
> On Jan 20, 2018, at 7:20 PM, Rajesh Kishore wrote: > > Hi, > > I have requirement that my schema is not fixed , so I have to use the > BinaryObject approach instead of fixed POJO > > I am relying on OOTB file system persistence mechanism > > My questions

query on BinaryObject index and table

2018-01-20 Thread Rajesh Kishore
Hi, I have requirement that my schema is not fixed , so I have to use the BinaryObject approach instead of fixed POJO I am relying on OOTB file system persistence mechanism My questions are: - How can I specify the indexes on BinaryObject? - If I have to use sql query for retrieving objects

Re: Create BinaryObject without starting Ignite?

2018-01-16 Thread zbyszek
Hi Val, thank you for confirmation. >> What is the purpose of this? Purpose of that was to prepare object prototype (object with the same structure layout to ensure the same schema version for all updates) without having access to Ignite. But as it turned out I managed to obtain the reference to

Re: Create BinaryObject without starting Ignite?

2018-01-15 Thread vkulichenko
zbyszek, Generally, the answer is no. Binary format depends on internal Ignite context, so there is no clean way to create a binary object without starting Ignite. The code that was provided in the referenced thread is a hacky workaround which could probably worked in one of the previous versions,

Create BinaryObject without starting Ignite?

2018-01-15 Thread zbyszek
Hello Igniters, Is it possible to create BinaryObject without starting Ignite? I was trying the following: private static BinaryObject createPrototype() throws IgniteCheckedException { // based on http://apache-ignite-users.70518.x6.nabble.com/Working-Directly-with-Binary-objects

Re: How to configure a QueryEntity for a BinaryObject

2017-09-21 Thread Savagearts
Thanks Evgenii,It does work! -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to configure a QueryEntity for a BinaryObject

2017-09-20 Thread ezhuravlev
Check QueryEntity class, it contains tableName property. Evgenii -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to configure a QueryEntity for a BinaryObject

2017-09-20 Thread Savagearts
Thanks, Evgenii. I removed the indexedTypes configuration according to your suggestion. But it still doesn't work. The ignite throws a exception:"Failed to find SQL table for type: com.example.Foo". (There is a error in the configuration of my previous post, i change the valType from "com.Foo.Bar"

Re: How to configure a QueryEntity for a BinaryObject

2017-09-20 Thread Evgenii Zhuravlev
If you're configuring QueryEntity, you don't need to add to the configuration indexedTypes too. It's just different ways to configure Indexes and queryable fields. Evgenii 2017-09-20 10:10 GMT+03:00 Savagearts : > I failed to configure the binaryobject ignitecache. My cache

Re: How to configure a QueryEntity for a BinaryObject

2017-09-20 Thread Savagearts
I failed to configure the binaryobject ignitecache. My cache configuration as following

Re: How to configure a QueryEntity for a BinaryObject

2017-09-17 Thread Savagearts
Thanks,I'll give it a try -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to configure a QueryEntity for a BinaryObject

2017-09-15 Thread vkulichenko
Hi, Yes, you can do this with, just provide the field name and its type in the QueryEntity#fields map. Is there anything in particular that doesn't work? -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

How to configure a QueryEntity for a BinaryObject

2017-09-15 Thread Savagearts
Hi All: I'm trying to build a cache with type IgniteCache . I've checked all examples in document are just for a POJO definitions with query entity configuration. Can i configure a binary object with query entities configuration? For an instance, I have a BinaryObject with

Re: BinaryObject model replace() in client/server topology fails with ClassNotFoundFunction

2017-09-11 Thread sai kiran nukala
9:50 AM, saikiran939 >> wrote: >> >>> Hi Team, >>> >>> Our team on working on a usecase in which we don't want to have any >>> classes >>> on Ignite Server node's classpath. To achieve this we are making use of >>> Binar

Re: BinaryObject model replace() in client/server topology fails with ClassNotFoundFunction

2017-09-11 Thread Andrey Mashenkov
secase in which we don't want to have any >> classes >> on Ignite Server node's classpath. To achieve this we are making use of >> BinaryObject based querying and putting/replacing values into cache. >> >> We are also using Optimistic Locking to replace the valu

Re: BinaryObject model replace() in client/server topology fails with ClassNotFoundFunction

2017-09-07 Thread sai kiran nukala
have any classes > on Ignite Server node's classpath. To achieve this we are making use of > BinaryObject based querying and putting/replacing values into cache. > > We are also using Optimistic Locking to replace the values into cache using > "binaryObjectcache.repla

Re: BinaryObject model replace() in client/server topology fails with ClassNotFoundFunction

2017-09-07 Thread Andrey Mashenkov
se in which we don't want to have any classes > on Ignite Server node's classpath. To achieve this we are making use of > BinaryObject based querying and putting/replacing values into cache. > > We are also using Optimistic Locking to replace the values into cache using > &

BinaryObject model replace() in client/server topology fails with ClassNotFoundFunction

2017-09-06 Thread saikiran939
Hi Team, Our team on working on a usecase in which we don't want to have any classes on Ignite Server node's classpath. To achieve this we are making use of BinaryObject based querying and putting/replacing values into cache. We are also using Optimistic Locking to replace the values

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-09-05 Thread afedotov
Hi, FYI. Created tickets related to the subject: 1) https://issues.apache.org/jira/browse/IGNITE-6265 2) https://issues.apache.org/jira/browse/IGNITE-6266 3) https://issues.apache.org/jira/browse/IGNITE-6268 -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-09-04 Thread afedotov
Unfortunately, there is neither documentation nor tests for the subject. I'll create tickets for adding a corresponding section to the BinaryMarshaller documentation as well as for tests covering this part of the functionality. Kind regards, Alex -- Sent from: http://apache-ignite-users.70518.

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-09-04 Thread Dmitriy Setrakyan
On Mon, Sep 4, 2017 at 7:40 AM, afedotov wrote: > Hi, > > Actually, flattening the nested properties with aliases works only for one > level as for now. > Looks like it's a bug. I'll file a JIRA ticket for this. > > Alex, maybe one level nesting will be enough for some use cases. Is there an exam

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-09-04 Thread afedotov
Hi, Actually, flattening the nested properties with aliases works only for one level as for now. Looks like it's a bug. I'll file a JIRA ticket for this. Kind regards, Alex -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-09-03 Thread Dmitriy Setrakyan
prop2", String.class.getName(), "prop4"); > qe.addQueryField("attribute.prop.prop1", Double.class.getName(), > "prop5"); > qe.addQueryField("attribute.prop.prop2", String.class.getName(), > "prop6"); >

Re: UPDATE SQL for nested BinaryObject throws exception.

2017-08-31 Thread takumi
qe.addQueryField("attribute.prop2", String.class.getName(), "prop4"); qe.addQueryField("attribute.prop.prop1", Double.class.getName(), "prop5"); qe.addQueryField("attribute.prop.prop2", String.class.getName(), "prop6");

  1   2   >