public String getLocalNodeName() {
    if (nodeName == null) {
      try {
        nodeName = InetAddress.getLocalHost().getCanonicalHostName();
      } catch (Exception e) {
        if (DEBUG)
          logger.info("Error during getLocalHostName: " + e.toString());
      }
      if (nodeName == null)
        nodeName = "Unknown";
    }
    return nodeName;
  }
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