-
Notifications
You must be signed in to change notification settings - Fork 98
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
TASK-6442 - Add Resources Management functionality #2535
base: develop
Are you sure you want to change the base?
Conversation
…ASK-7047, #TASK-6442
…alyisis resources for the current OpenCGA version, and generate clients, #TASK-7088, #TASK-6442
…o the installation folder, #TASK-7088, #TASK-6442
…lization, and add the flag fetchResourceOnInit in the configuration file, #TASK-7088, #TASK-6442
… #TASK-7088, #TASK-6442
…-7088, #TASK-6442
…ing, #TASK-7125, #TASK-6442
…esource management, #TASK-7127, #TASK-6442
…me some constants, #TASK-7088, #TASK-6442
…ng the ResourceManager, #TASK-7139, #TASK-6442
…TASK-7047, #TASK-6442
FqnUtils.FQN fqn = FqnUtils.parse(study.getFqn()); | ||
String organization = fqn.getOrganization(); | ||
try { | ||
URI studyUri = ioManager.getStudyUri(organization, Long.toString(project.getUid()), Long.toString(study.getUid())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this responsibility of the StudyManager?
By this I mean "setting and validating expected values to the object to insert"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree it should be its responsibility. However, until we create some kind of session between the manager and the dbadaptor, I'd say that's the best place it could be for integrity reasons.
opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/StudyMongoDBAdaptor.java
Show resolved
Hide resolved
opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/StudyManager.java
Show resolved
Hide resolved
} | ||
|
||
/* | ||
$ cat resources-3.3.0-SNAPSHOT.json | jq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮
@@ -18,7 +18,8 @@ analysis: | |||
- "org.opencb.opencga" | |||
scratchDir: "/tmp/" # Scratch folder for the analysis. | |||
# Default URL for downloading analysis resources. | |||
resourceUrl: "http://resources.opencb.org/opencb/opencga/analysis/" | |||
resourceUrl: "http://resources.opencb.org/opencb/opencga/analysis/resources-test/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"resources-test/" is the actual final value, or just a temporary testing change?
|
||
public class AnalysisResourceList { | ||
|
||
private String analysisId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "analysis" a thing? What is this "analysisId" ? Isn't this a "toolId" ?
The only "analysisId" that we have are the "clinicalAnalysisIds"
|
||
public class AnalysisResource { | ||
|
||
private String url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add @DataField
annotations to new fields
e.g.
@DataField(description = "I have no idea what this key is for. Wild guess : it's for encryption purposes")
private String key;
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class AnalysisResource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a naming discrepancy between "Resource" and "AnalysisResource".
Does the ResourceManager manage AnalysisResources? Are there any other non-analysis resources?
Files can be just a "resource : bool"
|
||
// Mark fetching as started | ||
try { | ||
isFetching = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if it's being fetched from another node?
private Configuration configuration; | ||
|
||
// Flag to track if all resources are fetching | ||
private boolean isFetching = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it "volatile" or "AtomicBoolean"
…changes, #TASK-7139, #TASK-6442
…K-7125, #TASK-6442
…hanges, #TASK-7127, #TASK-6442
…anges, #TASK-7088, #TASK-6442
No description provided.