Skip to content

Commit

Permalink
Fix NPE when using ES without dedicated master (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMusch authored Jan 7, 2022
1 parent ce9367f commit 26688f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.airbnb.billow</groupId>
<artifactId>billow</artifactId>
<version>2.21</version>
<version>2.25</version>

<licenses>
<license>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/airbnb/billow/ElasticsearchCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public ElasticsearchCluster(ElasticsearchDomainStatus domainStatus, List<Tag> ta
this.instanceCount = esConfig.getInstanceCount();
this.dedicatedMasterEnabled = esConfig.getDedicatedMasterEnabled();
this.zoneAwarenessEnabled = esConfig.getZoneAwarenessEnabled();
this.dedicatedMasterType = esConfig.getDedicatedMasterType();
this.dedicatedMasterCount = esConfig.getDedicatedMasterCount();
if (esConfig.getDedicatedMasterEnabled()) {
this.dedicatedMasterCount = esConfig.getDedicatedMasterCount();
this.dedicatedMasterType = esConfig.getDedicatedMasterType();
} else {
this.dedicatedMasterCount = 0;
this.dedicatedMasterType = "";
}
}
}

0 comments on commit 26688f5

Please sign in to comment.