You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "findingrish (via GitHub)" <gi...@apache.org> on 2023/06/20 08:55:42 UTC
[GitHub] [druid] findingrish opened a new pull request, #14453: Improve SegmentMetadataCache visibility
findingrish opened a new pull request, #14453:
URL: https://github.com/apache/druid/pull/14453
* Add metric `segmentMetadataCache/refreshTime` that measures the time to call refresh(segmentsToRefresh, dataSourcesToRebuild). Emitted once per refresh.
* Add metric `segmentMetadataCache/refreshSegments` that measures the number of segments passed to refresh. Emitted once per refresh.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1234986519
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
Why do you recommend `nanoTime`, @rohangarg ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #14453:
URL: https://github.com/apache/druid/pull/14453#issuecomment-1600004733
> In general, what is the pattern of naming metrics in druid?
We don't really have any guidelines in place yet. But if you look at [the docs](https://druid.apache.org/docs/latest/operations/metrics.html), metrics typically fall into one of these buckets:
- `segment/` : related to segment data or metadata, something that can be tracked at the segment level
- `task/`: task management
- `ingest/`: ingestion stats, row counts, etc
- `query/`: query execution
- `sys/`, `jvm/`, `jetty/`: non-Druid system-related metrics
There are some which could have probably been fit into the above, so I wouldn't advocate them. But these are:
- `interval/`, `compact/`: these are all compaction metrics and could have been under `ingest/`
- `taskSlot/`, `worker/`, `compactTask/`: could have been grouped into `task/`
- `tier/`: probably better named as `cluster/`
The service name need not be a part of the metric (i.e. `broker/` prefix is not required) as the `service` dimension is already emitted with all metrics. (The only metric with service name is `coordinator/time` and it is an ambiguous name at best).
I suggested `segment/metadatacache/` because it relates to _segment_ metadata, and because we already allude to `SegmentMetadataCache` class as `metadatacache` in another metric (`init/metadatacache/time`).
---
The above are my opinions to reduce complexity for a user. You can choose some other nomenclature if you can reason about it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238832059
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,19 @@ private long recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
Review Comment:
How is this better compared to using nano time? api wise or better performant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1239560915
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1460,31 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ ServiceEmitter mockEmitter = Mockito.mock(ServiceEmitter.class);
+ Map<String, ServiceMetricEvent> emittedEvents = new HashMap<>();
+ Mockito.doCallRealMethod().when(mockEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
+ Mockito
+ .doAnswer(invocation -> {
+ ServiceMetricEvent e = invocation.getArgument(0);
+ emittedEvents.put(e.getMetric(), e);
+ return null;
+ })
+ .when(mockEmitter).emit(ArgumentMatchers.any(Event.class));
+
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, mockEmitter);
+
+ Assert.assertTrue(emittedEvents.containsKey("init/metadatacache/time"));
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/count")
+ .getUserDims()
+ .get(DruidMetrics.DATASOURCE), "some_datasource");
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/time")
Review Comment:
yes, I missed this. Anyways, have updated the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235616949
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
+
+ emitter.emit(ServiceMetricEvent.builder().build(
Review Comment:
Should we report total/datasource value for both the metrics?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "rohangarg (via GitHub)" <gi...@apache.org>.
rohangarg commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235065553
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
I think the monotonicity depends on the NTP updates (on cloud instances), so not sure doing from same thread affects it. Also regarding cheapness, I think both calls are cheap and infrequent enough to not become a bottleneck for performance consideration. Further, the performance of each is also platform dependent I think.
I felt that for elapsed durations, probably something closer to a timer is better than using clock times.
Anyways, I'm ok with using any method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "rohangarg (via GitHub)" <gi...@apache.org>.
rohangarg commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238673527
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,19 @@ private long recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
Review Comment:
Since you've given this enough thought - probably Guava's `StopWatch` is a good utility to use here. It is also used at a couple of more place and provides the elapsed and conversion methods as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238487258
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1460,31 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ ServiceEmitter mockEmitter = Mockito.mock(ServiceEmitter.class);
+ Map<String, ServiceMetricEvent> emittedEvents = new HashMap<>();
+ Mockito.doCallRealMethod().when(mockEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
+ Mockito
+ .doAnswer(invocation -> {
+ ServiceMetricEvent e = invocation.getArgument(0);
+ emittedEvents.put(e.getMetric(), e);
+ return null;
+ })
+ .when(mockEmitter).emit(ArgumentMatchers.any(Event.class));
+
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, mockEmitter);
+
+ Assert.assertTrue(emittedEvents.containsKey("init/metadatacache/time"));
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/count")
+ .getUserDims()
+ .get(DruidMetrics.DATASOURCE), "some_datasource");
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/time")
Review Comment:
`getMetricValues` can be used for that too because it allows you to pass a set of dimension filters. See some of the other tests where it is being used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238349373
##########
docs/operations/metrics.md:
##########
@@ -66,6 +66,9 @@ Metrics may have additional dimensions beyond those listed above.
|`sqlQuery/bytes`|Number of bytes returned in the SQL query response.|`id`, `nativeQueryIds`, `dataSource`, `remoteAddress`, `success`, `engine`| |
|`init/serverview/time`|Time taken to initialize the broker server view. Useful to detect if brokers are taking too long to start.||Depends on the number of segments.|
|`init/metadatacache/time`|Time taken to initialize the broker segment metadata cache. Useful to detect if brokers are taking too long to start||Depends on the number of segments.|
+|`segment/metadatacache/refresh/count`|Number of segments to refresh in broker segment metadata cache.|`dataSource`|
+|`segment/metadatacache/refresh/count`|Number of segments to refresh in broker segment metadata cache.|`dataSource`|
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238505594
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1456,25 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ StubServiceEmitter emitter = new StubServiceEmitter("broker", "host");
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, emitter);
Review Comment:
Instead of this, can we just instantiate a `SchemaMetadataCache` and call `refresh` on it?
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1456,25 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ StubServiceEmitter emitter = new StubServiceEmitter("broker", "host");
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, emitter);
+
+ Map<String, Set<Object>> emittedEventsMap =
+ emitter.getEvents()
+ .stream()
+ .map(ServiceMetricEvent.class::cast)
+ .collect(Collectors.groupingBy(
+ ServiceMetricEvent::getMetric,
+ Collectors.mapping(sme -> sme.getUserDims().get(DruidMetrics.DATASOURCE), Collectors.toSet())
+ ));
+ Assert.assertTrue(emittedEventsMap.containsKey("init/metadatacache/time"));
+ Assert.assertTrue(emittedEventsMap.get("segment/metadatacache/refresh/count").size() > 0);
+ Assert.assertTrue(emittedEventsMap.get("segment/metadatacache/refresh/time").size() > 0);
Review Comment:
something like this:
```suggestion
emitter.verifyEmitted("init/metadatacache/time", 1);
emitter.verifyEmitted("segment/metadatacache/refresh/time", ImmutableMap.of(DruidMetrics.DATASOURCE, 'yourds', 1));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235011419
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
Ah, interesting. It does seem that `currentTimeMillis` can sometimes run backwards!
I still feel `currentTimeMillis` would be a better fit here as it is a cheaper call and should be (guaranteed to be?) monotonic at least when called successively from the same thread in the absence of clock adjustments.
But either of the two approaches works for me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "rohangarg (via GitHub)" <gi...@apache.org>.
rohangarg commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1234988339
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
since that is always monotonically increasing in a JVM's lifetime, I don't think `currentTimeMillis` is, since it comes from the system time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238244688
##########
docs/operations/metrics.md:
##########
@@ -66,6 +66,9 @@ Metrics may have additional dimensions beyond those listed above.
|`sqlQuery/bytes`|Number of bytes returned in the SQL query response.|`id`, `nativeQueryIds`, `dataSource`, `remoteAddress`, `success`, `engine`| |
|`init/serverview/time`|Time taken to initialize the broker server view. Useful to detect if brokers are taking too long to start.||Depends on the number of segments.|
|`init/metadatacache/time`|Time taken to initialize the broker segment metadata cache. Useful to detect if brokers are taking too long to start||Depends on the number of segments.|
+|`segment/metadatacache/refresh/count`|Number of segments to refresh in broker segment metadata cache.|`dataSource`|
+|`segment/metadatacache/refresh/count`|Number of segments to refresh in broker segment metadata cache.|`dataSource`|
Review Comment:
Duplicate entry?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238367561
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1460,31 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ ServiceEmitter mockEmitter = Mockito.mock(ServiceEmitter.class);
+ Map<String, ServiceMetricEvent> emittedEvents = new HashMap<>();
+ Mockito.doCallRealMethod().when(mockEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
+ Mockito
+ .doAnswer(invocation -> {
+ ServiceMetricEvent e = invocation.getArgument(0);
+ emittedEvents.put(e.getMetric(), e);
+ return null;
+ })
+ .when(mockEmitter).emit(ArgumentMatchers.any(Event.class));
+
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, mockEmitter);
+
+ Assert.assertTrue(emittedEvents.containsKey("init/metadatacache/time"));
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/count")
+ .getUserDims()
+ .get(DruidMetrics.DATASOURCE), "some_datasource");
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/time")
Review Comment:
Instead of verifying the exact value, I am verifying that the metrics are emitted with dataSource dimension.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235011419
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
Ah, interesting.
I still feel `currentTimeMillis` would be a better fit here as it is a cheaper call and should be (guaranteed to be?) monotonic at least when called successively from the same thread in the absence of clock adjustments.
But either of the two approaches works for me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on PR #14453:
URL: https://github.com/apache/druid/pull/14453#issuecomment-1599278547
> Thanks for the changes, @findingrish .
>
> I wonder if these names would be better aligned with existing Druid metrics:
>
> * `segment/metadatacache/refresh/time`
> * `segment/metadatacache/refresh/count`
Thanks for the suggestion. What does `segment` represent?
Would something like `broker/segmentmetadatacache/refresh/time` make sense?
In general, what is the pattern of naming metrics in druid?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1236219891
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
+
+ emitter.emit(ServiceMetricEvent.builder().build(
Review Comment:
No, just add the dimension `dataSource` while emitting the metric. Aggregation is not required. It can be summed up wherever the metric is being collected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1234994377
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
+
+ emitter.emit(ServiceMetricEvent.builder().build(
Review Comment:
The `time` metric could be per datasource too. The time duration is already being tracked and logged, we just need to emit it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238250022
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1460,31 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ ServiceEmitter mockEmitter = Mockito.mock(ServiceEmitter.class);
+ Map<String, ServiceMetricEvent> emittedEvents = new HashMap<>();
+ Mockito.doCallRealMethod().when(mockEmitter).emit(ArgumentMatchers.any(ServiceEventBuilder.class));
+ Mockito
+ .doAnswer(invocation -> {
+ ServiceMetricEvent e = invocation.getArgument(0);
+ emittedEvents.put(e.getMetric(), e);
+ return null;
+ })
+ .when(mockEmitter).emit(ArgumentMatchers.any(Event.class));
+
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, mockEmitter);
+
+ Assert.assertTrue(emittedEvents.containsKey("init/metadatacache/time"));
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/count")
+ .getUserDims()
+ .get(DruidMetrics.DATASOURCE), "some_datasource");
+ Assert.assertEquals(emittedEvents.get("segment/metadatacache/refresh/time")
Review Comment:
Using `StubServiceEmitter.getMetricValues()` will simplify this code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz merged pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz merged PR #14453:
URL: https://github.com/apache/druid/pull/14453
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "rohangarg (via GitHub)" <gi...@apache.org>.
rohangarg commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238674515
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,19 @@ private long recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
Review Comment:
You can consider this change, incase you're going to make other changes to the PR too. no point in running CI for this :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "rohangarg (via GitHub)" <gi...@apache.org>.
rohangarg commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1234984100
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
don't recommend using `currentTimeMillis` in any new code. I'd suggest using `nanoTime` and then converting it to the needed duration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238505594
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1456,25 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ StubServiceEmitter emitter = new StubServiceEmitter("broker", "host");
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, emitter);
Review Comment:
Instead of this, can we just instantiate a `SchemaMetadataCache` and call `refresh` from this method itself?
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1456,25 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ StubServiceEmitter emitter = new StubServiceEmitter("broker", "host");
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, emitter);
Review Comment:
Instead of this, can we just instantiate a `SchemaMetadataCache` and call `refresh` from this test method itself?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235646672
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
Review Comment:
Thanks for the feedback. `nanoTime` seems like the better option for measuring elapsed duration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1235616949
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
+
+ emitter.emit(ServiceMetricEvent.builder().build(
Review Comment:
Should we report both overall time and per datasource time?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1234975639
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -403,6 +403,13 @@ public void start() throws InterruptedException
@VisibleForTesting
void refresh(final Set<SegmentId> segmentsToRefresh, final Set<String> dataSourcesToRebuild) throws IOException
{
+ long startMillis = System.currentTimeMillis();
+
+ emitter.emit(ServiceMetricEvent.builder().build(
Review Comment:
It would be better to emit the dimension `dataSource` with this metric. So we should probably emit it from `refreshSegmentsForDatasource` instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238505123
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1456,25 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ StubServiceEmitter emitter = new StubServiceEmitter("broker", "host");
+ buildSchemaMarkAndTableLatch(SEGMENT_CACHE_CONFIG_DEFAULT, emitter);
+
+ Map<String, Set<Object>> emittedEventsMap =
+ emitter.getEvents()
+ .stream()
+ .map(ServiceMetricEvent.class::cast)
+ .collect(Collectors.groupingBy(
+ ServiceMetricEvent::getMetric,
+ Collectors.mapping(sme -> sme.getUserDims().get(DruidMetrics.DATASOURCE), Collectors.toSet())
+ ));
+ Assert.assertTrue(emittedEventsMap.containsKey("init/metadatacache/time"));
+ Assert.assertTrue(emittedEventsMap.get("segment/metadatacache/refresh/count").size() > 0);
+ Assert.assertTrue(emittedEventsMap.get("segment/metadatacache/refresh/time").size() > 0);
Review Comment:
```suggestion
emitter.verifyEmitted("init/metadatacache/time", 1);
emitter.verifyEmitted("segment/metadatacache/refresh/time", ImmutableMap.of(DruidMetrics.DATASOURCE, 'yourds', 1));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1236654114
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -714,7 +715,12 @@ private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, fin
log.debug("Refreshing metadata for dataSource[%s].", dataSource);
- final long startTime = System.currentTimeMillis();
+ final ServiceMetricEvent.Builder builder =
+ new ServiceMetricEvent.Builder().setDimension(DruidMetrics.DATASOURCE, dataSource);
+
+ emitter.emit(builder.build("segment/metadatacache/refresh/count", segments.size()));
+
+ final long startNanos = System.nanoTime();
Review Comment:
Nit: This should probably be the first line of the method, so that we account for all the operations here.
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -783,10 +789,13 @@ private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, fin
yielder.close();
}
+ long refreshDurationMillis = (System.nanoTime() - startNanos) / 1_000_000;
Review Comment:
Nit: for readability
```suggestion
long refreshDurationMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238245731
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,20 @@ private long recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
+
if (!segments.stream().allMatch(segmentId -> segmentId.getDataSource().equals(dataSource))) {
// Sanity check. We definitely expect this to pass.
throw new ISE("'segments' must all match 'dataSource'!");
}
log.debug("Refreshing metadata for dataSource[%s].", dataSource);
- final long startTime = System.currentTimeMillis();
+ final ServiceMetricEvent.Builder builder =
+ new ServiceMetricEvent.Builder().setDimension(DruidMetrics.DATASOURCE, dataSource);
+
+ emitter.emit(builder.build("segment/metadatacache/refresh/count", segments.size()));
+
Review Comment:
Nit: Extra line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238247171
##########
sql/src/test/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCacheTest.java:
##########
@@ -1447,6 +1460,31 @@ public void testStaleDatasourceRefresh() throws IOException, InterruptedExceptio
Assert.assertNull(schema.getDatasource("wat"));
}
+ @Test
+ public void testRefreshShouldEmitMetrics() throws InterruptedException
+ {
+ ServiceEmitter mockEmitter = Mockito.mock(ServiceEmitter.class);
Review Comment:
Use instance of `StubServiceEmitter` instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] findingrish commented on a diff in pull request #14453: Improve SegmentMetadataCache visibility
Posted by "findingrish (via GitHub)" <gi...@apache.org>.
findingrish commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238832059
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,19 @@ private long recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource, final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
Review Comment:
How is this better compared to using nano time? api wise or better performant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org