Azure / azure-cosmosdb-bulkexecutor-java-getting-started

Bulk Executor Utility for Azure Cosmos DB Java SQL API
Creative Commons Attribution 4.0 International
14 stars 13 forks source link

BulkDeleter is broken : Actual and formal argument lists differ in length #6

Closed apandey846 closed 4 years ago

apandey846 commented 4 years ago

samples/bulkexecutor-sample/src/main/java/com/microsoft/azure/cosmosdb/bulkexecutor/bulkdelete/BulkDeleter.java:[97,69] method deleteAll in class com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor cannot be applied to given types; [ERROR] required: java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>> [ERROR] found: java.lang.String,com.microsoft.azure.documentdb.RequestOptions [ERROR] reason: actual and formal argument lists differ in length

apandey846 commented 4 years ago

The only way to resolve this dependency is to comment BulkDeleter.deleteAll method. Looks like when version was changed from 2.2.0 to 2.6.0 BulkDeleter.deleteAll method() was not resolved please check just took the latest git repo code and its breaking during mvn clean install.

liangyi-xu commented 4 years ago

I'm using 2.7.0. The library is supporting deleteAll(List<Pair<String, String>> pkIdPairsToDelete) only.

abinav2307 commented 4 years ago

Hi all,

We had to remove deleteAll() with a query overload because of a bug. As the delete functionality could have irreversible consequences, we have removed this feature for now.

We are working on a new Java SDK, which is targeted for a release in end of Q1, early Q2 of 2020 which will have bulk APIs integrated into the SDK. This will avoid having to maintain two dependencies - one for the SDK and another for the Bulk Executor.

abinav2307 commented 4 years ago

Sample was also updated for BulkDelete in the latest commit.

apandey846 commented 4 years ago

@abhinav2307 will this extension work with Azure Cosmos DB Async Java SDK also ? I was trying to use it for Async Java SDK looks like internally the DocumentBulkExecutor.Builder is using DocumentClient class which is part of azure-documentdb-2.4.0.jar but currently I"m using azure-cosmosdb dependency in my current project. Or something I'm missing please let me know if we can achieve with Async Java SDK ?

abinav2307 commented 4 years ago

Hello @apandey846, unfortunately this sample only works with our Sync SDK. There are certain internal dependencies in the SDK that the Bulk Executor relies on and hence it is tied to the sync SDK. However, the new Java SDK we will be pushing out (as mentioned above) will have sync and async APIs tied in. This will remove the need to maintain 2 jars in your application/service.

Do let us know if this helps.

apandey846 commented 4 years ago

Thanks @abhinav2307 for the release info. But currently I'm using azure-cosmosdb (2.6.3 version) and for few use-case we need some kind of Bulk executor API so that we can seamlessly migrate huge data from different db source by controlling the RUs throughput. The problem is we start getting 429 when we run our migration script to migrate data from different db to cosmos db thats the reason we started exploring your this repo to migrate data without exhausting our RUs/sec limit. Anyways thanks for your help.