src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/MailOutput.java
public static void check(String emailConditionsStr, long value, NameNodeLoader nameNodeLoader)
      throws IOException {
    QueryEngine queryEngine = nameNodeLoader.getQueryEngine();
    List<Function<Long, Boolean>> comparisons = queryEngine.createComparisons(emailConditionsStr);
    boolean shouldEmail = queryEngine.check(comparisons, value);
    if (!shouldEmail) {
      throw new IOException("Failed to meet requirements for email.");
    }
  }
/**
   * Check whether to send email or not against specific value.
   *
   * @param emailConditionsStr the conditions for whether to email
   * @param value the value ot compare against
   * @param nameNodeLoader the NameNodeLoader
   * @throws IOException if email requirements are not met
   */
Check whether to send email or not against specific value.
@param emailConditionsStr the conditions for whether to email
@param value the value ot compare against
@param nameNodeLoader the NameNodeLoader
@throws IOException if email requirements are not met
Check whether to send email or not against specific value . @param emailConditionsStr the conditions for whether to email @param value the value ot compare against @param nameNodeLoader the NameNodeLoader @throws IOException if email requirements are not met
public static void check(String emailConditionsStr, long value, NameNodeLoader nameNodeLoader)
      throws IOException {
    QueryEngine queryEngine = nameNodeLoader.getQueryEngine();
    List<Function<Long, Boolean>> comparisons = queryEngine.createComparisons(emailConditionsStr);
    boolean shouldEmail = queryEngine.check(comparisons, value);
    if (!shouldEmail) {
      throw new IOException("Failed to meet requirements for email.");
    }
  }
public static void check ( String emailConditionsStr , long value , NameNodeLoader nameNodeLoader ) throws IOException { QueryEngine queryEngine = nameNodeLoader . getQueryEngine ( ) ; List < Function < Long , Boolean > > comparisons = queryEngine . createComparisons ( emailConditionsStr ) ; boolean shouldEmail = queryEngine . check ( comparisons , value ) ; if ( ! shouldEmail ) { throw new IOException ( "Failed to meet requirements for email." ) ; } }
Check whether to send email or not against specific value.
Check whether to send email or not against specific value .