Monday, November 30, 2015

Solr - HDFS configuration (HDP)

  1. The following changes only need to be completed for the first Solr node that is started
  2. vim /opt/lucidworks-hdpsearch/solr/server/solr/configsets/data_drive_schema_configs/conf/solrconfig.xml
    1.  <directoryFactory name="DirectoryFactory" class="solr.HdfsDirectoryFactory">
            <str name="solr.hdfs.home">hdfs://<host:port>/user/solr</str>
            <bool name="solr.hdfs.blockcache.enabled">true</bool>
            <int name="solr.hdfs.blockcache.slab.count">1</int>
            <bool name="solr.hdfs.blockcache.direct.memory.allocation">true</bool>
            <int name="solr.hdfs.blockcache.blocksperbank">16384</int>
            <bool name="solr.hdfs.blockcache.read.enabled">true</bool>
            <bool name="solr.hdfs.blockcache.write.enabled">false</bool>
            <bool name="solr.hdfs.nrtcachingdirectory.enable">true</bool>
            <int name="solr.hdfs.nrtcachingdirectory.maxmergesizemb">16</int>
            <int name="solr.hdfs.nrtcachingdirectory.maxcachedmb">192</int>
          </directoryFactory>

    2. add <str name="solr.hdfs.confdir">/usr/hdp/current/hadoop-client/conf</str>, if namenode HA is configured
    3. set lockType to hdfs

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.