Skip to content
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 search protobuf #393

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/run.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.opensearch.gradle.testclusters.RunTask

apply plugin: 'opensearch.testclusters'

def numNodes = findProperty('numNodes') as Integer ?: 1
def numNodes = 5
def numZones = findProperty('numZones') as Integer ?: 1

testClusters {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

package org.opensearch.common.unit;

import java.io.Serializable;
import java.util.Locale;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
Expand All @@ -41,7 +42,7 @@
*
* @opensearch.api
*/
public class TimeValue implements Comparable<TimeValue> {
public class TimeValue implements Comparable<TimeValue>, Serializable {

/** How many nano-seconds in one milli-second */
public static final long NSEC_PER_MSEC = TimeUnit.NANOSECONDS.convert(1, TimeUnit.MILLISECONDS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@
import org.opensearch.action.search.GetSearchPipelineAction;
import org.opensearch.action.search.GetSearchPipelineTransportAction;
import org.opensearch.action.search.MultiSearchAction;
import org.opensearch.action.search.ProtobufSearchAction;
import org.opensearch.action.search.ProtobufTransportSearchAction;
import org.opensearch.action.search.GetAllPitsAction;
import org.opensearch.action.search.PutSearchPipelineAction;
import org.opensearch.action.search.PutSearchPipelineTransportAction;
Expand Down Expand Up @@ -459,6 +461,7 @@
import org.opensearch.rest.action.ingest.RestGetPipelineAction;
import org.opensearch.rest.action.ingest.RestPutPipelineAction;
import org.opensearch.rest.action.ingest.RestSimulatePipelineAction;
import org.opensearch.rest.action.search.ProtobufRestSearchAction;
import org.opensearch.rest.action.search.RestClearScrollAction;
import org.opensearch.rest.action.search.RestCountAction;
import org.opensearch.rest.action.search.RestCreatePitAction;
Expand Down Expand Up @@ -893,6 +896,7 @@ public <Request extends ProtobufActionRequest, Response extends ProtobufActionRe
actions.register(ProtobufNodesInfoAction.INSTANCE, ProtobufTransportNodesInfoAction.class);
actions.register(ProtobufNodesStatsAction.INSTANCE, ProtobufTransportNodesStatsAction.class);
actions.register(ProtobufClusterStateAction.INSTANCE, ProtobufTransportClusterStateAction.class);
actions.register(ProtobufSearchAction.INSTANCE, ProtobufTransportSearchAction.class);

return unmodifiableMap(actions.getRegistry());
}
Expand Down Expand Up @@ -1130,6 +1134,9 @@ public void initProtobufRestHandlers() {
// CAT API
registerHandler.accept(new ProtobufRestNodesAction());
registerHandler.accept(new ProtobufRestCatAction(catActions));

// Search API
registerHandler.accept(new ProtobufRestSearchAction());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.opensearch.search.SearchShardTarget;
import org.opensearch.search.internal.AliasFilter;
import org.opensearch.search.internal.InternalSearchResponse;
import org.opensearch.search.internal.ProtobufShardSearchRequest;
import org.opensearch.search.internal.SearchContext;
import org.opensearch.search.internal.ShardSearchRequest;
import org.opensearch.search.pipeline.PipelinedRequest;
Expand Down Expand Up @@ -623,6 +624,16 @@ public final SearchRequest getRequest() {
return request;
}

@Override
public final ProtobufSearchTask getProtobufTask() {
throw new UnsupportedOperationException("Unimplemented method 'getProtobufTask'");
}

@Override
public final ProtobufSearchRequest getProtobufRequest() {
throw new UnsupportedOperationException("Unimplemented method 'getProtobufRequest'");
}

protected final SearchResponse buildSearchResponse(
InternalSearchResponse internalSearchResponse,
ShardSearchFailure[] failures,
Expand Down Expand Up @@ -764,6 +775,12 @@ public final ShardSearchRequest buildShardSearchRequest(SearchShardIterator shar
return shardRequest;
}

@Override
public final ProtobufShardSearchRequest buildProtobufShardSearchRequest(SearchShardIterator shardIt) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'buildProtobufShardSearchRequest'");
}

/**
* Returns the next phase based on the results of the initial search phase
* @param results the results of the initial search phase. Each non null element in the result array represent a successfully
Expand Down
Loading