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

optionally take start and end time query params for s3 log search #729

Merged
merged 2 commits into from Oct 16, 2015

Conversation

ssalinas
Copy link
Member

@ssalinas ssalinas commented Oct 9, 2015

this is just an initial thought, not sure if it is the best way to do this but wanted to open for feedback. This is related to our logfetch issue and the fact that /logs/request/{requestId} and even /logs/request/{requestId}/deploy/{deployId} will consistently time out for a service with too many logs. (Think scheduled job that runs every ~10 mins). Also combating this on logfetch side, but this could definitely help

public List<SingularityS3Log> getS3LogsForTask(@ApiParam("The task ID to search for") @PathParam("taskId") String taskId) throws Exception {
public List<SingularityS3Log> getS3LogsForTask(
@ApiParam("The task ID to search for") @PathParam("taskId") String taskId,
@ApiParam("Start timestamp (millis, 13 digit)") @QueryParam("start") long start,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can they not be optional in here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure you can use Optional in @QueryParam, I think if the query param is not specified it will always come back as a null no matter what the class. I'll double check though

Copy link
Contributor

Choose a reason for hiding this comment

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

the query params will be zero if not specified (since they're primitive types), so fromNullable() wont work

@ssalinas ssalinas added the hs_qa label Oct 14, 2015
@tpetr tpetr added this to the 0.4.6 milestone Oct 16, 2015
tpetr pushed a commit that referenced this pull request Oct 16, 2015
optionally take start and end time query params for s3 log search
@tpetr tpetr merged commit b4c1025 into master Oct 16, 2015
@tpetr tpetr removed hs_qa labels Oct 16, 2015
@ssalinas ssalinas deleted the s3_logs branch December 21, 2015 16:58
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.

None yet

3 participants