Skip to content

Commit

Permalink
reduceNoisyLogLevelFromInfoToDebug (#36653)
Browse files Browse the repository at this point in the history
* reduce noisy log level from info to debug

* update changelog

---------

Co-authored-by: annie-mac <xinlian@microsoft.com>
  • Loading branch information
xinlian12 and annie-mac authored Sep 12, 2023
1 parent eaa16d1 commit 57aa141
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Bugs Fixed

#### Other Changes
* Reduce noisy log in `ThroughputControlHelper` from `INFO` to `DEBUG` - See [PR 36653](https://github.com/Azure/azure-sdk-for-java/pull/36653)

### 4.21.1 (2023-08-28)

Expand Down
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos-spark_3-2_2-12/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Bugs Fixed

#### Other Changes
* Reduce noisy log in `ThroughputControlHelper` from `INFO` to `DEBUG` - See [PR 36653](https://github.com/Azure/azure-sdk-for-java/pull/36653)

### 4.21.1 (2023-08-28)

Expand Down
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Bugs Fixed

#### Other Changes
* Reduce noisy log in `ThroughputControlHelper` from `INFO` to `DEBUG` - See [PR 36653](https://github.com/Azure/azure-sdk-for-java/pull/36653)

### 4.21.1 (2023-08-28)

Expand Down
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Bugs Fixed

#### Other Changes
* Reduce noisy log in `ThroughputControlHelper` from `INFO` to `DEBUG` - See [PR 36653](https://github.com/Azure/azure-sdk-for-java/pull/36653)

### 4.21.1 (2023-08-28)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private object ThroughputControlHelper extends BasicLoggingTrait {
}
if (throughputControlConfig.priorityLevel.isDefined) {
val priority = throughputControlConfig.priorityLevel.get
logInfo(s"Configure throughput control with priority $priority")
logDebug(s"Configure throughput control with priority $priority")
groupConfigBuilder.priorityLevel(parsePriorityLevel(throughputControlConfig.priorityLevel.get))
}

Expand Down Expand Up @@ -148,19 +148,19 @@ private object ThroughputControlHelper extends BasicLoggingTrait {
// If there is no SparkExecutorCount being captured, then fall back to use 1 executor count
// If the spark executor count is somehow 0, then fall back to 1 executor count
val instanceCount = math.max(userConfig.getOrElse(CosmosConfigNames.SparkExecutorCount, "1").toInt, 1)
logInfo(s"Configure throughput control without using dedicated container, instance count $instanceCount")
logDebug(s"Configure throughput control without using dedicated container, instance count $instanceCount")

if (throughputControlConfig.targetThroughput.isDefined) {
val targetThroughputByExecutor =
(throughputControlConfig.targetThroughput.get / instanceCount).ceil.toInt
logInfo(s"Configure throughput control with throughput $targetThroughputByExecutor")
logDebug(s"Configure throughput control with throughput $targetThroughputByExecutor")
groupConfigBuilder.targetThroughput(targetThroughputByExecutor)
}
if (throughputControlConfig.targetThroughputThreshold.isDefined) {
// Try to limit to 2 decimal digits
val targetThroughputThresholdByExecutor =
(throughputControlConfig.targetThroughputThreshold.get * 10000 / instanceCount).ceil / 10000
logInfo(s"Configure throughput control with throughput threshold $targetThroughputThresholdByExecutor")
logDebug(s"Configure throughput control with throughput threshold $targetThroughputThresholdByExecutor")
groupConfigBuilder.targetThroughputThreshold(targetThroughputThresholdByExecutor)
}
if (throughputControlConfig.priorityLevel.isDefined) {
Expand Down

0 comments on commit 57aa141

Please sign in to comment.