社交网站解决方案,个人做房产网站,合肥专业做网站公司,wordpress 在线咨询问题#xff1a;
第一次往hbase put数据#xff0c;索引同步三个字段#xff0c;第二次更新hbase数据#xff0c;只更新一个字段#xff0c;其他两个字段会消失。 原因#xff1a;
在创建Hbase Indexer 时我们配置文件指定了 read-rownever $ cat morphl…
问题
第一次往hbase put数据索引同步三个字段第二次更新hbase数据只更新一个字段其他两个字段会消失。 原因
在创建Hbase Indexer 时我们配置文件指定了 read-rownever $ cat morphline-hbase-mapper.xml
?xml version1.0?
!-- table需要索引的HBase表名称--
!-- mapper用来实现和读取指定的Morphline配置文件类固定为MorphlineResultToSolrMapper--
indexer tabletableName mappercom.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper read-rownever
!--param中的name参数用来指定当前配置为morphlineFile文件 --
!--value用来指定morphlines.conf文件的路径绝对或者相对路径用来指定本地路径如果是使用Cloudera Manager来管理morphlines.conf就直接写入值morphlines.conf--param namemorphlineFile valuemorphlines.conf/
!--valueZDTableMap这里test3Map是自定义接下来要使用。其他的mapper,param name等属性默认即可--param namemorphlineId valueTableMap/
/indexer 修改为 read-rowdynamic 再次测试发现不会丢失字段 read-row 说明https://github.com/NGDATA/hbase-indexer/wiki/Indexer-configuration#read-row read-row The read-row attribute has two possible values: dynamic, or never. This attribute is only important when using row-based indexing. It specifies whether or not the indexer should re-read data from HBase in order to perform indexing. When set to dynamic, the indexer will read the necessary data from a row if a partial update to the row is performed in HBase. In dynamic mode, the row will not be re-read if all data needed to perform indexing is included in the row update. If this attribute is set to never, a row will never be re-read by the indexer. The default setting is dynamic. 但可能会遇到以下问题使用前需要充分的测试 HBase Indexer导致Solr与HBase数据不一致问题解决 https://blog.csdn.net/d6619309/article/details/51579594