Skip to content

Commit f5818da

Browse files
authored
replace thrift entities with internal entities (#1021)
* move com.uber.cadence.entities to com.uber.cadence * remove thrift entities * change all imports * replace IWorkflowService with IWorkflowServiceV4 * fix unit test except for replayer test * fix replayer test
1 parent 3609827 commit f5818da

File tree

614 files changed

+5608
-24888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

614 files changed

+5608
-24888
lines changed

build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ task updateDlsSubmodule(type: Exec) {
130130
commandLine 'git', 'submodule', 'update'
131131
}
132132

133-
compileThrift {
134-
dependsOn updateDlsSubmodule
135-
verbose true
136-
sourceItems "${projectDir}/src/main/idls/thrift/cadence.thrift","${projectDir}/src/main/idls/thrift/shared.thrift","${projectDir}/src/main/idls/thrift/shadower.thrift"
137-
}
138-
139133
sourceSets {
140134
main {
141135
proto {

scripts/v4_entity_generator/main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ package main
33
import "fmt"
44

55
func main() {
6-
if err := NewGenerator().Generate("../../src/main/idls/thrift/shared.thrift", "../../src/gen/java", "com.uber.cadence.entities"); err != nil {
7-
panic(fmt.Sprintf("failed to generate: %v", err))
8-
}
6+
if err := NewGenerator().Generate("../../src/main/idls/thrift/shared.thrift", "../../src/gen/java", "com.uber.cadence"); err != nil {
7+
panic(fmt.Sprintf("failed to generate: %v", err))
8+
}
9+
if err := NewGenerator().Generate("../../src/main/idls/thrift/shadower.thrift", "../../src/gen/java", "com.uber.cadence.shadower"); err != nil {
10+
panic(fmt.Sprintf("failed to generate: %v", err))
11+
}
912
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Getter;
5+
import lombok.Setter;
6+
import lombok.experimental.Accessors;
7+
8+
@Getter
9+
@Setter
10+
@Accessors(chain = true)
11+
public class AccessDeniedError extends BaseError {
12+
13+
public AccessDeniedError() {
14+
super();
15+
}
16+
17+
public AccessDeniedError(String message, Throwable cause) {
18+
super(message, cause);
19+
}
20+
21+
public AccessDeniedError(Throwable cause) {
22+
super(cause);
23+
}
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityLocalDispatchInfo {
10+
private String activityId;
11+
private long scheduledTimestamp;
12+
private long startedTimestamp;
13+
private long scheduledTimestampOfThisAttempt;
14+
private byte[] taskToken;
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskCancelRequestedEventAttributes {
10+
private String activityId;
11+
private long decisionTaskCompletedEventId;
12+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskCanceledEventAttributes {
10+
private byte[] details;
11+
private long latestCancelRequestedEventId;
12+
private long scheduledEventId;
13+
private long startedEventId;
14+
private String identity;
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskCompletedEventAttributes {
10+
private byte[] result;
11+
private long scheduledEventId;
12+
private long startedEventId;
13+
private String identity;
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskFailedEventAttributes {
10+
private String reason;
11+
private byte[] details;
12+
private long scheduledEventId;
13+
private long startedEventId;
14+
private String identity;
15+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskScheduledEventAttributes {
10+
private String activityId;
11+
private ActivityType activityType;
12+
private String domain;
13+
private TaskList taskList;
14+
private byte[] input;
15+
private int scheduleToCloseTimeoutSeconds;
16+
private int scheduleToStartTimeoutSeconds;
17+
private int startToCloseTimeoutSeconds;
18+
private int heartbeatTimeoutSeconds;
19+
private long decisionTaskCompletedEventId;
20+
private RetryPolicy retryPolicy;
21+
private Header header;
22+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.uber.cadence;
2+
3+
import java.util.*;
4+
import lombok.Data;
5+
import lombok.experimental.Accessors;
6+
7+
@Data
8+
@Accessors(chain = true)
9+
public class ActivityTaskStartedEventAttributes {
10+
private long scheduledEventId;
11+
private String identity;
12+
private String requestId;
13+
private int attempt;
14+
private String lastFailureReason;
15+
private byte[] lastFailureDetails;
16+
}

0 commit comments

Comments
 (0)