int
mdns_hazelcast_map_init(void *cache_ctx) {
HazelcastClient *hazelcastClient = (HazelcastClient *)cache_ctx;
IMap<std::string, MCIPortable> mci_serv_map =
hazelcastClient->getMap<std::string, MCIPortable>(MCI_SERVER_HASH);
IMap<std::string, FlowPortable> flow_map =
hazelcastClient->getMap<std::string, FlowPortable>(FLOW_HASH);
//add indices on the maps for items based on which frequent reads happen
mci_serv_map.addIndex("cust_id", true);
flow_map.addIndex("flow_id", true);
flow_map.addIndex("cust_id", true);
return MDNS_DB_OP_OK;
}
terminate called after throwing an instance of 'hazelcast::client::exception::QueryException' what(): ExceptionMessage {Error code:42, Class name that generated the error:com.hazelcast.query.QueryException, java.lang.IllegalArgumentException: There is no suitable accessor for 'cust_id' on class 'class java.lang.String' ReflectionHelper.java line 176 :com.hazelcast.query.impl.getters.ReflectionHelper.createGetter Extractors.java line 125 :com.hazelcast.query.impl.getters.Extractors.instantiateGetter Extractors.java line 102 :com.hazelcast.query.impl.getters.Extractors.getGetter Extractors.java line 64 :com.hazelcast.query.impl.getters.Extractors.extract QueryableEntry.java line 144 :com.hazelcast.query.impl.QueryableEntry.extractAttributeValueFromTargetObject QueryableEntry.java line 82 :com.hazelcast.query.impl.QueryableEntry.extractAttributeValue QueryableEntry.java line 48 :com.hazelcast.query.impl.QueryableEntry.getAttributeValue QueryableEntry.java line 67 :com.hazelcast.query.impl.QueryableEntry.getConverter IndexImpl.java line 67 :com.hazelcast.query.impl.IndexImpl.saveEntryIndex AddIndexOperation.java line 75 :com.hazelcast.map.impl.operation.AddIndexOperation.run OperationRunnerImpl.java line 172 :com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run OperationThread.java line 198 :com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processOperation OperationThread.java line 132 :com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process OperationThread.java line 124 :com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun OperationThread.java line 99 :com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run
Cause error code:25Caused by:java.lang.IllegalArgumentException} at java.lang.IllegalArgumentException: There is no suitable accessor for 'cust_id' on class 'class java.lang.String'
Program received signal SIGABRT, Aborted.
std::auto_ptr<std::string> cust_id;
hazelcast::util::snprintf(cid_buf, 64, "cust_id == %s", cust_id);
hazelcast::util::snprintf(bssid_buf, 64, "bssid == %s", bssid);
std::auto_ptr<query::Predicate> cust_id_pred = std::auto_ptr<query::Predicate>(new hazelcast::client::query::SqlPredicate(cid_buf));
std::auto_ptr<query::Predicate> bssid_pred = std::auto_ptr<query::Predicate>(new hazelcast::client::query::SqlPredicate(bssid_buf));
//returns a vector of MCIPortable obj for a particular cid and bssid
std::vector<MCIPortable> cid_bssid_required_values = cid_mci_map.values(query::AndPredicate().add(cust_id_pred).add(bssid_pred));
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/f4c52533-f9e4-49ba-831b-822ebfe25d03%40googlegroups.com.
So the map key is a string and the value is MCIPortable with data members cust_id and two other strings.