Skip to content

Commit

Permalink
Fix linked aris cluster override HDInsight cluster issue
Browse files Browse the repository at this point in the history
  • Loading branch information
t-rufang committed Dec 11, 2018
1 parent c9b2676 commit c37c301
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public class ClusterManagerEx {

private static ClusterManagerEx instance = null;

/**
* additionalClusterDetails contains all kinds of linked clusters, which consists of:
* 1. HDInsightAdditionalClusterDetail
* 2. HDInsightLivyLinkClusterDetail
* 3. SqlBigDataLivyLinkClusterDetail
*/
private List<IClusterDetail> additionalClusterDetails = new ArrayList<>();
private List<IClusterDetail> emulatorClusterDetails = new ArrayList<>();

Expand Down Expand Up @@ -257,6 +263,8 @@ public synchronized ImmutableList<IClusterDetail> getClusterDetails() {
.filter(clusterDetail -> clusterDetail.getSubscription().isSelected())
.map(cluster -> { // replace the duplicated cluster with the linked one
Optional<IClusterDetail> inLinkedAndSubscriptionCluster = allAdditionalClusters.stream()
.filter(linkedCluster -> linkedCluster instanceof HDInsightAdditionalClusterDetail ||
linkedCluster instanceof HDInsightLivyLinkClusterDetail)
.filter(linkedCluster -> linkedCluster.getName().equals(cluster.getName()))
.findFirst();

Expand Down

0 comments on commit c37c301

Please sign in to comment.