You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/exporter/QueryInsightsExporter.java
Copy file name to clipboardexpand all lines: plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/exporter/QueryInsightsExporterType.java
+10-6
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,19 @@
16
16
* @opensearch.internal
17
17
*/
18
18
publicenumQueryInsightsExporterType {
19
-
/* local index exporter */
20
-
LOCAL_INDEX("local_index");
19
+
/** local index exporter */
20
+
LOCAL_INDEX;
21
21
22
-
privatefinalStringtype;
23
-
24
-
QueryInsightsExporterType(Stringtype) {
25
-
this.type = type;
22
+
@Override
23
+
publicStringtoString() {
24
+
returnsuper.toString().toLowerCase(Locale.ROOT);
26
25
}
27
26
27
+
/**
28
+
* Parse QueryInsightsExporterType from String
29
+
* @param type the String representation of the QueryInsightsExporterType
Copy file name to clipboardexpand all lines: plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/exporter/QueryInsightsLocalIndexExporter.java
+42-36
Original file line number
Diff line number
Diff line change
@@ -51,13 +51,20 @@ public class QueryInsightsLocalIndexExporter<T extends SearchQueryRecord<?>> ext
51
51
/** The mapping for the local index that holds the data */
52
52
privatefinalInputStreamlocalIndexMapping;
53
53
54
+
/**
55
+
* Create a QueryInsightsLocalIndexExporter Object
56
+
* @param clusterService The clusterService of the node
57
+
* @param client The OpenSearch Client to support index operations
58
+
* @param localIndexName The local index name to export the data to
59
+
* @param localIndexMapping The mapping for the local index
Copy file name to clipboardexpand all lines: plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/listener/SearchQueryLatencyListener.java
+6
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,12 @@ public final class SearchQueryLatencyListener extends SearchRequestOperationsLis
Copy file name to clipboardexpand all lines: plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/service/QueryInsightsService.java
+39-3
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ public abstract class QueryInsightsService<R extends SearchQueryRecord<?>, S ext
46
46
/** enable insight data export */
47
47
privatebooleanenableExport;
48
48
49
-
/** The internal store that holds the query insight data */
49
+
/** The internal thread-safe store that holds the query insight data */
50
50
@Nullable
51
51
protectedSstore;
52
52
@@ -59,8 +59,19 @@ public abstract class QueryInsightsService<R extends SearchQueryRecord<?>, S ext
59
59
60
60
/** The internal OpenSearch thread pool that execute async processing and exporting tasks*/
61
61
protectedfinalThreadPoolthreadPool;
62
+
63
+
/**
64
+
* Holds a reference to delayed operation {@link Scheduler.Cancellable} so it can be cancelled when
0 commit comments