Skip to content

Commit 35b4eff

Browse files
fixing lints and gradle checks
Signed-off-by: Sarthak Aggarwal <[email protected]>
1 parent 0a29a2c commit 35b4eff

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt

+10-4
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ object TransformRunner :
153153
logger.debug(
154154
"Transform job {} fetched global checkpoints {}.",
155155
transform.id,
156-
newGlobalCheckpoints
156+
newGlobalCheckpoints,
157157
)
158158
}
159159
// If there are shards to search do it here
@@ -173,7 +173,7 @@ object TransformRunner :
173173
"Transform job {} recompute to start with modified buckets {}. Processing shard {}.",
174174
transform.id,
175175
modifiedBuckets.size,
176-
bucketsToTransform.currentShard
176+
bucketsToTransform.currentShard,
177177
)
178178
// Recompute modified buckets and update them in targetIndex
179179
currentMetadata = recomputeModifiedBuckets(transform, currentMetadata, modifiedBuckets, transformContext)
@@ -243,7 +243,10 @@ object TransformRunner :
243243
)
244244
}
245245
currentBucketsToTransform.modifiedBuckets.addAll(shardLevelModifiedBuckets.modifiedBuckets)
246-
logger.debug("Transform job {} has current buckets {} to transform. Processing Shard {} with checkpoints from {} to {}.", transform.id,currentBucketsToTransform.modifiedBuckets.size, currentShard.shardId ,currentShard.from, currentShard.to)
246+
logger.debug(
247+
"Transform job {} has current buckets {} to transform. Processing Shard {} with checkpoints from {} to {}.",
248+
transform.id, currentBucketsToTransform.modifiedBuckets.size, currentShard.shardId, currentShard.from, currentShard.to,
249+
)
247250
val mergedSearchTime =
248251
currentBucketsToTransform.metadata.stats.searchTimeInMillis +
249252
shardLevelModifiedBuckets.searchTimeInMillis
@@ -340,7 +343,10 @@ object TransformRunner :
340343
}
341344
val indexTimeInMillis =
342345
withTransformSecurityContext(transform) {
343-
logger.debug("Transform job {} starting to index for target index: {} with documents {}.", transform.id,transform.targetIndex, transformSearchResult.docsToIndex.size)
346+
logger.debug(
347+
"Transform job {} starting to index for target index: {} with documents {}.",
348+
transform.id, transform.targetIndex, transformSearchResult.docsToIndex.size,
349+
)
344350
transformIndexer.index(transform.targetIndex, transformSearchResult.docsToIndex, transformContext)
345351
logger.debug("Transform job {} completed to index for target index: {}.", transform.id, transform.targetIndex)
346352
}

src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt

+20-5
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,32 @@ class TransformSearchService(
151151
return@suspendUntil
152152
}
153153
val request = getShardLevelBucketsSearchRequest(transform, afterKey, pageSize, currentShard, searchRequestTimeoutInSeconds)
154-
logger.debug("Transform job {} is starting its search request {} for Shard {} from checkpoint: {} and to checkpoint: {}", transform.id, currentShard.shardId, request.source(), currentShard.from, currentShard.to)
154+
logger.debug(
155+
"Transform job {} is starting its search request {} for Shard {} from checkpoint: {} and to checkpoint: {}",
156+
transform.id, currentShard.shardId, request.source(), currentShard.from, currentShard.to,
157+
)
155158
search(request, listener)
156-
logger.debug("Transform job {} has completed search request for Shard {} from checkpoint: {} and to checkpoint: {}", transform.id, currentShard.shardId, currentShard.from, currentShard.to)
159+
logger.debug(
160+
"Transform job {} has completed search request for Shard {} from checkpoint: {} and to checkpoint: {}",
161+
transform.id, currentShard.shardId, currentShard.from, currentShard.to,
162+
)
157163
}
158164
}
159165
// If the request was successful, update page size
160166
transformContext.lastSuccessfulPageSize = pageSize
161-
logger.debug("Transform job {} updated page size {} for Shard {} from checkpoint: {} and to checkpoint: {}", transform.id, pageSize, currentShard.shardId, currentShard.from, currentShard.to)
167+
logger.debug(
168+
"Transform job {} updated page size {} for Shard {} from checkpoint: {} and to checkpoint: {}",
169+
transform.id, pageSize, currentShard.shardId, currentShard.from, currentShard.to,
170+
)
162171
transformContext.renewLockForLongSearch(Instant.now().epochSecond - searchStart)
163-
logger.debug("Transform job {} is renewing lock for long search for Shard {} from checkpoint: {} and to checkpoint: {}. Time for search {}", transform.id, currentShard.shardId, currentShard.from, currentShard.to, searchResponse.took.millis())
164-
logger.trace("Transform job {} search response {} for Shard {} from checkpoint: {} and to checkpoint: {}. Time for search {}", transform.id, searchResponse, currentShard.shardId, currentShard.from, currentShard.to, searchResponse.took.millis())
172+
logger.debug(
173+
"Transform job {} is renewing lock for long search for Shard {} from checkpoint: {} and to checkpoint: {}. Time for search {}",
174+
transform.id, currentShard.shardId, currentShard.from, currentShard.to, searchResponse.took.millis(),
175+
)
176+
logger.trace(
177+
"Transform job {} search response {} for Shard {} from checkpoint: {} and to checkpoint: {}. Time for search {}",
178+
transform.id, searchResponse, currentShard.shardId, currentShard.from, currentShard.to, searchResponse.took.millis(),
179+
)
165180
return convertBucketSearchResponse(transform, searchResponse)
166181
} catch (e: TransformSearchServiceException) {
167182
throw e

0 commit comments

Comments
 (0)