-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13bd2d6
commit c5edc28
Showing
7 changed files
with
206 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
pattern-distribution-component/pattern-distribution-component-sentinel/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>pattern-distribution-component</artifactId> | ||
<groupId>com.buildupchao</groupId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.buildupchao</groupId> | ||
<artifactId>pattern-distribution-component-sentinel</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.alibaba.csp</groupId> | ||
<artifactId>sentinel-core</artifactId> | ||
<version>1.4.0</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
...onent-sentinel/src/main/java/com/pattern/distribution/component/sentinel/SentinelApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.pattern.distribution.component.sentinel; | ||
|
||
/** | ||
* @author buildupchao | ||
* @date 2019/12/29 10:45 | ||
* @since JDK 1.8 | ||
*/ | ||
public class SentinelApp { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...or-syntax/src/main/java/com/pattern/tutor/syntax/database/util/FilterUselessTaskInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.pattern.tutor.syntax.database.util; | ||
|
||
import com.google.common.collect.Sets; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import java.io.File; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
import java.util.HashSet; | ||
import java.util.LinkedHashSet; | ||
import java.util.List; | ||
|
||
@Slf4j | ||
public class FilterUselessTaskInfo { | ||
|
||
private volatile LinkedHashSet<String> data = new LinkedHashSet<>(); | ||
private static final String OUTPUT = "/src/main/resources/database/ids_result"; | ||
|
||
public static void main(String[] args) throws Exception { | ||
String base = System.getProperty("user.dir") + "/pattern-tutor/pattern-tutor-syntax"; | ||
List<String> filter = Files.readAllLines(Paths.get(base, "/src/main/resources/database/ids2")); | ||
HashSet<String> filterValues = Sets.newHashSet(filter); | ||
List<String> originDatas = Files.readAllLines(Paths.get(base, "/src/main/resources/database/ids1")); | ||
|
||
FileOutputStream out = new FileOutputStream(new File(base + OUTPUT)); | ||
originDatas.stream().map(v -> { | ||
String taskIdStr = v.split("_")[3]; | ||
System.out.println(taskIdStr + " -> " + filterValues.contains(taskIdStr)); | ||
if (!filterValues.contains(taskIdStr)) { | ||
return "delete /escheduler/tasks_queue/" + v; | ||
} | ||
return null; | ||
}).filter(StringUtils::isNotBlank) | ||
.forEach(v -> { | ||
try { | ||
out.write((v + "\n").getBytes()); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
}); | ||
System.out.println("DONE______________________"); | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
pattern-tutor/pattern-tutor-syntax/src/main/resources/database/ids1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
2_325709_2_653456_169022094 | ||
2_325655_2_653322_169022094 | ||
2_325757_2_653642_169022094 | ||
2_325658_2_653332_169022094 | ||
2_325661_2_653344_169022094 | ||
2_325867_2_653882_169023497 | ||
2_325689_2_653419_169022094 | ||
2_325689_2_653420_169022094 | ||
2_325655_2_653323_169022094 | ||
2_325864_2_653879_169023497 | ||
2_325627_2_653222_169022094 | ||
2_325735_2_653546_169022094 | ||
2_325872_2_653887_169022094 | ||
2_325757_2_653641_169022094 | ||
2_325869_2_653884_169022094 | ||
2_325730_2_653533_169022094 | ||
2_325868_2_653883_169022094 | ||
2_325660_2_653341_169022094 | ||
2_325792_2_653781_169022094 | ||
2_325714_2_653467_169022094 | ||
2_325852_2_653867_-1 | ||
2_325870_2_653885_169023497 | ||
2_325658_2_653337_169022094 | ||
2_325751_2_653621_169022094 | ||
2_325655_2_653324_169022094 | ||
2_325653_2_653319_169022094 | ||
2_325688_2_653417_169022094 | ||
2_325658_2_653334_169022094 | ||
2_325695_2_653432_169022094 | ||
2_325658_2_653331_169022094 | ||
2_325730_2_653531_169022094 | ||
2_325677_2_653404_169022094 | ||
2_325757_2_653645_169022094 | ||
2_325658_2_653335_169022094 | ||
2_325655_2_653326_169022094 | ||
2_325863_2_653878_169023497 | ||
2_325660_2_653342_169022094 | ||
2_325757_2_653644_169022094 | ||
2_325655_2_653327_169022094 | ||
2_325670_2_653396_169022094 | ||
2_325659_2_653339_169022094 | ||
2_325726_2_653527_169022094 | ||
2_325866_2_653881_169023497 | ||
2_325729_2_653530_169022094 | ||
2_325702_2_653445_169022094 | ||
2_325658_2_653336_169022094 | ||
2_325697_2_653436_169022094 | ||
2_325663_2_653346_169022094 | ||
2_325837_2_653849_169022094 | ||
2_325658_2_653333_169022094 | ||
2_325801_2_653790_169022094 | ||
2_325757_2_653643_169022094 | ||
2_325641_2_653252_169022094 | ||
2_325837_2_653850_169022094 | ||
2_325730_2_653532_169022094 | ||
2_325658_2_653330_169022094 | ||
2_325659_2_653340_169022094 | ||
2_325743_2_653591_169022094 | ||
2_325655_2_653325_169022094 | ||
2_325658_2_653338_169022094 | ||
2_325865_2_653880_169023497 | ||
2_325742_2_653589_169022094 | ||
2_325871_2_653886_169023497 | ||
2_325650_2_653312_169022094 |
50 changes: 50 additions & 0 deletions
50
pattern-tutor/pattern-tutor-syntax/src/main/resources/database/ids2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
653319 | ||
653322 | ||
653323 | ||
653324 | ||
653325 | ||
653326 | ||
653327 | ||
653330 | ||
653331 | ||
653332 | ||
653333 | ||
653334 | ||
653335 | ||
653336 | ||
653337 | ||
653338 | ||
653339 | ||
653340 | ||
653341 | ||
653342 | ||
653344 | ||
653346 | ||
653396 | ||
653419 | ||
653420 | ||
653530 | ||
653531 | ||
653532 | ||
653533 | ||
653591 | ||
653621 | ||
653641 | ||
653642 | ||
653643 | ||
653644 | ||
653645 | ||
653781 | ||
653790 | ||
653849 | ||
653850 | ||
653878 | ||
653879 | ||
653880 | ||
653881 | ||
653882 | ||
653883 | ||
653884 | ||
653885 | ||
653886 | ||
653887 |
14 changes: 14 additions & 0 deletions
14
pattern-tutor/pattern-tutor-syntax/src/main/resources/database/ids_result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
delete /escheduler/tasks_queue/2_325709_2_653456_169022094 | ||
delete /escheduler/tasks_queue/2_325627_2_653222_169022094 | ||
delete /escheduler/tasks_queue/2_325735_2_653546_169022094 | ||
delete /escheduler/tasks_queue/2_325714_2_653467_169022094 | ||
delete /escheduler/tasks_queue/2_325852_2_653867_-1 | ||
delete /escheduler/tasks_queue/2_325688_2_653417_169022094 | ||
delete /escheduler/tasks_queue/2_325695_2_653432_169022094 | ||
delete /escheduler/tasks_queue/2_325677_2_653404_169022094 | ||
delete /escheduler/tasks_queue/2_325726_2_653527_169022094 | ||
delete /escheduler/tasks_queue/2_325702_2_653445_169022094 | ||
delete /escheduler/tasks_queue/2_325697_2_653436_169022094 | ||
delete /escheduler/tasks_queue/2_325641_2_653252_169022094 | ||
delete /escheduler/tasks_queue/2_325742_2_653589_169022094 | ||
delete /escheduler/tasks_queue/2_325650_2_653312_169022094 |