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

修复删除 siddhi 规则报错 #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
import org.apache.flink.streaming.siddhi.schema.SiddhiStreamSchema;
import org.apache.flink.streaming.siddhi.utils.SiddhiExecutionPlanner;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
Copy link
Owner

Choose a reason for hiding this comment

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

Please keep all the list required instead of using *.



public class AddRouteOperator extends AbstractStreamOperator<Tuple2<StreamRoute, Object>>
Expand Down Expand Up @@ -100,10 +95,12 @@ public void processElement(StreamRecord<Tuple2<StreamRoute, Object>> element) th
private void handleMetadataControlEvent(MetadataControlEvent event) throws Exception {
if (event.getDeletedExecutionPlanId() != null) {
for (String executionPlanId : event.getDeletedExecutionPlanId()) {
for (String inputStreamId : inputStreamToExecutionPlans.keySet()) {
for (Iterator<Map.Entry<String, Set<String>>> it = inputStreamToExecutionPlans.entrySet().iterator(); it.hasNext();) {
Map.Entry<String, Set<String>> entry = it.next();
String inputStreamId = entry.getKey();
inputStreamToExecutionPlans.get(inputStreamId).remove(executionPlanId);
if (inputStreamToExecutionPlans.get(inputStreamId).isEmpty()) {
inputStreamToExecutionPlans.remove(inputStreamId);
it.remove();
}
}
executionPlanIdToPartitionKeys.remove(executionPlanId);
Expand Down
39 changes: 22 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,28 +169,19 @@ under the License.
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<skip>true</skip>
</configuration>
<version>2.8.2</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<configuration>
<packaging>jar</packaging>
<generatePom>true</generatePom>
<url>https://clojars.org/repo</url>
<repositoryId>clojars</repositoryId>
<artifactId>${project.artifactId}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
</configuration>
<goals>
<goal>deploy-file</goal>
<goal>deploy</goal>
</goals>
<!-- skip默认deploy插件的执行 -->
<!--<configuration>
<skip>true</skip>
</configuration>-->
</execution>
</executions>
</plugin>
Expand All @@ -208,11 +199,25 @@ under the License.
</plugins>
</build>

<distributionManagement>
<!--<distributionManagement>
&lt;!&ndash;Deploy to clojars repository by: mvn deploy -DskipTests &ndash;&gt;
<repository>
<id>clojars</id>
<name>Clojars repository</name>
<url>https://clojars.org/repo</url>
</repository>
</distributionManagement>-->
<distributionManagement>
<!--Deploy to clojars repository by: mvn deploy -DskipTests -->
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://10.143.132.59:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://10.143.132.59:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>