hemantk-12 commented on code in PR #4438:
URL: https://github.com/apache/ozone/pull/4438#discussion_r1151400714


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -120,18 +144,32 @@ public SnapshotDiffManager(ManagedRocksDB db,
     // DiffReportEntry codec for Diff Report.
     this.codecRegistry.addCodec(DiffReportEntry.class,
         new OmDBDiffReportEntryCodec());
+    this.codecRegistry.addCodec(SnapshotDiffJob.class,
+        new SnapshotDiffJobCodec());
 
     this.snapDiffJobTable = new RocksDbPersistentMap<>(db,
         snapDiffJobCfh,
         codecRegistry,
         String.class,
-        String.class);
+        SnapshotDiffJob.class);
 
     this.snapDiffReportTable = new RocksDbPersistentMap<>(db,
         snapDiffReportCfh,
         codecRegistry,
         byte[].class,
         byte[].class);
+
+    this.executorService = new ThreadPoolExecutor(DEFAULT_THREAD_POOL_SIZE,
+        DEFAULT_THREAD_POOL_SIZE,
+        0,
+        TimeUnit.SECONDS,
+        new ArrayBlockingQueue<>(DEFAULT_THREAD_POOL_SIZE),
+        new ThreadPoolExecutor.CallerRunsPolicy()
+    );
+
+    // TODO: [SNAPSHOT] Load jobs only if it is leader node.

Review Comment:
   Added in PR: 
https://github.com/apache/ozone/pull/4490/files#diff-46f82d5fbac5dc7aae1fc363811fb88e6bc6c89a2aefafddad90de2f1ff3cfbdR161



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -120,18 +144,32 @@ public SnapshotDiffManager(ManagedRocksDB db,
     // DiffReportEntry codec for Diff Report.
     this.codecRegistry.addCodec(DiffReportEntry.class,
         new OmDBDiffReportEntryCodec());
+    this.codecRegistry.addCodec(SnapshotDiffJob.class,
+        new SnapshotDiffJobCodec());
 
     this.snapDiffJobTable = new RocksDbPersistentMap<>(db,
         snapDiffJobCfh,
         codecRegistry,
         String.class,
-        String.class);
+        SnapshotDiffJob.class);
 
     this.snapDiffReportTable = new RocksDbPersistentMap<>(db,
         snapDiffReportCfh,
         codecRegistry,
         byte[].class,
         byte[].class);
+
+    this.executorService = new ThreadPoolExecutor(DEFAULT_THREAD_POOL_SIZE,
+        DEFAULT_THREAD_POOL_SIZE,
+        0,
+        TimeUnit.SECONDS,
+        new ArrayBlockingQueue<>(DEFAULT_THREAD_POOL_SIZE),
+        new ThreadPoolExecutor.CallerRunsPolicy()
+    );
+
+    // TODO: [SNAPSHOT] Load jobs only if it is leader node.

Review Comment:
   Addressed in PR: 
https://github.com/apache/ozone/pull/4490/files#diff-46f82d5fbac5dc7aae1fc363811fb88e6bc6c89a2aefafddad90de2f1ff3cfbdR161



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to