Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Azure Cosmos DB not working as excepted -get throughput control to work with Cosmos DB Spark connector

I am trying to get throughput control to work with Cosmos DB Spark connector, but I don’t see the new containers created.

Here is the code:

val changeFeedCfg = Map("spark.cosmos.accountEndpoint" -> cosmosEndpoint,"spark.cosmos.accountKey" -> cosmosMasterKey,"spark.cosmos.database" -> cosmosDatabaseName,"spark.cosmos.container" -> cosmosContainerName,"spark.cosmos.read.inferSchema.enabled" -> "false","spark.cosmos.changeFeed.startFrom" -> "Beginning","spark.cosmos.changeFeed.mode" -> "Incremental","spark.cosmos.changeFeed.itemCountPerTriggerHint" -> "100000"//optional configuration for throughput control// "spark.cosmos.throughputControl.enabled" -> "true",// "spark.cosmos.throughputControl.name" -> "SourceContainerThroughputControl",// "spark.cosmos.throughputControl.targetThroughputThreshold" -> "0.30",// "spark.cosmos.throughputControl.globalControl.database" -> "database-v4",// "spark.cosmos.throughputControl.globalControl.container" -> "ThroughputControl"
"spark.cosmos.throughputControl.useGatewayMode" -> "true")`

I had tried the code and it is not working as excepted.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I see you are using Gateway mode.

"spark.cosmos.throughputControl.useGatewayMode" -> "true"

Currently we do not have support for throughput control in gateway mode

https://github.com/Azure/azure-sdk-for-java/issues/34229

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading