-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:nosqlbench/nosqlbench
- Loading branch information
Showing
24 changed files
with
1,162 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
467 changes: 467 additions & 0 deletions
467
...qdrant/src/main/java/io/nosqlbench/adapter/qdrant/opdispensers/QdrantBaseOpDispenser.java
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
...ain/java/io/nosqlbench/adapter/qdrant/opdispensers/QdrantCollectionExistsOpDispenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2020-2024 nosqlbench | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.nosqlbench.adapter.qdrant.opdispensers; | ||
|
||
import io.nosqlbench.adapter.qdrant.QdrantDriverAdapter; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantBaseOp; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantCollectionExistsOp; | ||
import io.nosqlbench.adapters.api.templating.ParsedOp; | ||
import io.qdrant.client.QdrantClient; | ||
import io.qdrant.client.grpc.Collections.CollectionExistsRequest; | ||
|
||
import java.util.function.LongFunction; | ||
|
||
public class QdrantCollectionExistsOpDispenser extends QdrantBaseOpDispenser<CollectionExistsRequest> { | ||
public QdrantCollectionExistsOpDispenser(QdrantDriverAdapter adapter, ParsedOp op, LongFunction<String> targetFunction) { | ||
super(adapter, op, targetFunction); | ||
} | ||
|
||
@Override | ||
public LongFunction<CollectionExistsRequest> getParamFunc( | ||
LongFunction<QdrantClient> clientF, ParsedOp op, LongFunction<String> targetF) { | ||
LongFunction<CollectionExistsRequest.Builder> ebF = | ||
l -> CollectionExistsRequest.newBuilder().setCollectionName(targetF.apply(l)); | ||
|
||
final LongFunction<CollectionExistsRequest.Builder> lastF = ebF; | ||
return l -> lastF.apply(l).build(); | ||
} | ||
|
||
@Override | ||
public LongFunction<QdrantBaseOp<CollectionExistsRequest>> createOpFunc( | ||
LongFunction<CollectionExistsRequest> paramF, | ||
LongFunction<QdrantClient> clientF, | ||
ParsedOp op, | ||
LongFunction<String> targetF) { | ||
return l -> new QdrantCollectionExistsOp(clientF.apply(l), paramF.apply(l)); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
.../main/java/io/nosqlbench/adapter/qdrant/opdispensers/QdrantCollectionInfoOpDispenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2020-2024 nosqlbench | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.nosqlbench.adapter.qdrant.opdispensers; | ||
|
||
import io.nosqlbench.adapter.qdrant.QdrantDriverAdapter; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantBaseOp; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantCollectionInfoOp; | ||
import io.nosqlbench.adapters.api.templating.ParsedOp; | ||
import io.qdrant.client.QdrantClient; | ||
|
||
import java.util.function.LongFunction; | ||
|
||
public class QdrantCollectionInfoOpDispenser extends QdrantBaseOpDispenser<String> { | ||
public QdrantCollectionInfoOpDispenser(QdrantDriverAdapter adapter, ParsedOp op, LongFunction<String> targetFunction) { | ||
super(adapter, op, targetFunction); | ||
} | ||
|
||
@Override | ||
public LongFunction<String> getParamFunc( | ||
LongFunction<QdrantClient> clientF, ParsedOp op, LongFunction<String> targetF) { | ||
return l -> targetF.apply(l); | ||
} | ||
|
||
@Override | ||
public LongFunction<QdrantBaseOp<String>> createOpFunc( | ||
LongFunction<String> paramF, | ||
LongFunction<QdrantClient> clientF, | ||
ParsedOp op, | ||
LongFunction<String> targetF) { | ||
return l -> new QdrantCollectionInfoOp(clientF.apply(l), paramF.apply(l)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ava/io/nosqlbench/adapter/qdrant/opdispensers/QdrantListCollectionAliasesOpDispenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2020-2024 nosqlbench | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.nosqlbench.adapter.qdrant.opdispensers; | ||
|
||
import io.nosqlbench.adapter.qdrant.QdrantDriverAdapter; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantBaseOp; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantListCollectionAliasesOp; | ||
import io.nosqlbench.adapters.api.templating.ParsedOp; | ||
import io.qdrant.client.QdrantClient; | ||
import io.qdrant.client.grpc.Collections.ListCollectionAliasesRequest; | ||
|
||
import java.util.function.LongFunction; | ||
|
||
public class QdrantListCollectionAliasesOpDispenser extends QdrantBaseOpDispenser<ListCollectionAliasesRequest> { | ||
public QdrantListCollectionAliasesOpDispenser(QdrantDriverAdapter adapter, ParsedOp op, | ||
LongFunction<String> targetFunction) { | ||
super(adapter, op, targetFunction); | ||
} | ||
|
||
@Override | ||
public LongFunction<ListCollectionAliasesRequest> getParamFunc(LongFunction<QdrantClient> clientF, ParsedOp op, | ||
LongFunction<String> targetF) { | ||
LongFunction<ListCollectionAliasesRequest.Builder> ebF = | ||
l -> ListCollectionAliasesRequest.newBuilder().setCollectionName(targetF.apply(l)); | ||
|
||
final LongFunction<ListCollectionAliasesRequest.Builder> lastF = ebF; | ||
return l -> lastF.apply(l).build(); | ||
} | ||
|
||
@Override | ||
public LongFunction<QdrantBaseOp<ListCollectionAliasesRequest>> createOpFunc( | ||
LongFunction<ListCollectionAliasesRequest> paramF, | ||
LongFunction<QdrantClient> clientF, ParsedOp op, LongFunction<String> targetF) { | ||
return l -> new QdrantListCollectionAliasesOp(clientF.apply(l), paramF.apply(l)); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...main/java/io/nosqlbench/adapter/qdrant/opdispensers/QdrantListCollectionsOpDispenser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2020-2024 nosqlbench | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.nosqlbench.adapter.qdrant.opdispensers; | ||
|
||
import io.nosqlbench.adapter.qdrant.QdrantDriverAdapter; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantBaseOp; | ||
import io.nosqlbench.adapter.qdrant.ops.QdrantListCollectionsOp; | ||
import io.nosqlbench.adapters.api.templating.ParsedOp; | ||
import io.qdrant.client.QdrantClient; | ||
|
||
import java.util.function.LongFunction; | ||
|
||
public class QdrantListCollectionsOpDispenser extends QdrantBaseOpDispenser<Object> { | ||
public QdrantListCollectionsOpDispenser(QdrantDriverAdapter adapter, | ||
ParsedOp op, LongFunction<String> targetFunction) { | ||
super(adapter, op, targetFunction); | ||
} | ||
|
||
@Override | ||
public LongFunction<Object> getParamFunc(LongFunction<QdrantClient> clientF, ParsedOp op, LongFunction<String> targetF) { | ||
return l -> ""; | ||
} | ||
|
||
@Override | ||
public LongFunction<QdrantBaseOp<Object>> createOpFunc( | ||
LongFunction<Object> paramF, | ||
LongFunction<QdrantClient> clientF, | ||
ParsedOp op, LongFunction<String> targetF) { | ||
return l -> new QdrantListCollectionsOp(clientF.apply(l), null); | ||
} | ||
} |
Oops, something went wrong.