Hello,
i'm learning Ignite a few day ago. I have questions and problems stopping my
job, i'm looking help.
I'm using Karaf and i used Ignite via feature installation. My OSGI
Activator extends Ignite IgniteAbstractOsgiContextActivator and i ovveride
with OsgiClassLoadingStrategyType.CONTAINER_SWEEP; because with
BUNDLE_DELEGATING doesn't works.
i'm testing Cache and Singleton Service and for me works very fine also in
fault tolerant with 3 Karaf instance.
I see only bundle in Resolved State | 80 | 1.7.0
| ignite-osgi, Hosts: 55. I'm not very skilled with OSGI, i don't know if
Fragment in Resolved state can generate in future some problems.
55 | Active | 80 | 1.7.0 | ignite-core, Fragments: 57
56 | Active | 80 | 1.0.0.1 | Apache ServiceMix :: Bundles ::
cache-api
57 | Resolved | 80 | 1.7.0 | ignite-osgi, Hosts: 55
58 | Active | 80 | 1.7.0 | ignite-log4j
79 | Active | 80 | 2.0.0 | guava-retrying
82 | Active | 80 | 1.1.0 | Paho MQTT Client
83 | Active | 80 | 20.0.0.rc1 | Guava: Google Core Libraries for
Java
84 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: CORE :: CLUSTER,
Fragments: 103
85 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: MQTT :: API
86 | Active | 80 | 1.0.2.SNAPSHOT | LARA :: MQTT :: Broker
87 | Active | 80 | 18.0.0 | Guava: Google Core Libraries for
Java
96 | Active | 80 | 5.0.0.201203141834 | osgi.enterprise
98 | Active | 80 | 1.4.192 | H2 Database Engine
99 | Active | 80 | 6.2.0.1 | Apache ServiceMix :: Bundles ::
lucene-core
103 | Resolved | 80 | 1.7.0 | ignite-indexing, Hosts: 84
First Question:
Now i need to implement Query Ignite future (SqlQuery, SqlFieldsQuery
ContinuousQuery). I have installed via feature ignite-indexing and also
ignite-indexing, Hosts state in Resolved.
After this installation my Bundles stopped worked, because Ignite cluster
when start throws an exception "org.h2.api.JavaObjectSerializer"
classNotFound... Without to change codes in my bundles.
I modify manifest into ignite-indexing in this way "Fragment-Host:
org.flexvalley.ecosystem.cluster-service"... cluster-service is my bundle
where i have Activator extends IgniteAbstractOsgiContextActivator. Now my
bundle start works fine without problem.
Can you help me please to understand if Resolved and "Fragment-host" it's
rigth? or there is a better approach ?
Second Question:
I'm trying to testing
SqlFieldsQuery top10Qry = new SqlFieldsQuery(
"select _key, _val from String order
by _val desc limit 10");
List<List<?>> top10 =
tmpCache.query(top10Qry).getAll();
without success...
"Indexing is disabled for cache: mqttSingletonService. Use setIndexedTypes
or setTypeMetadata methods on CacheConfiguration to enable."...
But by cache it's configured in this way
CacheConfiguration<String, String> cacheCfg = new
CacheConfiguration<>();
cacheCfg.setBackups(0);
cacheCfg.setName("mqttMessageInCache");
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
// Sliding window of 5 seconds based on creation time.
cacheCfg.setExpiryPolicyFactory(
FactoryBuilder.factoryOf(new
CreatedExpiryPolicy(new Duration(TimeUnit.SECONDS, 3))));
cacheCfg.setIndexedTypes(String.class, String.class);
// ignite.addCacheConfiguration(cacheCfg);
dataMqttStreamer =
ignite.dataStreamer(ignite.getOrCreateCache(cacheCfg).getName());
I hope that you spend your time to help me.
Ciao
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.