m-trieu commented on code in PR #29082:
URL: https://github.com/apache/beam/pull/29082#discussion_r1394981352
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/streaming/ActiveWorkStateTest.java:
##########
@@ -58,26 +57,27 @@ private static ShardedKey shardedKey(String str, long
shardKey) {
return ShardedKey.create(ByteString.copyFromUtf8(str), shardKey);
}
- private static Work emptyWork() {
- return createWork(null);
- }
-
- private static Work createWork(@Nullable Windmill.WorkItem workItem) {
+ private static Work createWork(WorkItem workItem) {
return Work.create(workItem, Instant::now, Collections.emptyList(), unused
-> {});
}
- private static Work expiredWork(Windmill.WorkItem workItem) {
+ private static Work expiredWork(WorkItem workItem) {
return Work.create(workItem, () -> Instant.EPOCH, Collections.emptyList(),
unused -> {});
}
- private static Windmill.WorkItem createWorkItem(long workToken) {
- return Windmill.WorkItem.newBuilder()
+ private static WorkItem createWorkItem(long workToken, long cacheToken) {
+ return WorkItem.newBuilder()
.setKey(ByteString.copyFromUtf8(""))
.setShardingKey(1)
.setWorkToken(workToken)
+ .setCacheToken(cacheToken)
.build();
}
+ private static WorkId workDedupeToken(long workToken, long cacheToken) {
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]