public static String resolveWildcardAddress() {
    if (preferIPv4Stack) {
      // IPv6 stack is completely disabled on Java side
      return WILDCARD_ADDRESS_IPV4;
    } else if (preferIPv6Addresses) {
      // Dual stack is enabled, and IPv6 addresses are preferred
      return WILDCARD_ADDRESSES_IPV6.get(0);
    } else {
      // Dual stack is enabled, and IPv6 addresses are not preferred
      return WILDCARD_ADDRESS_IPV4;
    }
  }
Get the IPv4 or IPv6 wildcard address for binding on all network interfaces,
depending on Java properties.
@return the wildcard address
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/IPStackUtils.java