prateekm commented on code in PR #1650:
URL: https://github.com/apache/samza/pull/1650#discussion_r1092592037


##########
samza-core/src/main/java/org/apache/samza/storage/blobstore/util/BlobStoreUtil.java:
##########
@@ -82,17 +86,21 @@ public class BlobStoreUtil {
 
   private final BlobStoreManager blobStoreManager;
   private final ExecutorService executor;
+  private final BlobStoreConfig blobStoreConfig;
   private final BlobStoreBackupManagerMetrics backupMetrics;
   private final BlobStoreRestoreManagerMetrics restoreMetrics;
   private final SnapshotIndexSerde snapshotIndexSerde;
+  private final RetryPolicy<Object> retryPolicy;
 
-  public BlobStoreUtil(BlobStoreManager blobStoreManager, ExecutorService 
executor,
+  public BlobStoreUtil(BlobStoreManager blobStoreManager, ExecutorService 
executor, BlobStoreConfig blobStoreConfig,
       BlobStoreBackupManagerMetrics backupMetrics, 
BlobStoreRestoreManagerMetrics restoreMetrics) {
     this.blobStoreManager = blobStoreManager;
     this.executor = executor;
+    this.blobStoreConfig = blobStoreConfig;
     this.backupMetrics = backupMetrics;
     this.restoreMetrics = restoreMetrics;
     this.snapshotIndexSerde = new SnapshotIndexSerde();
+    this.retryPolicy = buildRetryPolicyFromConfig();

Review Comment:
   Don't access class fields set up in constructor from methods called in 
constructor. This is prone to breaking if field assignements are reordered. 
Pass variable explicitly. Generally a good practice (e.g. for unit testing the 
method.).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to