cleanup unwanted code in weaviate adapter

This commit is contained in:
Madhavan Sridharan 2024-08-13 04:24:18 -04:00
parent 6fc4b14f15
commit 8fd79b912f
2 changed files with 0 additions and 76 deletions

View File

@ -64,72 +64,6 @@ public class WeaviateOpMapper implements OpMapper<WeaviateBaseOp<?>> {
case get_collection_schema ->
new WeaviateGetCollectionSchemaOpDispenser(adapter, op, typeAndTarget.targetFunction);
case create_objects -> new WeaviateCreateObjectsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case create_index -> new WeaviateCreateIndexOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case drop_index -> new WeaviateDropIndexOpDispenser(adapter, op, typeAndTarget.targetFunction);
// // Uses the Collection-specific fields (columnar) insert mode
// case insert_rows -> new WeaviateInsertRowsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// // Uses the High-Level row-by-row JSONObject (tabular) insert mode
// case insert -> new WeaviateInsertOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case delete -> new WeaviateDeleteOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case search -> new WeaviateSearchOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case alter_alias -> new WeaviateAlterAliasOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case alter_collection -> new WeaviateAlterCollectionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case flush -> new WeaviateFlushOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case bulk_insert -> new WeaviateBulkInsertOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case create_alias -> new WeaviateCreateAliasOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case get -> new WeaviateGetOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case create_partition -> new WeaviateCreatePartitionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case create_credential -> new WeaviateCreateCredentialOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case create_database -> new WeaviateCreateDatabaseOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case query -> new WeaviateQueryOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case delete_credential -> new WeaviateDeleteCredentialOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case describe_collection ->
// new WeaviateDescribeCollectionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case describe_index -> new WeaviateDescribeIndexOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case drop_alias -> new WeaviateDropAliasOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case get_metrics -> new WeaviateGetMetricsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case drop_database -> new WeaviateDropDatabaseOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case get_replicas -> new WeaviateGetReplicasOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case load_balance -> new WeaviateLoadBalanceOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case has_partition -> new WeaviateHasPartitionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case drop_partition -> new WeaviateDropPartitionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case get_load_state -> new WeaviateGetLoadStateOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case list_databases -> new WeaviateListDatabasesOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case manual_compact -> new WeaviateManualCompactOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case get_index_state -> new WeaviateGetIndexStateOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case list_cred_users -> new WeaviateListCredUsersOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case load_collection -> new WeaviateLoadCollectionOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case show_partitions -> new WeaviateShowPartitionsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case load_partitions -> new WeaviateLoadPartitionsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case list_collections -> new WeaviateListCollectionsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case show_collections -> new WeaviateShowCollectionsOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case update_credential -> new WeaviateUpdateCredentialOpDispenser(adapter, op, typeAndTarget.targetFunction);
// case release_collection -> new WeaviateReleaseCollectionOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_bulk_insert_state -> new WeaviateGetBulkInsertStateOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case release_partitions -> new WeaviateReleasePartitionsOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_flush_all_state -> new WeaviateGetFlushAllStateOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_compaction_state -> new WeaviateGetCompactionStateOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_loading_progress -> new WeaviateGetLoadingProgressOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_persistent_segment_info -> new WeaviateGetPersistentSegmentInfoOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_query_segment_info -> new WeaviateGetQuerySegmentInfoOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case list_bulk_insert_tasks -> new WeaviateListBulkInsertTasksOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_index_build_progress -> new WeaviateGetIndexBuildProgressOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_partition_statistics -> new WeaviateGetPartitionStatisticsOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_collection_statistics -> new WeaviateGetCollectionStatisticsOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// case get_compaction_state_with_plans -> new WeaviateGetCompactionStateWithPlansOpDispenser(adapter, op,
// typeAndTarget.targetFunction);
// default -> throw new RuntimeException("Unrecognized op type '" + typeAndTarget.enumId.name() + "' while " +
// "mapping parsed op " + op);
};

View File

@ -44,9 +44,6 @@ import io.weaviate.client.v1.auth.exception.AuthException;
* quick start guide</a>
* @see <a href="https://github.com/weaviate/java-client">Weaviate Java
* client</a>
* @see <a href=
* "https://github.com/qdrant/qdrant/blob/master/docs/grpc/docs.md">Qdrant
* GRPC docs</a>
*/
public class WeaviateSpace implements AutoCloseable {
private final static Logger logger = LogManager.getLogger(WeaviateSpace.class);
@ -77,10 +74,7 @@ public class WeaviateSpace implements AutoCloseable {
private WeaviateClient createClient() throws AuthException {
String uri = cfg.get("uri");
String scheme = cfg.getOptional("scheme").orElse("https");
// int grpcPort = cfg.getOptional("grpc_port").map(Integer::parseInt).orElse(6334);
// boolean useTls = cfg.getOptional("use_tls").map(Boolean::parseBoolean).orElse(true);
// var builder = QdrantGrpcClient.newBuilder(uri, grpcPort, useTls);
var requiredToken = cfg.getOptional("token_file")
.map(Paths::get)
.map(
@ -102,10 +96,6 @@ public class WeaviateSpace implements AutoCloseable {
&& (cfg.getOptional("username").isPresent() || cfg.getOptional("password").isPresent())) {
throw new OpConfigError("Username/Password combo cannot be used together with token/tokenFile");
}
// builder = builder.withApiKey(requiredToken);
// builder = builder.withTimeout(
// Duration.ofMillis(NumberUtils.toInt(cfg.getOptional("timeout_ms").orElse("3000")))
// );
logger.info("{}: Creating new Weaviate Client with (masked) token [{}], uri/endpoint [{}]",
this.name, WeaviateAdapterUtils.maskDigits(requiredToken), uri);