Skip to content

Commit

Permalink
[#NOISSUE] code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoo-jung committed Apr 11, 2023
1 parent 5cc4e04 commit c757a04
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,5 @@
*/
public interface SystemMetricDao<T extends Number> {

@Deprecated
List<SystemMetricPoint<T>> getSampledSystemMetricData(MetricDataSearchKey metricDataSearchKey, MetricTag metricTag);

Future<List<SystemMetricPoint<T>>> getAsyncSampledSystemMetricData(MetricDataSearchKey metricDataSearchKey, MetricTag metricTag);
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,6 @@ public PinotSystemMetricDoubleDao(SqlSessionTemplate sqlPinotSessionTemplate, Pi
this.asyncTemplate = Objects.requireNonNull(asyncTemplate, "asyncTemplate");
}

@Override
@Deprecated
public List<SystemMetricPoint<Double>> getSampledSystemMetricData(MetricDataSearchKey metricDataSearchKey, MetricTag metricTag) {
StopWatch watch = StopWatch.createStarted();
logger.info("=========== thread start {} thread. tag:{}", Thread.currentThread().getName(), metricTag);

SystemMetricDataSearchKey systemMetricDataSearchKey = new SystemMetricDataSearchKey(metricDataSearchKey, metricTag);
List<SystemMetricPoint<Double>> result = sqlPinotSessionTemplate.selectList(NAMESPACE + "selectSampledSystemMetricData", systemMetricDataSearchKey);

watch.stop();
logger.info("============ thread end {} thread. executeTime:{} tag:{}", Thread.currentThread().getName(), watch.getTime(), metricTag);
return result;
}

@Override
public Future<List<SystemMetricPoint<Double>>> getAsyncSampledSystemMetricData(MetricDataSearchKey metricDataSearchKey, MetricTag metricTag) {
SystemMetricDataSearchKey systemMetricDataSearchKey = new SystemMetricDataSearchKey(metricDataSearchKey, metricTag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ private List<MetricValue<? extends Number>> getMetricValues(MetricDataSearchKey
Metric elementOfBasicGroupList = systemMetricBasicGroupManager.findElementOfBasicGroup(metricDataSearchKey.getMetricDefinitionId());

StopWatch watch = StopWatch.createStarted();
logger.info("=========== thread start {} thread. metricDefinitionId:{}", Thread.currentThread().getName(), metricDataSearchKey.getMetricDefinitionId());
List<QueryResult<Number>> queryResults = selectAll(metricDataSearchKey, elementOfBasicGroupList, tags);

List<MetricValue<?>> metricValueList = new ArrayList<>(elementOfBasicGroupList.getFields().size());
Expand All @@ -111,12 +110,10 @@ private List<MetricValue<? extends Number>> getMetricValues(MetricDataSearchKey
StopWatch dataProcessWatch = StopWatch.createStarted();
MetricValue<Double> doubleMetricValue = createSystemMetricValue(timeWindow, result.getTag(), doubleList, DoubleUncollectedDataCreator.UNCOLLECTED_DATA_CREATOR);
dataProcessWatch.stop();
logger.info("##### execute process data {} thread. processTime:{} metricDefinitionId:{}", Thread.currentThread().getName(), dataProcessWatch.getTime(), metricDataSearchKey.getMetricDefinitionId());
metricValueList.add(doubleMetricValue);
}
}

logger.info("============ thread end {} thread. executeTime:{} metricDefinitionId:{}", Thread.currentThread().getName(), watch.getTime(), metricDataSearchKey.getMetricDefinitionId());
watch.stop();
return metricValueList;
} catch (Throwable e) {
Expand Down

0 comments on commit c757a04

Please sign in to comment.