Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-2553

HDFS processors throwing exception from OnSchedule when directory is an invalid URI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Resolved
    • 1.0.0, 0.7.0
    • 1.0.0
    • None
    • None

    Description

      If you enter a directory string that results in an invalid URI, the HDFS processors will throw an unexpected exception from OnScheduled because of a logging statement on in AbstractHadoopProcessor:

      getLogger().info("Initialized a new HDFS File System with working dir: {} default block size: {} default replication: {} config: {}",
                          new Object[] { fs.getWorkingDirectory(), fs.getDefaultBlockSize(new Path(dir)), fs.getDefaultReplication(new Path(dir)), config.toString() });
      

      An example input for the directory that can produce this problem:
      data_${literal('testing'):substring(0,4)%7D

      In addition to this, FetchHDFS, ListHDFS, GetHDFS, and PutHDFS all create new Path instances in their onTrigger methods from the same directory, outside of a try/catch which would result in throwing a ProcessException (if it got past the logging issue above).

      Attachments

        Issue Links

          Activity

            People

              bbende Bryan Bende
              bbende Bryan Bende
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: