Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

FALCON-2077 Api support for Process SLA #278

Closed
wants to merge 3 commits into from

Conversation

PraveenAdlakha
Copy link
Contributor

No description provided.

@PraveenAdlakha
Copy link
Contributor Author

PraveenAdlakha commented Aug 31, 2016

Result of Dev Testing :

$ bin/falcon entity -type process -slaAlert -name ProcessInstanceRerunTest-agregator-33 -start 2016-08-30T07:30Z -end 2016-08-30T08:30Z

name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:30Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:35Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:40Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:45Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:50Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T07:55Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:00Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:05Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:10Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:15Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:20Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:25Z, tags: Missed-SLA-High
name: ProcessInstanceRerunTest-agregator-33, type: PROCESS, cluster: local, instanceTime: 2016-08-30T08:30Z, tags: Missed-SLA-High

@PraveenAdlakha
Copy link
Contributor Author

Hi All,

EntitySLAAlertServiceTest might fail just wanted to make sure its not my machine issue.Will see what is needed to be done if it fails.

Thanks

* if the entityType is not valid.
* */

public static void checkEntityType(String entityType)throws FalconException {

Choose a reason for hiding this comment

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

Can't you use EntityType.getEnum(entityType) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After discussed moving it to EntityType as EntityType.getEnum will not serve the complete purpose of the function.

@pallavi-rao
Copy link

@PraveenAdlakha, are you taking up corresponding CLI changes as part of a separate JIRA?

@pallavi-rao
Copy link

My bad. Didn't notice that you had tested against CLI itself. Which means the CLI changes were already in place. Please ignore my comment on the CLI change.

@@ -111,16 +111,29 @@ protected synchronized void scheduleInternal(String type, String entity, Boolean
}
}

/**
* Validates the parameters wheather SLA is supported or not.

Choose a reason for hiding this comment

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

Nit : Typo. Should be "whether"

@@ -101,6 +101,16 @@ public boolean isSchedulable() {
return ((this != EntityType.CLUSTER) && (this != EntityType.DATASOURCE));
}

public static void assertSchedulable(String entityType){

Choose a reason for hiding this comment

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

Can you use EntityType.getEnum inside this method? This method will be pretty much similar to AbstractSchedulableEntityManager.checkSchedulableEntity, except, the exception may be different.

@pallavi-rao
Copy link

Other than the minor nit. +1.

@PraveenAdlakha
Copy link
Contributor Author

@pallavi-rao have made the changes please review.

@pallavi-rao
Copy link

Merging this...

@asfgit asfgit closed this in 91c0a99 Sep 6, 2016
PraveenAdlakha added a commit to PraveenAdlakha/falcon that referenced this pull request Sep 7, 2016
Author: Praveen Adlakha <adlakha.praveen@gmail.com>

Reviewers: @pallavi-rao

Closes apache#278 from PraveenAdlakha/2077_v1 and squashes the following commits:

3b89e83 [Praveen Adlakha] changed method in EntityType
a4c3686 [Praveen Adlakha] comments addressed
860d055 [Praveen Adlakha] FALCON-2077 Api support for Process SLA
pallavi-rao pushed a commit to pallavi-rao/falcon that referenced this pull request Feb 16, 2018
Author: Praveen Adlakha <adlakha.praveen@gmail.com>

Reviewers: @pallavi-rao

Closes apache#278 from PraveenAdlakha/2077_v1 and squashes the following commits:

3b89e83 [Praveen Adlakha] changed method in EntityType
a4c3686 [Praveen Adlakha] comments addressed
860d055 [Praveen Adlakha] FALCON-2077 Api support for Process SLA
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants