@Override
  public void flush() {
    try {
      if (conn != null)
        conn.close();
    } catch (Exception e) {
      // do nothing
    }
    conn = null;
  }
This class stores published metrics to the SQL Server database.
contrib/ambari-scom/metrics-sink/src/main/java/org/apache/hadoop/metrics2/sink/SqlSink.java