-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add include/exclude filter to S3PutListenerBoundary
update scenarios to test filtering
- Loading branch information
Showing
18 changed files
with
272 additions
and
76 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
clusterless-model/src/main/java/clusterless/model/deploy/partial/PathFilter.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,48 @@ | ||
/* | ||
* Copyright (c) 2023 Chris K Wensel <[email protected]>. All Rights Reserved. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package clusterless.model.deploy.partial; | ||
|
||
import clusterless.model.Struct; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class PathFilter implements Struct { | ||
List<String> includes = new ArrayList<>(); | ||
List<String> excludes = new ArrayList<>(); | ||
char pathSeparator = '/'; | ||
boolean ignoreCase = false; | ||
|
||
public List<String> includes() { | ||
return includes; | ||
} | ||
|
||
public List<String> excludes() { | ||
return excludes; | ||
} | ||
|
||
public char pathSeparator() { | ||
return pathSeparator; | ||
} | ||
|
||
public boolean ignoreCase() { | ||
return ignoreCase; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("Filter{"); | ||
sb.append("includes=").append(includes); | ||
sb.append(", excludes=").append(excludes); | ||
sb.append(", pathSeparator=").append(pathSeparator); | ||
sb.append(", ignoreCase=").append(ignoreCase); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
clusterless-scenario/src/main/cls/scenarios/s3-frequent-filter-boundary/s3-copy-arc.jsonnet
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,62 @@ | ||
local stage = std.extVar('scenario.stage'); | ||
local account = std.extVar('scenario.aws.account'); | ||
local region = std.extVar('scenario.aws.region'); | ||
local bucketName = 'clusterless-frequent-filter-boundary-test-' + account + '-' + region; | ||
local bucketPrefix = 's3://' + bucketName; | ||
local unit = 'Twelfths'; | ||
|
||
{ | ||
project: { | ||
name: 'S3FreqFiltBndy', | ||
version: '20230101-00', | ||
}, | ||
placement: { | ||
stage: stage, | ||
provider: 'aws', | ||
account: account, | ||
region: region, | ||
}, | ||
resources: [ | ||
{ | ||
type: 'aws:core:s3Bucket', | ||
name: 'bucket', | ||
bucketName: bucketName, | ||
}, | ||
], | ||
boundaries: [ | ||
{ | ||
type: 'aws:core:s3PutListenerBoundary', | ||
name: 'FreqPutListener', | ||
eventArrival: 'frequent', | ||
dataset: { | ||
name: 'ingress-frequent-boundary', | ||
version: '20220101', | ||
pathURI: bucketPrefix + '/ingress/', | ||
}, | ||
lotUnit: unit, | ||
filter: { | ||
excludes: ['**/_*'], | ||
}, | ||
}, | ||
], | ||
arcs: [ | ||
{ | ||
type: 'aws:core:s3CopyArc', | ||
name: 'copyA', | ||
sources: { | ||
main: { | ||
name: 'ingress-frequent-boundary', | ||
version: '20220101', | ||
pathURI: bucketPrefix + '/ingress/', | ||
}, | ||
}, | ||
sinks: { | ||
main: { | ||
name: 'copy-a-frequent-boundary', | ||
version: '20230101', | ||
pathURI: bucketPrefix + '/copy-a/', | ||
}, | ||
}, | ||
}, | ||
], | ||
} |
34 changes: 34 additions & 0 deletions
34
clusterless-scenario/src/main/cls/scenarios/s3-frequent-filter-boundary/scenario.jsonnet
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,34 @@ | ||
local project = import 's3-copy-arc.jsonnet'; | ||
|
||
{ | ||
name: 's3-frequent-filter-boundary', | ||
description: 'copy workload with frequent arrivals', | ||
projectFiles: [ | ||
's3-copy-arc.json', | ||
], | ||
placements: [ | ||
project.placement, | ||
], | ||
ingressStores: [ | ||
{ | ||
region: project.placement.region, | ||
path: project.arcs[0].sources.main.pathURI, | ||
uploadDelaySec: 15, | ||
objectCount: 60/15 * 5 * 3, | ||
}, | ||
{ | ||
region: project.placement.region, | ||
path: project.arcs[0].sources.main.pathURI, | ||
uploadDelaySec: 15, | ||
objectCount: 60/15 * 5 * 3, | ||
objectName: '_SUCCESS-%04d-%d.txt', | ||
}, | ||
], | ||
watchedStores: [ | ||
{ | ||
region: project.placement.region, | ||
path: project.arcs[0].sinks.main.pathURI, | ||
objectCount: 60/15 * 5 * 3, | ||
}, | ||
], | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ls/scenarios/s3-frequent/scenario.jsonnet → .../s3-frequent-filter-copy/scenario.jsonnet
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
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
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
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
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
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
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
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
Oops, something went wrong.