Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/688#discussion_r72561906
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/heartbeat/ClusterProtocolHeartbeatMonitor.java
 ---
    @@ -91,12 +91,8 @@ public ClusterProtocolHeartbeatMonitor(final 
ClusterCoordinator clusterCoordinat
             this.clusterNodesPath = 
zkClientConfig.resolvePath("cluster/nodes");
     
             String hostname = 
properties.getProperty(NiFiProperties.CLUSTER_NODE_ADDRESS);
    -        if (hostname == null) {
    -            try {
    -                hostname = InetAddress.getLocalHost().getHostName();
    -            } catch (UnknownHostException e) {
    -                throw new RuntimeException("Unable to determine local 
hostname and the '" + NiFiProperties.CLUSTER_NODE_ADDRESS + "' property is not 
set");
    -            }
    +        if (hostname == null || hostname.trim().isEmpty()) {
    --- End diff --
    
    There's another similar null check against port `if (port == null) {`. I 
think it should be addressed, too.
    We may be able to take advantage of our existing StringUtils.isBlank().


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to