Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics for BlobNotFound error #1612

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shekhars-li
Copy link
Contributor

Changes:

  • Added a new class of exception called BlobNotFoundException
  • Added a new metric to track the count of of this exception during restore from blob stores.

* a blob that is not present.
*
*/
public class BlobNotFoundException extends RuntimeException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NotFoundException to match naming convention for DeletedException etc.

@@ -122,6 +125,8 @@ public BlobStoreBackupManager(JobModel jobModel, ContainerModel containerModel,
this.prevStoreSnapshotIndexesFuture = CompletableFuture.completedFuture(ImmutableMap.of());
this.metrics = blobStoreTaskBackupMetrics;
metrics.initStoreMetrics(storesToBackup);
this.blobStoreManagerMetrics = blobStoreTaskManagerMetrics;
blobStoreTaskManagerMetrics.initStoreMetrics(storesToBackup);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are blob store manager metrics being passed and intialized here instead of in BlobStoreManager init?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for all other occurences.

this.dirDiffUtil = new DirDiffUtil();
this.prevStoreSnapshotIndexes = new HashMap<>();
this.loggedBaseDir = loggedBaseDir;
this.nonLoggedBaseDir = nonLoggedBaseDir;
this.taskName = taskModel.getTaskName().getTaskName();
this.storesToRestore = storesToRestore;
this.metrics = metrics;
this.blobStoreRestoreManagerMetrics = metrics;
this.blobStoreManagerMetrics = blobStoreManagerMetrics;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, why is this updating metrics for an unrelated class?

private static final String GROUP = BlobStoreManagerMetrics.class.getName();
private final MetricsRegistry metricsRegistry;

public final Map<String, Gauge<Long>> storeBlobNotFoundError;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this the only metric handled specially in blob store manager? What about get/put/delete count and timers etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants