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

Commit

Permalink
ARUHA-1501: fixed merge problem;
Browse files Browse the repository at this point in the history
  • Loading branch information
v-stepanov committed Mar 26, 2018
1 parent be59718 commit ad8b37f
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,6 @@ public Map<EventTypePartition, SubscriptionCursorWithoutToken> getOffsets(
new SubscriptionCursorWithoutToken(etp.getEventType(), etp.getPartition(), new String(value, UTF_8)));
}

protected Session deserializeSession(final String sessionId, final byte[] sessionZkData) throws IOException {
try {
// old version of session: zkNode data is session weight
final int weight = Integer.parseInt(new String(sessionZkData, UTF_8));
return new Session(sessionId, weight);
} catch (final NumberFormatException nfe) {
// new version of session: zkNode data is session object as json
return objectMapper.readValue(sessionZkData, Session.class);
}
}

@Override
public void transfer(final String sessionId, final Collection<EventTypePartition> partitions)
throws NakadiRuntimeException, SubscriptionNotInitializedException {
Expand Down

0 comments on commit ad8b37f

Please sign in to comment.