From 8480c067eba84b1933539b120dcf7411ddd6b17e Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Wed, 26 Sep 2018 17:01:34 +0200 Subject: [PATCH 01/13] Bug Fix 1804 --- .../subscription/SubscriptionService.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java index dcae6188d8..79f069124f 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java @@ -36,6 +36,9 @@ import org.zalando.nakadi.exceptions.runtime.SubscriptionUpdateConflictException; import org.zalando.nakadi.exceptions.runtime.TooManyPartitionsException; import org.zalando.nakadi.exceptions.runtime.WrongInitialCursorsException; +import org.zalando.nakadi.exceptions.runtime.LimitReachedException; +import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; +import org.zalando.nakadi.exceptions.runtime.NakadiBaseException; import org.zalando.nakadi.repository.EventTypeRepository; import org.zalando.nakadi.repository.TopicRepository; import org.zalando.nakadi.repository.db.SubscriptionDbRepository; @@ -65,6 +68,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.HashMap; import java.util.stream.Collectors; import static javax.ws.rs.core.Response.Status.NOT_FOUND; @@ -329,9 +333,17 @@ private List loadStats( final Collection committedPositions = getCommittedPositions(subscriptionNode, client); final List stats = loadPartitionEndStatistics(eventTypes); - final Map timeLags = statsMode == StatsMode.TIMELAG ? - subscriptionTimeLagService.getTimeLags(committedPositions, stats) : - ImmutableMap.of(); + Map timeLags = new HashMap<>(); + try { + timeLags = statsMode == StatsMode.TIMELAG ? + subscriptionTimeLagService.getTimeLags(committedPositions, stats) : + ImmutableMap.of(); + } + catch (LimitReachedException|TimeLagStatsTimeoutException|InconsistentStateException e) { + LOG.info("Cannot fetch TimeLag!"); + }catch (NakadiBaseException e ){ + LOG.info("Cannot fetch TimeLag!"); + } for (final EventType eventType : eventTypes) { final List statsForEventType = stats.stream() From 4571dccb195d1b548eaeedc10914ffef958f2466 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Thu, 27 Sep 2018 10:51:02 +0200 Subject: [PATCH 02/13] Changed the error fix to each timelag instead of whole batch --- .../subscription/SubscriptionTimeLagService.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java index 5f0a9ce351..914a6964f4 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java @@ -2,6 +2,8 @@ import com.google.common.collect.ImmutableList; import org.echocat.jomon.runtime.concurrent.RetryForSpecifiedTimeStrategy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.zalando.nakadi.domain.ConsumedEvent; @@ -39,7 +41,7 @@ @Component public class SubscriptionTimeLagService { - + private static final Logger LOG = LoggerFactory.getLogger(SubscriptionTimeLagService.class); private static final int EVENT_FETCH_WAIT_TIME_MS = 1000; private static final int REQUEST_TIMEOUT_MS = 30000; private static final int MAX_THREADS_PER_REQUEST = 20; @@ -71,7 +73,12 @@ public Map getTimeLags(final Collection timeLagFuture = timeLagHandler.getCursorTimeLagFuture(cursor); + CompletableFuture timeLagFuture = new CompletableFuture<>(); + try { + timeLagFuture = timeLagHandler.getCursorTimeLagFuture(cursor); + } catch (TimeoutException e) { + LOG.error("Time lag request timed out"); + } futureTimeLags.put(cursor.getEventTypePartition(), timeLagFuture); } } From c5c4bbeb4d17f0326bdc2d544aaaea60fb94d8e5 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Thu, 27 Sep 2018 10:54:58 +0200 Subject: [PATCH 03/13] Removed the unncessary changes --- .../subscription/SubscriptionService.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java index 79f069124f..1a404f0b83 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java @@ -36,9 +36,7 @@ import org.zalando.nakadi.exceptions.runtime.SubscriptionUpdateConflictException; import org.zalando.nakadi.exceptions.runtime.TooManyPartitionsException; import org.zalando.nakadi.exceptions.runtime.WrongInitialCursorsException; -import org.zalando.nakadi.exceptions.runtime.LimitReachedException; -import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; -import org.zalando.nakadi.exceptions.runtime.NakadiBaseException; + import org.zalando.nakadi.repository.EventTypeRepository; import org.zalando.nakadi.repository.TopicRepository; import org.zalando.nakadi.repository.db.SubscriptionDbRepository; @@ -68,7 +66,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.HashMap; + import java.util.stream.Collectors; import static javax.ws.rs.core.Response.Status.NOT_FOUND; @@ -333,17 +331,9 @@ private List loadStats( final Collection committedPositions = getCommittedPositions(subscriptionNode, client); final List stats = loadPartitionEndStatistics(eventTypes); - Map timeLags = new HashMap<>(); - try { - timeLags = statsMode == StatsMode.TIMELAG ? - subscriptionTimeLagService.getTimeLags(committedPositions, stats) : - ImmutableMap.of(); - } - catch (LimitReachedException|TimeLagStatsTimeoutException|InconsistentStateException e) { - LOG.info("Cannot fetch TimeLag!"); - }catch (NakadiBaseException e ){ - LOG.info("Cannot fetch TimeLag!"); - } + final Map timeLags = statsMode == StatsMode.TIMELAG ? + subscriptionTimeLagService.getTimeLags(committedPositions, stats) : + ImmutableMap.of(); for (final EventType eventType : eventTypes) { final List statsForEventType = stats.stream() From 863f7774863448cee0e9ab0849bf0760ffd18b72 Mon Sep 17 00:00:00 2001 From: Kunal jha Date: Thu, 27 Sep 2018 10:55:57 +0200 Subject: [PATCH 04/13] Update SubscriptionService.java --- .../zalando/nakadi/service/subscription/SubscriptionService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java index 1a404f0b83..803ca589a9 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionService.java @@ -66,7 +66,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; - import java.util.stream.Collectors; import static javax.ws.rs.core.Response.Status.NOT_FOUND; From 5fc8c2376b1cccc019ca3dacae5d83835b4a5cd2 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Thu, 4 Oct 2018 19:05:36 +0200 Subject: [PATCH 05/13] Added changes from the review --- .../SubscriptionTimeLagService.java | 27 +++++-------------- .../SubscriptionTimeLagServiceTest.java | 23 +++------------- 2 files changed, 9 insertions(+), 41 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java index 914a6964f4..c0483f7357 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java @@ -14,7 +14,6 @@ import org.zalando.nakadi.exceptions.runtime.InconsistentStateException; import org.zalando.nakadi.exceptions.runtime.InvalidCursorException; import org.zalando.nakadi.exceptions.runtime.LimitReachedException; -import org.zalando.nakadi.exceptions.runtime.NakadiBaseException; import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; import org.zalando.nakadi.repository.EventConsumer; import org.zalando.nakadi.service.NakadiCursorComparator; @@ -73,12 +72,7 @@ public Map getTimeLags(final Collection timeLagFuture = new CompletableFuture<>(); - try { - timeLagFuture = timeLagHandler.getCursorTimeLagFuture(cursor); - } catch (TimeoutException e) { - LOG.error("Time lag request timed out"); - } + final CompletableFuture timeLagFuture = timeLagHandler.getCursorTimeLagFuture(cursor); futureTimeLags.put(cursor.getEventTypePartition(), timeLagFuture); } } @@ -89,21 +83,12 @@ public Map getTimeLags(final Collection endPositions) { diff --git a/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java b/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java index df885b643d..933b163113 100644 --- a/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java +++ b/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java @@ -9,9 +9,6 @@ import org.zalando.nakadi.domain.PartitionEndStatistics; import org.zalando.nakadi.domain.Storage; import org.zalando.nakadi.domain.Timeline; -import org.zalando.nakadi.exceptions.runtime.NakadiRuntimeException; -import org.zalando.nakadi.exceptions.runtime.ErrorGettingCursorTimeLagException; -import org.zalando.nakadi.exceptions.runtime.InconsistentStateException; import org.zalando.nakadi.exceptions.runtime.InvalidCursorException; import org.zalando.nakadi.repository.EventConsumer; import org.zalando.nakadi.service.subscription.SubscriptionTimeLagService; @@ -79,24 +76,10 @@ public void testTimeLagsForTailAndNotTailPositions() throws InvalidCursorExcepti } - @Test(expected = InconsistentStateException.class) + @Test() @SuppressWarnings("unchecked") - public void whenNakadiRuntimeExceptionThenInconsistentStateExceptionIsThrown() - throws InvalidCursorException { - when(timelineService.createEventConsumer(any(), any())).thenThrow(NakadiRuntimeException.class); - - final Timeline et1Timeline = new Timeline("et1", 0, new Storage("", Storage.Type.KAFKA), "t1", null); - final NakadiCursor committedCursor1 = NakadiCursor.of(et1Timeline, "p1", "o1"); - - timeLagService.getTimeLags(ImmutableList.of(committedCursor1), ImmutableList.of()); - } - - @Test(expected = ErrorGettingCursorTimeLagException.class) - @SuppressWarnings("unchecked") - public void whenInvalidCursorThenErrorGettingCursorTimeLagExceptionIsThrown() - throws InvalidCursorException { - when(timelineService.createEventConsumer(any(), any())).thenThrow(InvalidCursorException.class); - + public void whenNoSubscriptionThenReturnNull() { + when(timelineService.createEventConsumer(any(), any())).thenReturn(null); final Timeline et1Timeline = new Timeline("et1", 0, new Storage("", Storage.Type.KAFKA), "t1", null); final NakadiCursor committedCursor1 = NakadiCursor.of(et1Timeline, "p1", "o1"); From e8dfa08e0343ab4b6d5a90a6f4ba85bb1e98cd81 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Fri, 5 Oct 2018 10:51:02 +0200 Subject: [PATCH 06/13] test changes --- .../nakadi/service/SubscriptionTimeLagServiceTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java b/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java index 933b163113..85a4487d3b 100644 --- a/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java +++ b/src/test/java/org/zalando/nakadi/service/SubscriptionTimeLagServiceTest.java @@ -21,6 +21,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -77,13 +78,14 @@ public void testTimeLagsForTailAndNotTailPositions() throws InvalidCursorExcepti @Test() - @SuppressWarnings("unchecked") - public void whenNoSubscriptionThenReturnNull() { + public void whenNoSubscriptionThenReturnSizeZeroMap() { when(timelineService.createEventConsumer(any(), any())).thenReturn(null); final Timeline et1Timeline = new Timeline("et1", 0, new Storage("", Storage.Type.KAFKA), "t1", null); final NakadiCursor committedCursor1 = NakadiCursor.of(et1Timeline, "p1", "o1"); - timeLagService.getTimeLags(ImmutableList.of(committedCursor1), ImmutableList.of()); + final Map result = timeLagService.getTimeLags + (ImmutableList.of(committedCursor1), ImmutableList.of()); + assertThat(result.size(), is(0)); } private PartitionEndStatistics mockEndStats(final NakadiCursor nakadiCursor) { From 06c99616158c0ad3b9274069a6fe083a3f8d0f3b Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Mon, 8 Oct 2018 14:13:51 +0200 Subject: [PATCH 07/13] added Review points --- .../subscription/SubscriptionTimeLagService.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java index c0483f7357..12fa78b920 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java @@ -13,8 +13,6 @@ import org.zalando.nakadi.exceptions.runtime.ErrorGettingCursorTimeLagException; import org.zalando.nakadi.exceptions.runtime.InconsistentStateException; import org.zalando.nakadi.exceptions.runtime.InvalidCursorException; -import org.zalando.nakadi.exceptions.runtime.LimitReachedException; -import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; import org.zalando.nakadi.repository.EventConsumer; import org.zalando.nakadi.service.NakadiCursorComparator; import org.zalando.nakadi.service.timeline.TimelineService; @@ -60,9 +58,7 @@ public SubscriptionTimeLagService(final TimelineService timelineService, } public Map getTimeLags(final Collection committedPositions, - final List endPositions) - throws ErrorGettingCursorTimeLagException, InconsistentStateException, LimitReachedException, - TimeLagStatsTimeoutException { + final List endPositions) { final TimeLagRequestHandler timeLagHandler = new TimeLagRequestHandler(timelineService, threadPool); final Map timeLags = new HashMap<>(); @@ -84,9 +80,9 @@ public Map getTimeLags(final Collection Date: Mon, 8 Oct 2018 14:45:28 +0200 Subject: [PATCH 08/13] removed exception which are not used --- .../zalando/nakadi/controller/ExceptionHandling.java | 8 -------- .../nakadi/controller/SubscriptionController.java | 10 ---------- .../exceptions/runtime/LimitReachedException.java | 9 --------- .../runtime/TimeLagStatsTimeoutException.java | 9 --------- .../subscription/SubscriptionTimeLagService.java | 2 +- 5 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 src/main/java/org/zalando/nakadi/exceptions/runtime/LimitReachedException.java delete mode 100644 src/main/java/org/zalando/nakadi/exceptions/runtime/TimeLagStatsTimeoutException.java diff --git a/src/main/java/org/zalando/nakadi/controller/ExceptionHandling.java b/src/main/java/org/zalando/nakadi/controller/ExceptionHandling.java index 604042b162..cb399e5aa9 100644 --- a/src/main/java/org/zalando/nakadi/controller/ExceptionHandling.java +++ b/src/main/java/org/zalando/nakadi/controller/ExceptionHandling.java @@ -20,7 +20,6 @@ import org.zalando.nakadi.exceptions.runtime.IllegalClientIdException; import org.zalando.nakadi.exceptions.runtime.InternalNakadiException; import org.zalando.nakadi.exceptions.runtime.InvalidPartitionKeyFieldsException; -import org.zalando.nakadi.exceptions.runtime.LimitReachedException; import org.zalando.nakadi.exceptions.runtime.NakadiBaseException; import org.zalando.nakadi.exceptions.runtime.NakadiRuntimeException; import org.zalando.nakadi.exceptions.runtime.NoStreamingSlotsAvailable; @@ -164,13 +163,6 @@ public ResponseEntity handleServiceTemporarilyUnavailableException( return Responses.create(Response.Status.SERVICE_UNAVAILABLE, exception.getMessage(), request); } - @ExceptionHandler(LimitReachedException.class) - public ResponseEntity handleLimitReachedException( - final ServiceTemporarilyUnavailableException exception, final NativeWebRequest request) { - LOG.warn(exception.getMessage()); - return Responses.create(MoreStatus.TOO_MANY_REQUESTS, exception.getMessage(), request); - } - @ExceptionHandler(DbWriteOperationsBlockedException.class) public ResponseEntity handleDbWriteOperationsBlockedException( final DbWriteOperationsBlockedException exception, final NativeWebRequest request) { diff --git a/src/main/java/org/zalando/nakadi/controller/SubscriptionController.java b/src/main/java/org/zalando/nakadi/controller/SubscriptionController.java index c23d7a5bad..bfbfd93013 100644 --- a/src/main/java/org/zalando/nakadi/controller/SubscriptionController.java +++ b/src/main/java/org/zalando/nakadi/controller/SubscriptionController.java @@ -20,7 +20,6 @@ import org.zalando.nakadi.exceptions.runtime.NoSuchEventTypeException; import org.zalando.nakadi.exceptions.runtime.NoSuchSubscriptionException; import org.zalando.nakadi.exceptions.runtime.ServiceTemporarilyUnavailableException; -import org.zalando.nakadi.exceptions.runtime.TimeLagStatsTimeoutException; import org.zalando.nakadi.service.FeatureToggleService; import org.zalando.nakadi.service.WebResult; import org.zalando.nakadi.service.subscription.SubscriptionService; @@ -29,7 +28,6 @@ import org.zalando.problem.spring.web.advice.Responses; import javax.annotation.Nullable; -import javax.ws.rs.core.Response; import java.util.Set; import static javax.ws.rs.core.Response.Status.NOT_IMPLEMENTED; @@ -125,12 +123,4 @@ public ResponseEntity handleServiceTemporarilyUnavailable(final Service ex.getMessage()), request); } - - @ExceptionHandler(TimeLagStatsTimeoutException.class) - public ResponseEntity handleTimeLagStatsTimeoutException(final TimeLagStatsTimeoutException e, - final NativeWebRequest request) { - LOG.warn(e.getMessage()); - return Responses.create(Response.Status.REQUEST_TIMEOUT, e.getMessage(), request); - } - } diff --git a/src/main/java/org/zalando/nakadi/exceptions/runtime/LimitReachedException.java b/src/main/java/org/zalando/nakadi/exceptions/runtime/LimitReachedException.java deleted file mode 100644 index 9c1f02b129..0000000000 --- a/src/main/java/org/zalando/nakadi/exceptions/runtime/LimitReachedException.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.zalando.nakadi.exceptions.runtime; - -public class LimitReachedException extends NakadiBaseException { - - public LimitReachedException(final String msg, final Throwable cause) { - super(msg, cause); - } - -} diff --git a/src/main/java/org/zalando/nakadi/exceptions/runtime/TimeLagStatsTimeoutException.java b/src/main/java/org/zalando/nakadi/exceptions/runtime/TimeLagStatsTimeoutException.java deleted file mode 100644 index 2da65922dd..0000000000 --- a/src/main/java/org/zalando/nakadi/exceptions/runtime/TimeLagStatsTimeoutException.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.zalando.nakadi.exceptions.runtime; - -public class TimeLagStatsTimeoutException extends NakadiBaseException { - - public TimeLagStatsTimeoutException(final String msg, final Throwable cause) { - super(msg, cause); - } - -} diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java index 12fa78b920..ce6d9f05eb 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java @@ -82,7 +82,7 @@ public Map getTimeLags(final Collection Date: Wed, 10 Oct 2018 14:35:30 +0200 Subject: [PATCH 09/13] Fixed reviews --- .../service/subscription/SubscriptionTimeLagService.java | 4 ++-- .../nakadi/service/SubscriptionTimeLagServiceTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java index ce6d9f05eb..11bc2423cc 100644 --- a/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java +++ b/src/main/java/org/zalando/nakadi/service/subscription/SubscriptionTimeLagService.java @@ -79,9 +79,9 @@ public Map getTimeLags(final Collection result = timeLagService.getTimeLags + final Map result = timeLagService.getTimeLags (ImmutableList.of(committedCursor1), ImmutableList.of()); assertThat(result.size(), is(0)); } From c4fe2677f5d7b1836e5d07486d4096579898ebac Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Mon, 15 Oct 2018 16:14:05 +0200 Subject: [PATCH 10/13] added description --- docs/_data/nakadi-event-bus-api.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/_data/nakadi-event-bus-api.yaml b/docs/_data/nakadi-event-bus-api.yaml index 5f3dc57b54..3a35af67f3 100644 --- a/docs/_data/nakadi-event-bus-api.yaml +++ b/docs/_data/nakadi-event-bus-api.yaml @@ -1442,7 +1442,10 @@ paths: - $ref: '#/parameters/SubscriptionId' - name: show_time_lag in: query - description: show consumer time lag + description: shows consumer time lag as an optional field. + This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. + In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, + the field might not be present in the output. type: boolean default: false responses: From 4c1758ba3c09143795508fdf9a12aaa151d20e65 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Mon, 15 Oct 2018 16:20:53 +0200 Subject: [PATCH 11/13] updated description --- docs/_data/nakadi-event-bus-api.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_data/nakadi-event-bus-api.yaml b/docs/_data/nakadi-event-bus-api.yaml index 3a35af67f3..5ebbfa9033 100644 --- a/docs/_data/nakadi-event-bus-api.yaml +++ b/docs/_data/nakadi-event-bus-api.yaml @@ -1445,7 +1445,8 @@ paths: description: shows consumer time lag as an optional field. This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, - the field might not be present in the output. + the field might either be partially present or not present (dependiong on the number of successful requests) + in the output. type: boolean default: false responses: From 7a8583715e1196914e2e4800c10bb2922c9f3216 Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Mon, 15 Oct 2018 16:32:55 +0200 Subject: [PATCH 12/13] fixed errors --- docs/_data/nakadi-event-bus-api.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/_data/nakadi-event-bus-api.yaml b/docs/_data/nakadi-event-bus-api.yaml index 5ebbfa9033..5c744dc8f8 100644 --- a/docs/_data/nakadi-event-bus-api.yaml +++ b/docs/_data/nakadi-event-bus-api.yaml @@ -1442,10 +1442,11 @@ paths: - $ref: '#/parameters/SubscriptionId' - name: show_time_lag in: query - description: shows consumer time lag as an optional field. + description: | + Shows consumer time lag as an optional field. This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, - the field might either be partially present or not present (dependiong on the number of successful requests) + the field might either be partially present or not present (depending on the number of successful requests) in the output. type: boolean default: false From 756fd9e07409af18e4a5cd8aee214f4b1e1dd7eb Mon Sep 17 00:00:00 2001 From: Kunal Jha Date: Mon, 15 Oct 2018 16:57:30 +0200 Subject: [PATCH 13/13] spacing for description fixed --- docs/_data/nakadi-event-bus-api.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_data/nakadi-event-bus-api.yaml b/docs/_data/nakadi-event-bus-api.yaml index 5c744dc8f8..72454a7c33 100644 --- a/docs/_data/nakadi-event-bus-api.yaml +++ b/docs/_data/nakadi-event-bus-api.yaml @@ -1443,11 +1443,11 @@ paths: - name: show_time_lag in: query description: | - Shows consumer time lag as an optional field. - This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. - In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, - the field might either be partially present or not present (depending on the number of successful requests) - in the output. + Shows consumer time lag as an optional field. + This option is a time consuming operation and Nakadi attempts to compute it in the best possible strategy. + In cases of failures, resulting in Nakadi being unable to compute it within a configurable timeout, + the field might either be partially present or not present (depending on the number of successful requests) + in the output. type: boolean default: false responses: