prateekm commented on a change in pull request #1429:
URL: https://github.com/apache/samza/pull/1429#discussion_r594676882
##########
File path:
samza-core/src/main/java/org/apache/samza/storage/TaskStorageCommitManager.java
##########
@@ -161,18 +152,22 @@ public void persistToLocalFileSystem(Checkpoint
checkpoint) {
taskName, checkpoint);
storageEngines.forEach((storeName, storageEngine) -> {
// Only write the checkpoint file if the store is durable and
persisted to disk
- if (storageEngine.getStoreProperties().isLoggedStore() &&
+ if (storageEngine.getStoreProperties().isDurableStore() &&
storageEngine.getStoreProperties().isPersistedToDisk()) {
CheckpointV2 checkpointV2 = (CheckpointV2) checkpoint;
- // TODO HIGH dchen add try-catch with info about task, store,
checkpointId etc. Write can throw IOException.
- File storeDir =
storageManagerUtil.getTaskStoreDir(durableStoreBaseDir, storeName, taskName,
TaskMode.Active);
- storageManagerUtil.writeCheckpointFile(storeDir, checkpointV2);
+ try {
+ File storeDir =
storageManagerUtil.getTaskStoreDir(durableStoreBaseDir, storeName, taskName,
TaskMode.Active);
+ storageManagerUtil.writeCheckpointV2File(storeDir, checkpointV2);
- // TODO HIGH dchen add try-catch with info about task, store,
checkpointId etc. Write can throw IOException.
- CheckpointId checkpointId = checkpointV2.getCheckpointId();
- File checkpointDir =
Paths.get(StorageManagerUtil.getCheckpointDirPath(storeDir,
checkpointId)).toFile();
- storageManagerUtil.writeCheckpointFile(checkpointDir, checkpointV2);
+ CheckpointId checkpointId = checkpointV2.getCheckpointId();
+ File checkpointDir =
Paths.get(StorageManagerUtil.getCheckpointDirPath(storeDir,
checkpointId)).toFile();
+ storageManagerUtil.writeCheckpointV2File(checkpointDir,
checkpointV2);
+ } catch (Exception e) {
+ throw new SamzaException(
Review comment:
Include original exception.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]