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

GRIFFIN-244 Get metrics by instance #491

Closed
wants to merge 27 commits into from

Conversation

dershovGD
Copy link
Contributor

No description provided.

dershovGD and others added 25 commits February 27, 2019 15:39
In order to store more detailed information about certain metric the YARN application id associated with that metric has been added to MetricWrapper's flush method.
…ticSearchSink

Add applicationId to MetricWrapper
Griffin Exception will be thrown if there is no Job Instance Bean with given id found. Test has been added to JobControllerTest to test this logic.
Add information about new method in documentation and create new postman example.
Griffin 237 Get Job Instance by Id
…m_upstream

# Conflicts:
#	service/src/main/java/org/apache/griffin/core/exception/GriffinExceptionMessage.java
#	service/src/main/java/org/apache/griffin/core/job/JobService.java
# Conflicts:
#	service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
#	service/src/test/java/org/apache/griffin/core/job/JobControllerTest.java
@dershovGD dershovGD changed the title Get metrics by instance GRIFFIN-244 Get metrics by instance Mar 29, 2019
PREDICATE_TYPE_NOT_FOUND(40408, "Unknown predicate type"),
JOB_INSTANCE_NOT_FOUND(40408, "No job instances with given job instance id found"),

PREDICATE_TYPE_NOT_FOUND(40409, "Unknown predicate type"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably makes duplication with the next one. At least when requesting non-existing instance, I got Unknown predicate type in response :o

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

service/pom.xml Outdated
@@ -110,11 +110,11 @@ under the License.
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<!--<dependency>-->
Copy link
Contributor

Choose a reason for hiding this comment

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

let's revert it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've commented it back.

After merging the different errors received the same status code(40409). This collision has been resolved.
Copy link
Contributor

@RodionGork RodionGork left a comment

Choose a reason for hiding this comment

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

I approve. I wonder about whether we should check against empty array here but it looks like not real case for working application. Anyway this is not breaking any existing functionality.

Also there are some discrepancies with the project codestyle, but as existing project code also have them, we agreed to perform cleanup and attaching checkstyle in different PR.

@RodionGork
Copy link
Contributor

@chemikadze please come to see this...

@Override
public MetricValue getMetric(String applicationId) throws IOException {
Map<String, String> map =new HashMap<>();
map.put("q", "applicationId:"+applicationId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Collections.singletonMap() probably can be used

@chemikadze
Copy link
Member

chemikadze commented Apr 2, 2019

@RodionGork these merge commits have no practical sense, please rebase ontop of fresh master, and get rid of non-merge commits

@RodionGork
Copy link
Contributor

@chemikadze rebase leads to conflicts resolving... Thus I'd better have all this stuff squashed and pushed as @dershovGD (we probably have no practical sense in intermediate commits too), if no one's minds.

@RodionGork
Copy link
Contributor

Now #492 is a new, squashed version of this PR.

@chemikadze chemikadze closed this Apr 3, 2019
asfgit pushed a commit that referenced this pull request Apr 14, 2019
This is just a squashed version of #491

Author: Rodion Gorkovenko <rodiongork@github.com>
Author: rodion <dershov@griddynamics.com>

Closes #492 from RodionGork/griffin-244-squashed.
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.

4 participants