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

In RequestReport, use the hashstore-java library to retrieve a system metadata document or metadata eml document for a pid #464

Open
doulikecookiedough opened this issue Jan 13, 2025 · 0 comments

Comments

@doulikecookiedough
Copy link

doulikecookiedough commented Jan 13, 2025

Begin the process of removing metadig-engine API calls to the CN or MN for retrieving system metadata and EML metadata documents for a given pid by refactoring the RequestReport class. For now, retain the existing behavior of the metadig-engine for public datasets:

  • If a NotAuthorized exception is thrown while accessing system metadata or EML documents via CN/MN, fallback logic will attempt to retrieve the data from HashStore.
  • We will work with the HashStore location for dev.nceas.ucsb.edu on the dev k8s cluster.

This first step will address and resolve:

Branch:

  • feature-hashstore-libimport
// submitReportRequest

try {
    if (isCN) {
        sysmeta = cnNode.getSystemMetadata(session, pid);
    } else {
        sysmeta = mnNode.getSystemMetadata(session, pid);
    }
} catch (NotAuthorized na) {
    log.error("Not authorized to read sysmeta for pid: " + pid.getValue() + ", continuing with next pid...");
    return;
} catch (Exception e) {
    throw (e);
}

try {
    if (isCN) {
        objectIS = cnNode.get(session, pid);
    } else {
        objectIS = mnNode.get(session, pid);
    }
    log.trace("Retrieved metadata object for pid: " + pidStr);
} catch (NotAuthorized na) {
    log.error("Not authorized to read pid: " + pid
            + ", unable to retrieve metadata, continuing with next pid...");
    return;
}
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

No branches or pull requests

1 participant