forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
192 lines (177 loc) · 9.74 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/*
* 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.
*/
import groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
applyJavaNature(
exportJavadoc: false,
classesTriggerCheckerBugs: [
'GroupWithoutRepartition': 'https://github.com/typetools/checker-framework/issues/3791',
],
automaticModuleName: 'org.apache.beam.runners.samza',
)
description = "Apache Beam :: Runners :: Samza"
/*
* We need to rely on manually specifying these evaluationDependsOn to ensure that
* the following projects are evaluated before we evaluate this project. This is because
* we are attempting to reference the "sourceSets.test.output" directly.
*/
evaluationDependsOn(":sdks:java:core")
configurations {
validatesRunner
}
def samza_version = "1.6.0"
dependencies {
implementation library.java.vendored_guava_26_0_jre
implementation project(path: ":sdks:java:core", configuration: "shadow")
implementation project(":runners:core-java")
implementation project(":runners:core-construction-java")
implementation project(":runners:java-fn-execution")
implementation project(":runners:java-job-service")
implementation library.java.jackson_annotations
implementation library.java.slf4j_api
implementation library.java.joda_time
implementation library.java.args4j
implementation library.java.commons_io
implementation library.java.commons_collections
runtimeOnly "org.rocksdb:rocksdbjni:6.15.2"
runtimeOnly "org.scala-lang:scala-library:2.11.8"
implementation "org.apache.samza:samza-api:$samza_version"
implementation "org.apache.samza:samza-core_2.11:$samza_version"
runtimeOnly "org.apache.samza:samza-kafka_2.11:$samza_version"
runtimeOnly "org.apache.samza:samza-kv_2.11:$samza_version"
implementation "org.apache.samza:samza-kv-rocksdb_2.11:$samza_version"
implementation "org.apache.samza:samza-kv-inmemory_2.11:$samza_version"
implementation "org.apache.samza:samza-yarn_2.11:$samza_version"
compileOnly library.java.error_prone_annotations
runtimeOnly "org.apache.kafka:kafka-clients:2.0.1"
implementation library.java.vendored_grpc_1_54_0
implementation project(path: ":model:fn-execution", configuration: "shadow")
implementation project(path: ":model:job-management", configuration: "shadow")
implementation project(path: ":model:pipeline", configuration: "shadow")
implementation project(":sdks:java:fn-execution")
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation project(path: ":runners:core-java", configuration: "testRuntimeMigration")
testImplementation library.java.hamcrest
testImplementation library.java.junit
testImplementation library.java.mockito_core
testImplementation library.java.jackson_dataformat_yaml
testImplementation library.java.google_code_gson
validatesRunner project(path: ":sdks:java:core", configuration: "shadowTest")
validatesRunner project(path: ":runners:core-java", configuration: "testRuntimeMigration")
validatesRunner project(project.path)
}
configurations.all {
exclude group: "org.slf4j", module: "slf4j-jdk14"
}
def sickbayTests = [
// TODO(https://github.com/apache/beam/issues/21033)
'org.apache.beam.sdk.transforms.GroupIntoBatchesTest.testInGlobalWindowBatchSizeByteSizeFn',
'org.apache.beam.sdk.transforms.GroupIntoBatchesTest.testInStreamingMode',
'org.apache.beam.sdk.transforms.GroupIntoBatchesTest.testWithShardedKeyInGlobalWindow',
// TODO(https://github.com/apache/beam/issues/21036)
'org.apache.beam.sdk.transforms.MapElementsTest.testMapSimpleFunction',
// TODO(https://github.com/apache/beam/issues/21035)
'org.apache.beam.sdk.transforms.ViewTest.testEmptySingletonSideInput',
'org.apache.beam.sdk.transforms.ViewTest.testNonSingletonSideInput',
// TODO(https://github.com/apache/beam/issues/21037)
'org.apache.beam.sdk.transforms.WithTimestampsTest.withTimestampsBackwardsInTimeShouldThrow',
'org.apache.beam.sdk.transforms.WithTimestampsTest.withTimestampsWithNullTimestampShouldThrow',
// TODO(https://github.com/apache/beam/issues/21039)
'org.apache.beam.sdk.io.FileIOTest*',
// TODO(https://github.com/apache/beam/issues/21038)
'org.apache.beam.sdk.io.AvroIOTest*',
// TODO(https://github.com/apache/beam/issues/21040)
'org.apache.beam.sdk.PipelineTest.testEmptyPipeline',
// TODO(https://github.com/apache/beam/issues/21041)
'org.apache.beam.sdk.coders.PCollectionCustomCoderTest.testEncodingNPException',
'org.apache.beam.sdk.coders.PCollectionCustomCoderTest.testEncodingIOException',
'org.apache.beam.sdk.coders.PCollectionCustomCoderTest.testDecodingNPException',
'org.apache.beam.sdk.coders.PCollectionCustomCoderTest.testDecodingIOException',
// https://github.com/apache/beam/issues/19344
'org.apache.beam.sdk.io.BoundedReadFromUnboundedSourceTest.testTimeBound',
]
tasks.register("validatesRunner", Test) {
group = "Verification"
description "Validates Samza runner"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=TestSamzaRunner",
])
classpath = configurations.validatesRunner
testClassesDirs = files(project(":sdks:java:core").sourceSets.test.output.classesDirs)
useJUnit {
includeCategories 'org.apache.beam.sdk.testing.NeedsRunner'
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
// Should be run only in a properly configured SDK harness environment
excludeCategories 'org.apache.beam.sdk.testing.UsesSdkHarnessEnvironment'
excludeCategories 'org.apache.beam.sdk.testing.UsesUnboundedSplittableParDo'
excludeCategories 'org.apache.beam.sdk.testing.UsesSchema'
excludeCategories 'org.apache.beam.sdk.testing.LargeKeys$Above100MB'
excludeCategories 'org.apache.beam.sdk.testing.UsesAttemptedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesCommittedMetrics'
excludeCategories 'org.apache.beam.sdk.testing.UsesTestStreamWithProcessingTime'
excludeCategories 'org.apache.beam.sdk.testing.UsesMetricsPusher'
excludeCategories 'org.apache.beam.sdk.testing.UsesParDoLifecycle'
excludeCategories 'org.apache.beam.sdk.testing.UsesProcessingTimeTimers'
excludeCategories 'org.apache.beam.sdk.testing.UsesStrictTimerOrdering'
excludeCategories 'org.apache.beam.sdk.testing.UsesOnWindowExpiration'
excludeCategories 'org.apache.beam.sdk.testing.UsesOrderedListState'
excludeCategories 'org.apache.beam.sdk.testing.UsesMultimapState'
excludeCategories 'org.apache.beam.sdk.testing.UsesBundleFinalizer'
excludeCategories 'org.apache.beam.sdk.testing.UsesLoopingTimer'
}
filter {
for (String test : sickbayTests) {
excludeTestsMatching test
}
// TODO(BEAM-10025)
excludeTestsMatching 'org.apache.beam.sdk.transforms.ParDoTest$TimerTests.testOutputTimestampDefaultUnbounded'
// TODO(https://github.com/apache/beam/issues/20703)
excludeTestsMatching 'org.apache.beam.sdk.transforms.ParDoTest$TimerTests.testOutputTimestamp'
// TODO(https://github.com/apache/beam/issues/20703)
excludeTestsMatching 'org.apache.beam.sdk.transforms.ParDoTest$TimerTests.testRelativeTimerWithOutputTimestamp'
// TODO(https://github.com/apache/beam/issues/20847)
excludeTestsMatching 'org.apache.beam.sdk.testing.TestStreamTest.testFirstElementLate'
// TODO(https://github.com/apache/beam/issues/20846)
excludeTestsMatching 'org.apache.beam.sdk.testing.TestStreamTest.testLateDataAccumulating'
// These tests fail since there is no support for side inputs in Samza's unbounded splittable DoFn integration
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testWindowedSideInputWithCheckpointsUnbounded'
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testSideInputUnbounded'
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testWindowedSideInputUnbounded'
// These tests produce the output but either the pipeline doesn't shutdown or PAssert fails
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testAdditionalOutputUnbounded'
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testPairWithIndexBasicUnbounded'
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testPairWithIndexWindowedTimestampedUnbounded'
excludeTestsMatching 'org.apache.beam.sdk.transforms.SplittableDoFnTest.testOutputAfterCheckpointUnbounded'
}
}
tasks.register("validatesRunnerSickbay", Test) {
group = "Verification"
description "Validates Samza runner (Sickbay Tests)"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--runner=TestSamzaRunner",
])
classpath = configurations.validatesRunner
testClassesDirs = files(project(":sdks:java:core").sourceSets.test.output.classesDirs)
filter {
for (String test : sickbayTests) {
includeTestsMatching test
}
}
}
// Generates :runners:samza:runQuickstartJavaSamza
createJavaExamplesArchetypeValidationTask(type: 'Quickstart', runner:'Samza')