public static List<Integer> getAllNodeIds(AdminClient adminClient) {
        List<Integer> nodeIds = Lists.newArrayList();
        for(Integer nodeId: adminClient.getAdminClientCluster().getNodeIds()) {
            nodeIds.add(nodeId);
        }
        return nodeIds;
    }
public static List < Integer > getAllNodeIds ( AdminClient adminClient ) { List < Integer > nodeIds = Lists . newArrayList ( ) ; for ( Integer nodeId : adminClient . getAdminClientCluster ( ) . getNodeIds ( ) ) { nodeIds . add ( nodeId ) ; } return nodeIds ; }
Utility function that fetches node ids.

@param adminClient An instance of AdminClient points to given cluster
@return Node ids in cluster