You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/08 17:57:00 UTC
[jira] [Work logged] (GOBBLIN-1675) Paginate responses from get API on GaaS server side
[ https://issues.apache.org/jira/browse/GOBBLIN-1675?focusedWorklogId=799048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799048 ]
ASF GitHub Bot logged work on GOBBLIN-1675:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Aug/22 17:56
Start Date: 08/Aug/22 17:56
Worklog Time Spent: 10m
Work Description: Will-Lo commented on code in PR #3533:
URL: https://github.com/apache/gobblin/pull/3533#discussion_r940503943
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/FlowSpecSearchObject.java:
##########
@@ -136,11 +147,11 @@ public String augmentBaseGetStatement(String baseStatement)
}
}
- if (conditions.size() == 0) {
Review Comment:
Wouldn't an easier check be to check if limitAndOffset.size() == 0 ? I don't think you need an explicit boolean to determine when to get all in that case.
##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsV2Resource.java:
##########
@@ -125,9 +132,18 @@ public List<FlowConfig> getFilteredFlows(@Context PagingContext context,
@Optional @QueryParam("isRunImmediately") Boolean isRunImmediately,
@Optional @QueryParam("owningGroup") String owningGroup,
@Optional @QueryParam("propertyFilter") String propertyFilter) {
- FlowSpecSearchObject flowSpecSearchObject = new FlowSpecSearchObject(null, flowGroup, flowName,
- templateUri, userToProxy, sourceIdentifier, destinationIdentifier, schedule, null,
Review Comment:
Good to add a comment to specify what this check is doing. Also define the behavior if the user specifies one and not the other
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_store/MysqlSpecStore.java:
##########
@@ -138,7 +139,9 @@ protected SqlStatements createSqlStatements() {
/** Support search, unlike base class (presumably via a {@link org.apache.gobblin.runtime.api.FlowSpecSearchObject}). */
@Override
public Collection<Spec> getSpecsImpl(SpecSearchObject specSearchObject) throws IOException {
- return withPreparedStatement(specSearchObject.augmentBaseGetStatement(this.sqlStatements.getStatementBase), statement -> {
Review Comment:
Is this necessary if we just trust that null (-1) start and count values wouldn't add themselves to the statement, so we wouldn't have to do this check since it would just be a sql statement without the OFFSET and LIMIT?
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/FlowSpecSearchObject.java:
##########
@@ -191,5 +202,12 @@ public void completePreparedStatement(PreparedStatement statement)
if (this.getOwningGroup() != null) {
statement.setString(++i, this.getOwningGroup());
}
+
+ if (this.getCount() != 0) {
Review Comment:
If you define the null value here to be -1 which I see above, your boolean check should represent that value.
Issue Time Tracking
-------------------
Worklog Id: (was: 799048)
Remaining Estimate: 0h
Time Spent: 10m
> Paginate responses from get API on GaaS server side
> ---------------------------------------------------
>
> Key: GOBBLIN-1675
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1675
> Project: Apache Gobblin
> Issue Type: New Feature
> Reporter: Andy Jiang
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)