@PluginFactory
  public static HushableRandomAccessFileAppender createAppender(
      @PluginAttribute("fileName") final String fileName,
      @PluginAttribute("append") final String append,
      @PluginAttribute("name") final String name,
      @PluginAttribute("immediateFlush") final String immediateFlush,
      @PluginAttribute("bufferSize") final String bufferSizeStr,
      @PluginAttribute("ignoreExceptions") final String ignore,
      @PluginElement("Layout") Layout<? extends Serializable> layout,
      @PluginElement("Filter") final Filter filter,
      @PluginAttribute("advertise") final String advertise,
      @PluginAttribute("advertiseURI") final String advertiseURI,
      @PluginConfiguration final Configuration config) {

    final boolean isAppend = Booleans.parseBoolean(append, true);
    final boolean isFlush = Booleans.parseBoolean(immediateFlush, true);
    final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
    final boolean isAdvertise = Boolean.parseBoolean(advertise);
    final int bufferSize = Integers.parseInt(bufferSizeStr, 256 * 1024 /* RandomAccessFileManager.DEFAULT_BUFFER_SIZE */);

    if (name == null) {
      LOGGER.error("No name provided for FileAppender");
      return null;
    }

    if (fileName == null) {
      LOGGER.error("No filename provided for FileAppender with name "
          + name);
      return null;
    }
    if (layout == null) {
      layout = PatternLayout.createDefaultLayout();
    }
    final RandomAccessFileManager manager = RandomAccessFileManager.getFileManager(
        fileName, isAppend, isFlush, bufferSize, advertiseURI, layout, config
    );
    if (manager == null) {
      return null;
    }

    return new HushableRandomAccessFileAppender(
        name, layout, filter, manager, fileName, ignoreExceptions, isFlush,
        isAdvertise ? config.getAdvertiser() : null
    );
  }
Create a File Appender.

@param fileName The name and path of the file.
@param append "True" if the file should be appended to, "false" if it
           should be overwritten. The default is "true".
@param name The name of the Appender.
@param immediateFlush "true" if the contents should be flushed on every
           write, "false" otherwise. The default is "true".
@param bufferSizeStr The buffer size, defaults to {@value RandomAccessFileManager#DEFAULT_BUFFER_SIZE}.
@param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
              they are propagated to the caller.
@param layout The layout to use to format the event. If no layout is
           provided the default PatternLayout will be used.
@param filter The filter, if any, to use.
@param advertise "true" if the appender configuration should be
           advertised, "false" otherwise.
@param advertiseURI The advertised URI which can be used to retrieve the
           file contents.
@param config The Configuration.
@return The FileAppender.
ql/src/java/org/apache/hadoop/hive/ql/log/HushableRandomAccessFileAppender.java