This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1067 from zalando/ARUHA-2324
ARUHA-2324 Use connection string to connect to zookeeper
- Loading branch information
Showing
47 changed files
with
439 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/org/zalando/nakadi/domain/storage/AddressPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package org.zalando.nakadi.domain.storage; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Objects; | ||
|
||
public class AddressPort { | ||
private final String address; | ||
private final int port; | ||
|
||
public AddressPort( | ||
@JsonProperty("address") final String address, | ||
@JsonProperty("port") final int port) { | ||
this.address = address; | ||
this.port = port; | ||
} | ||
|
||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public int getPort() { | ||
return port; | ||
} | ||
|
||
public String asAddressPort() { | ||
return address + ":" + port; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "AddressPort{" + | ||
"address='" + address + '\'' + | ||
", port=" + port + | ||
'}'; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final AddressPort that = (AddressPort) o; | ||
return port == that.port && | ||
Objects.equals(address, that.address); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(address, port); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...zalando/nakadi/domain/DefaultStorage.java → ...nakadi/domain/storage/DefaultStorage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.zalando.nakadi.domain; | ||
package org.zalando.nakadi.domain.storage; | ||
|
||
public class DefaultStorage { | ||
|
||
|
40 changes: 40 additions & 0 deletions
40
src/main/java/org/zalando/nakadi/domain/storage/KafkaConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.zalando.nakadi.domain.storage; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Objects; | ||
|
||
public class KafkaConfiguration { | ||
private final ZookeeperConnection zookeeperConnection; | ||
|
||
public KafkaConfiguration( | ||
@JsonProperty(value = "zookeeper_connection") final ZookeeperConnection zookeeperConnection) { | ||
this.zookeeperConnection = zookeeperConnection; | ||
} | ||
|
||
public ZookeeperConnection getZookeeperConnection() { | ||
return zookeeperConnection; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "KafkaConfiguration{" + zookeeperConnection + '}'; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final KafkaConfiguration that = (KafkaConfiguration) o; | ||
return Objects.equals(zookeeperConnection, that.zookeeperConnection); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(zookeeperConnection); | ||
} | ||
} |
Oops, something went wrong.