Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2753

Error when specifying empty replace string in Search and Replace Interceptor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
      None

      Description

      The user guide specifies that the following configuration

      a1.sources.avroSrc.interceptors.search-replace.replaceString =

      will replace the search pattern with an empty string, but the following error is observed and there is no way to specify an empty replace string

      java.lang.NullPointerException: Must supply a replacement string replaceString (empty is ok)
      at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
      at org.apache.flume.interceptor.SearchAndReplaceInterceptor$Builder.configure(SearchAndReplaceInterceptor.java:108)
      at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:110)

      We need to modify the SearchAndReplaceInterceptor to accept null values for replacement string and use empty string in that case

        Attachments

        1. FLUME-2753.patch
          1.0 kB
          Johny Rufus
        2. FLUME-2753-1.patch
          2 kB
          Johny Rufus

          Activity

            People

            • Assignee:
              jrufus Johny Rufus
              Reporter:
              jrufus Johny Rufus
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: