-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC Coordinator node stats on search request #1
POC Coordinator node stats on search request #1
Conversation
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/search/stats/SearchStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/search/stats/SearchStats.java
Outdated
Show resolved
Hide resolved
@@ -56,6 +58,8 @@ | |||
*/ | |||
public class SearchStats implements Writeable, ToXContentFragment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to make change in writeTo(StreamOutput out), Stats(StreamInput in). As these methods are used by nodes to pass stats between each other.
server/src/main/java/org/opensearch/action/search/SearchCoordinatorStats.java
Outdated
Show resolved
Hide resolved
try { | ||
queryPhaseEnd = System.nanoTime(); | ||
queryTotal = TimeUnit.NANOSECONDS.toMillis(queryPhaseEnd - queryPhaseStart); | ||
listener.onQueryPhaseEnd(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pass the took time in onQueryPhaseEnd. Inside stats you will implement the same way like in shard level listener which is thread safe.
Same for below.
void onExpandSearchPhaseStart(SearchPhaseContext context); | ||
void onExpandSearchPhaseFailure(SearchPhaseContext context); | ||
void onExpandSearchPhaseEnd(SearchPhaseContext context); | ||
void addQueryTotal(long queryTotal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned earlier, don't need this. Just use phaseEnd and pass took time.
Similar for others.
server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…tenerExecutor class inside of AbstractSearchAsync
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/SearchCoordinatorStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/SearchRequestOperationsListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/SearchCoordinatorStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/SearchCoordinatorStats.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…henFetchAsyncAction
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java
Show resolved
Hide resolved
Signed-off-by: sahil <61558528+buddharajusahil@users.noreply.github.com>
Gradle Check (Jenkins) Run Completed with:
|
This change adds and tracks node coordinator stats in the SearchStats object that is returned when prompted for node stats.
This does not include testing, just the basic functionality.