[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16331224#comment-16331224 ] ASF GitHub Bot commented on RYA-442: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/265 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/670/ > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16331221#comment-16331221 ] ASF GitHub Bot commented on RYA-442: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/265 > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16330786#comment-16330786 ] ASF GitHub Bot commented on RYA-442: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/265#discussion_r162113248 --- Diff: extras/rya.streams/api/src/main/java/org/apache/rya/streams/api/interactor/defaults/DefaultStartQuery.java --- @@ -0,0 +1,54 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.rya.streams.api.interactor.defaults; + +import static java.util.Objects.requireNonNull; + +import java.util.UUID; + +import org.apache.rya.streams.api.exception.RyaStreamsException; +import org.apache.rya.streams.api.interactor.StartQuery; +import org.apache.rya.streams.api.queries.QueryRepository; + +import edu.umd.cs.findbugs.annotations.DefaultAnnotation; +import edu.umd.cs.findbugs.annotations.NonNull; + +/** + * TODO --- End diff -- doc > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329626#comment-16329626 ] ASF GitHub Bot commented on RYA-442: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/265 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/669/ > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329441#comment-16329441 ] ASF GitHub Bot commented on RYA-442: Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/265#discussion_r162173884 --- Diff: extras/rya.streams/api/src/main/java/org/apache/rya/streams/api/queries/QueryChange.java --- @@ -37,9 +37,11 @@ @DefaultAnnotation(NonNull.class) public final class QueryChange implements Serializable { private static final long serialVersionUID = 1L; + private final UUID queryId; private final ChangeType changeType; private final Optional sparql; +private final Optional isActive; --- End diff -- Null objects are ambiguous and prone to NPEs, so I avoid using them. > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329439#comment-16329439 ] ASF GitHub Bot commented on RYA-442: Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/265#discussion_r162173679 --- Diff: extras/rya.streams/api/src/main/java/org/apache/rya/streams/api/entity/StreamsQuery.java --- @@ -60,17 +63,25 @@ public String getSparql() { return sparql; } +/** + * @return {@code true} if Rya Streams should process this query; otherwise {@code false}. + */ +public boolean isActive() { +return isActive; +} + @Override public int hashCode() { -return Objects.hash(queryId, sparql); +return Objects.hash(queryId, sparql, isActive); } @Override public boolean equals(final Object o) { if(o instanceof StreamsQuery) { final StreamsQuery other = (StreamsQuery) o; return Objects.equals(queryId, other.queryId) && --- End diff -- Why? This requires less object construction, so I'm not going to do that. > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329281#comment-16329281 ] ASF GitHub Bot commented on RYA-442: Github user ejwhite922 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/265#discussion_r162154091 --- Diff: extras/rya.streams/api/src/main/java/org/apache/rya/streams/api/entity/StreamsQuery.java --- @@ -60,17 +63,25 @@ public String getSparql() { return sparql; } +/** + * @return {@code true} if Rya Streams should process this query; otherwise {@code false}. + */ +public boolean isActive() { +return isActive; +} + @Override public int hashCode() { -return Objects.hash(queryId, sparql); +return Objects.hash(queryId, sparql, isActive); } @Override public boolean equals(final Object o) { if(o instanceof StreamsQuery) { final StreamsQuery other = (StreamsQuery) o; return Objects.equals(queryId, other.queryId) && --- End diff -- Use EqualsBuilder > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329282#comment-16329282 ] ASF GitHub Bot commented on RYA-442: Github user ejwhite922 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/265#discussion_r162155859 --- Diff: extras/rya.streams/api/src/main/java/org/apache/rya/streams/api/queries/QueryChange.java --- @@ -37,9 +37,11 @@ @DefaultAnnotation(NonNull.class) public final class QueryChange implements Serializable { private static final long serialVersionUID = 1L; + private final UUID queryId; private final ChangeType changeType; private final Optional sparql; +private final Optional isActive; --- End diff -- Why can't this just be a primitive boolean so a null value isn't possible? > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16328048#comment-16328048 ] ASF GitHub Bot commented on RYA-442: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/265 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/667/ > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16328001#comment-16328001 ] ASF GitHub Bot commented on RYA-442: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/265 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/665/ > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16328002#comment-16328002 ] ASF GitHub Bot commented on RYA-442: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/265 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/666/ > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RYA-442) KafkaStreams: Implement the StartQuery and StopQuery interactors.
[ https://issues.apache.org/jira/browse/RYA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16327919#comment-16327919 ] ASF GitHub Bot commented on RYA-442: GitHub user kchilton2 opened a pull request: https://github.com/apache/incubator-rya/pull/265 RYA-442 Implementing the Start and Stop Query interactors. ## Description Implemented DefaultStartQuery and DefaultStopQuery interactors. The InMemoryQueryRepository was also updated to refresh its cache if the underlying QueryChangeLog has been updated. ### Tests Updated and added tests. ### Links https://issues.apache.org/jira/browse/RYA-442 You can merge this pull request into a Git repository by running: $ git pull https://github.com/kchilton2/incubator-rya RYA-442 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/265.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #265 commit f21986abf1bf75bd9b6a0ab440acb2b71ddfddf3 Author: kchilton2Date: 2018-01-12T19:48:55Z RYA-442 Implementing the Start and Stop Query interactors. > KafkaStreams: Implement the StartQuery and StopQuery interactors. > - > > Key: RYA-442 > URL: https://issues.apache.org/jira/browse/RYA-442 > Project: Rya > Issue Type: Task >Reporter: Kevin Chilton >Assignee: Kevin Chilton >Priority: Major > > We need implementations of the StartQuery and StopQuery interfaces that > interact with the QueryRepository to update the isActive state of a > StreamsQuery in Rya Streams. -- This message was sent by Atlassian JIRA (v7.6.3#76005)