Skip to content

Commit

Permalink
fixing lints and gradle checks
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
  • Loading branch information
sarthakaggarwal97 committed Apr 8, 2024
1 parent 0a29a2c commit 35b4eff
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ object TransformRunner :
logger.debug(
"Transform job {} fetched global checkpoints {}.",
transform.id,
newGlobalCheckpoints
newGlobalCheckpoints,
)
}
// If there are shards to search do it here
Expand All @@ -173,7 +173,7 @@ object TransformRunner :
"Transform job {} recompute to start with modified buckets {}. Processing shard {}.",
transform.id,
modifiedBuckets.size,
bucketsToTransform.currentShard
bucketsToTransform.currentShard,
)
// Recompute modified buckets and update them in targetIndex
currentMetadata = recomputeModifiedBuckets(transform, currentMetadata, modifiedBuckets, transformContext)
Expand Down Expand Up @@ -243,7 +243,10 @@ object TransformRunner :
)
}
currentBucketsToTransform.modifiedBuckets.addAll(shardLevelModifiedBuckets.modifiedBuckets)
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)
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,
)
val mergedSearchTime =
currentBucketsToTransform.metadata.stats.searchTimeInMillis +
shardLevelModifiedBuckets.searchTimeInMillis
Expand Down Expand Up @@ -340,7 +343,10 @@ object TransformRunner :
}
val indexTimeInMillis =
withTransformSecurityContext(transform) {
logger.debug("Transform job {} starting to index for target index: {} with documents {}.", transform.id,transform.targetIndex, transformSearchResult.docsToIndex.size)
logger.debug(
"Transform job {} starting to index for target index: {} with documents {}.",
transform.id, transform.targetIndex, transformSearchResult.docsToIndex.size,
)
transformIndexer.index(transform.targetIndex, transformSearchResult.docsToIndex, transformContext)
logger.debug("Transform job {} completed to index for target index: {}.", transform.id, transform.targetIndex)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,32 @@ class TransformSearchService(
return@suspendUntil
}
val request = getShardLevelBucketsSearchRequest(transform, afterKey, pageSize, currentShard, searchRequestTimeoutInSeconds)
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)
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,
)
search(request, listener)
logger.debug("Transform job {} has completed search request for Shard {} from checkpoint: {} and to checkpoint: {}", transform.id, currentShard.shardId, currentShard.from, currentShard.to)
logger.debug(
"Transform job {} has completed search request for Shard {} from checkpoint: {} and to checkpoint: {}",
transform.id, currentShard.shardId, currentShard.from, currentShard.to,
)
}
}
// If the request was successful, update page size
transformContext.lastSuccessfulPageSize = pageSize
logger.debug("Transform job {} updated page size {} for Shard {} from checkpoint: {} and to checkpoint: {}", transform.id, pageSize, currentShard.shardId, currentShard.from, currentShard.to)
logger.debug(
"Transform job {} updated page size {} for Shard {} from checkpoint: {} and to checkpoint: {}",
transform.id, pageSize, currentShard.shardId, currentShard.from, currentShard.to,
)
transformContext.renewLockForLongSearch(Instant.now().epochSecond - searchStart)
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())
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())
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(),
)
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(),
)
return convertBucketSearchResponse(transform, searchResponse)
} catch (e: TransformSearchServiceException) {
throw e
Expand Down

0 comments on commit 35b4eff

Please sign in to comment.