Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1817

Audit to Solr fails to log when the number of columns are in large number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • master, 0.7.1
    • 1.0.0, master, 0.7.1
    • Ranger
    • None

    Description

      Audit to Solr fails to log when the number of columns are in large number. This is due to Solr has a hard limit on solr.StrField and if this string is exceeding max length 32766, it throws exception which causes the audit to fail. To overcome this we need to trip this in Audit records and the best place to do it is in solr schema for ranger-audits.

      For this we need to change the file managed_schema in ranger and commit it to zookeeper.
      Change required in the managed_schema file is, find the following in the managed_schema file and add this param to limit the length to 2500 max.

      <filter class="solr.LengthFilterFactory" min="0" max="2500”/>
      

      Final changes:

      <fieldType name="key_lower_case" class="solr.TextField" sortMissingLast="true" omitNorms="true">
      <analyzer>
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.LengthFilterFactory" min="0" max="2500"/>
      </analyzer>
      </fieldType>
      

      Attachments

        1. 0001-RANGER-1817.patch
          1 kB
          Fatima Amjad Khan

        Issue Links

          Activity

            People

              fatimaawez Fatima Amjad Khan
              fatimaawez Fatima Amjad Khan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: