私のテーブル構造。Apache igniteはクラスタキーを考慮せずにCassandraテーブルのパーティションキーのクエリを許可しますか?
CREATE TABLE mydb.person (
firstname text,
lastname text,
age int,
birthdate timestamp,
married boolean,
phone text,
PRIMARY KEY (firstname, lastname)
);
と私はすべての人の詳細にファーストネーム 'abc'を取得したいと思います。 私はクラスタキーではなく、パーティションキーのみを提供しています。
結果がキャッシュから取得されるのは、パーティションキーとクラスタキーの両方を指定した場合のみです。
SQLクエリも試しましたが、エラーテーブルが見つかりません。
[エラーPIC] [1] https://i.stack.imgur.com/OFem2.png
キャッシュの設定は以下の通りである:
<!-- Persistence settings for 'cache1' -->
<bean id="cache1_persistence_settings" class="org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings">
<constructor-arg type="org.springframework.core.io.Resource" value="classpath:persistence/primitive/persistence-settings-1.xml" />
</bean>
<!-- Ignite configuration -->
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<list>
<!-- Configuring persistence for "cache1" cache -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="cache1"/>
<property name="readThrough" value="false"/>
<property name="writeThrough" value="true"/>
<property name="writeBehindEnabled" value="true"/>
<property name="writeBehindFlushSize" value="2"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="backups" value="1"/>
<property name="cacheStoreFactory">
<bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
<property name="dataSourceBean" value="cassandraAdminDataSource" />
<property name="persistenceSettingsBean" value="cache1_persistence_settings"/>
</bean>
</property>
</bean>
</list>
</property>
<property name="clientMode" value="false"/>
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!--
Ignite provides several options for automatic discovery that can be used
instead os static IP based discovery. For information on all options refer
to our documentation: http://apacheignite.readme.io/docs/cluster-config
-->
<!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
<!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>192.168.0.3:47500..47509</value>
</list>
</property>
</bean>
およびキーと値のPOJO戦略を使用しています。
ちょうどラインの下に追加することによって、そのウォーキングは、私は私のキャッシュ名がcache1で、テーブルには、がしようとした人物であることを試みたが、それはunbleも、あまりにもAffinityKeyMapped&QuerySqlField使用されたものを、見つけること。 –
それは人のテーブルを見つけることができませんエラーを与える –
あなたの構成ファイルを共有できますか? –