File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
repository/src/main/java/org/apache/atlas/tasks Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 3535import org .apache .atlas .repository .graphdb .DirectIndexQueryResult ;
3636import org .apache .atlas .repository .graphdb .janus .AtlasElasticsearchQuery ;
3737import org .apache .atlas .type .AtlasType ;
38+ import org .apache .atlas .utils .AtlasMetricType ;
3839import org .apache .atlas .utils .AtlasPerfMetrics ;
3940import org .apache .commons .collections .CollectionUtils ;
4041import org .apache .commons .collections4 .ListUtils ;
@@ -466,11 +467,12 @@ public List<AtlasTask> getTasksForReQueueIndexSearch() {
466467 }
467468 }
468469 if (mismatches > 0 ) {
469- AtlasPerfMetrics .Metric indexsearchMetric = new AtlasPerfMetrics .Metric (TASK_MISMATCH_TAG );
470- indexsearchMetric .addTag ("name" , TASK_MISMATCH_TAG );
471- indexsearchMetric .setInvocations (mismatches );
472- indexsearchMetric .setTotalTimeMSecs (0 );
473- RequestContext .get ().addApplicationMetrics (indexsearchMetric );
470+ AtlasPerfMetrics .Metric mismatchMetrics = new AtlasPerfMetrics .Metric (TASK_MISMATCH_TAG );
471+ mismatchMetrics .setMetricType (AtlasMetricType .COUNTER );
472+ mismatchMetrics .addTag ("name" , TASK_MISMATCH_TAG );
473+ mismatchMetrics .setInvocations (mismatches );
474+ mismatchMetrics .setTotalTimeMSecs (0 );
475+ RequestContext .get ().addApplicationMetrics (mismatchMetrics );
474476 }
475477 return ret ;
476478 }
You can’t perform that action at this time.
0 commit comments