【发布时间】:2014-01-01 21:32:33
【问题描述】:
我正在试验 DataStax 企业搜索。我有一个两节点集群,我正在使用 Solr 控制台数据导入功能导入数据。根据“配置 Solr”文档 (http://www.datastax.com/docs/datastax_enterprise3.2/solutions/dse_search_schema#configuring-solr),我禁用了我的虚拟节点(cassandra.yaml 中的 num_tokens = 1)。我的简化架构如下:
<schema name="spatial" version="1.1">
<types>
<fieldType name="string" class="solr.StrField" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
<fieldType name="binary" class="solr.BinaryField"/>
<!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
</types>
<fields>
<field name="id" type="string" indexed="true" stored="true"/>
<field name="objectid" type="tint" indexed="true" stored="true" required="true" multiValued="false" />
<field name="guwi" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="country" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="region" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="latlong" type="location" indexed="true" stored="false"/>
</fields>
<defaultSearchField>objectid</defaultSearchField>
<uniqueKey>id</uniqueKey>
</schema>
数据导入成功。但是,当我运行“nodetool status”时,我可以看到负载并没有均匀地分布在我的两个节点上,而是全部集中在我用来执行数据导入的节点上。 我尝试将 uniqueKey 修改为复合键,例如 (id,latlong) 甚至只是 latlong,但它似乎并没有改变负载分布。我错过了什么吗?
谢谢, 里昂
【问题讨论】:
-
你能粘贴到你的“nodetool status yourkeyspace”命令的输出吗?
-
数据中心:datacenter1 =======================状态=上/下|/状态=正常/离开/加入/移动 - 地址负载拥有(有效)主机ID令牌机架UN 10.30.161.137 66.34 MB 93.3%7E4BAC03-FEB9-42BA-AC9A-BF48BE32B36A -880021947208-AC9A-88002194724236A -8800219472428229728 RACK1 UN 10.157.8.94 52.76 KB 6.7%135BFC01-A3D3-4A2B-A681-7667F1ABC47 - 7564491331177403445 机架1
标签: solr cassandra dataimporthandler datastax