Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #787 from zalando/ARUHA-1340
Browse files Browse the repository at this point in the history
ARUHA-1340 Remove topology logging on cursors commit
  • Loading branch information
antban authored Nov 29, 2017
2 parents c586d5a + 7fc257f commit 11ab774
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected byte[] createTopologyAndOffsets(final Collection<SubscriptionCursorWit
Partition.State.UNASSIGNED
)).toArray(Partition[]::new);
final Topology topology = new Topology(partitions, 0);
getLog().info("Generating topology {}", topology);
return objectMapper.writeValueAsBytes(topology);
}

Expand All @@ -90,6 +91,7 @@ public void updatePartitionsConfiguration(final Partition[] partitions) throws N
SubscriptionNotInitializedException {
final Topology newTopology = readTopology().withUpdatedPartitions(partitions);
try {
getLog().info("Updating topology to {}", newTopology);
getCurator().setData().forPath(
getSubscriptionPath(NODE_TOPOLOGY),
objectMapper.writeValueAsBytes(newTopology));
Expand All @@ -111,9 +113,7 @@ private Topology readTopology() throws NakadiRuntimeException,

private Topology parseTopology(final byte[] data) {
try {
final Topology result = objectMapper.readValue(data, Topology.class);
getLog().info("Topology is {}", result);
return result;
return objectMapper.readValue(data, Topology.class);
} catch (IOException e) {
throw new NakadiRuntimeException(e);
}
Expand Down

0 comments on commit 11ab774

Please sign in to comment.