Skip to content

Commit e06d7be

Browse files
authored
[#130] rename SinkType / SourceType to Input.TypeClassName & Output.TypeClassName (#133)
* rename SinkType / SourceType to Input.TypeClassName & Output.TypeClassName * proxy * add typeClassName in user-config and custom-runtime-options * fix ci
1 parent e623816 commit e06d7be

34 files changed

Lines changed: 209 additions & 290 deletions

.ci/clusters/compute_v1alpha1_function.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ metadata:
55
namespace: default
66
spec:
77
className: org.apache.pulsar.functions.api.examples.ExclamationFunction
8-
sourceType: java.lang.String
9-
sinkType: java.lang.String
108
forwardSourceMessageProperty: true
119
MaxPendingAsyncRequests: 1000
1210
replicas: 1
@@ -15,8 +13,10 @@ spec:
1513
input:
1614
topics:
1715
- persistent://public/default/source-topic1
16+
typeClassName: java.lang.String
1817
output:
1918
topic: persistent://public/default/sink-topic
19+
typeClassName: java.lang.String
2020
resources:
2121
requests:
2222
cpu: "0.1"

.ci/clusters/compute_v1alpha1_go_function.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ metadata:
44
name: go-function-sample
55
namespace: default
66
spec:
7-
sourceType: java.lang.String
8-
sinkType: java.lang.String
97
forwardSourceMessageProperty: true
108
MaxPendingAsyncRequests: 1000
119
replicas: 1

api/v1alpha1/common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ type SecretRef struct {
104104
}
105105

106106
type InputConf struct {
107+
TypeClassName string `json:"typeClassName,omitempty"`
107108
Topics []string `json:"topics,omitempty"`
108109
TopicPattern string `json:"topicPattern,omitempty"`
109110
CustomSerdeSources map[string]string `json:"customSerdeSources,omitempty"`
@@ -122,6 +123,7 @@ type ConsumerConfig struct {
122123
}
123124

124125
type OutputConf struct {
126+
TypeClassName string `json:"typeClassName,omitempty"`
125127
Topic string `json:"topic,omitempty"`
126128
SinkSerdeClassName string `json:"sinkSerdeClassName,omitempty"`
127129
SinkSchemaType string `json:"sinkSchemaType,omitempty"`

api/v1alpha1/function_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ type FunctionSpec struct {
3333
ClassName string `json:"className,omitempty"`
3434
Tenant string `json:"tenant,omitempty"`
3535
ClusterName string `json:"clusterName,omitempty"`
36-
SourceType string `json:"sourceType,omitempty"`
37-
SinkType string `json:"sinkType,omitempty"`
3836
Replicas *int32 `json:"replicas,omitempty"`
3937
MaxReplicas *int32 `json:"maxReplicas,omitempty"` // if provided, turn on autoscaling
4038
Input InputConf `json:"input,omitempty"`

api/v1alpha1/sink_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ type SinkSpec struct {
3333
ClassName string `json:"className,omitempty"`
3434
ClusterName string `json:"clusterName,omitempty"`
3535
Tenant string `json:"tenant,omitempty"`
36-
SourceType string `json:"sourceType,omitempty"`
37-
SinkType string `json:"sinkType,omitempty"`
36+
SinkType string `json:"sinkType,omitempty"` // refer to `--sink-type` as builtin connector
3837
Replicas *int32 `json:"replicas,omitempty"`
3938
MaxReplicas *int32 `json:"maxReplicas,omitempty"` // if provided, turn on autoscaling
4039
Input InputConf `json:"input,omitempty"`

api/v1alpha1/source_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ type SourceSpec struct {
3333
ClassName string `json:"className,omitempty"`
3434
Tenant string `json:"tenant,omitempty"`
3535
ClusterName string `json:"clusterName,omitempty"`
36-
SourceType string `json:"sourceType,omitempty"`
37-
SinkType string `json:"sinkType,omitempty"`
36+
SourceType string `json:"sourceType,omitempty"` // refer to `--source-type` as builtin connector
3837
Replicas *int32 `json:"replicas,omitempty"`
3938
MaxReplicas *int32 `json:"maxReplicas,omitempty"` // if provided, turn on autoscaling
4039
Output OutputConf `json:"output,omitempty"`

config/crd/bases/compute.functionmesh.io_functionmeshes.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ spec:
134134
items:
135135
type: string
136136
type: array
137+
typeClassName:
138+
type: string
137139
type: object
138140
java:
139141
properties:
@@ -212,6 +214,8 @@ spec:
212214
type: string
213215
topic:
214216
type: string
217+
typeClassName:
218+
type: string
215219
type: object
216220
pod:
217221
properties:
@@ -2916,10 +2920,6 @@ spec:
29162920
type: string
29172921
type: object
29182922
type: object
2919-
sinkType:
2920-
type: string
2921-
sourceType:
2922-
type: string
29232923
subscriptionName:
29242924
type: string
29252925
subscriptionPosition:
@@ -3054,6 +3054,8 @@ spec:
30543054
items:
30553055
type: string
30563056
type: array
3057+
typeClassName:
3058+
type: string
30573059
type: object
30583060
java:
30593061
properties:
@@ -5783,8 +5785,6 @@ spec:
57835785
type: object
57845786
sinkType:
57855787
type: string
5786-
sourceType:
5787-
type: string
57885788
subscriptionName:
57895789
type: string
57905790
subscriptionPosition:
@@ -5915,6 +5915,8 @@ spec:
59155915
type: string
59165916
topic:
59175917
type: string
5918+
typeClassName:
5919+
type: string
59185920
type: object
59195921
pod:
59205922
properties:
@@ -8615,8 +8617,6 @@ spec:
86158617
type: string
86168618
type: object
86178619
type: object
8618-
sinkType:
8619-
type: string
86208620
sourceConfig:
86218621
additionalProperties:
86228622
type: string

config/crd/bases/compute.functionmesh.io_functions.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ spec:
134134
items:
135135
type: string
136136
type: array
137+
typeClassName:
138+
type: string
137139
type: object
138140
java:
139141
properties:
@@ -212,6 +214,8 @@ spec:
212214
type: string
213215
topic:
214216
type: string
217+
typeClassName:
218+
type: string
215219
type: object
216220
pod:
217221
properties:
@@ -2916,10 +2920,6 @@ spec:
29162920
type: string
29172921
type: object
29182922
type: object
2919-
sinkType:
2920-
type: string
2921-
sourceType:
2922-
type: string
29232923
subscriptionName:
29242924
type: string
29252925
subscriptionPosition:

config/crd/bases/compute.functionmesh.io_sinks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ spec:
128128
items:
129129
type: string
130130
type: array
131+
typeClassName:
132+
type: string
131133
type: object
132134
java:
133135
properties:
@@ -2857,8 +2859,6 @@ spec:
28572859
type: object
28582860
sinkType:
28592861
type: string
2860-
sourceType:
2861-
type: string
28622862
subscriptionName:
28632863
type: string
28642864
subscriptionPosition:

config/crd/bases/compute.functionmesh.io_sources.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ spec:
124124
type: string
125125
topic:
126126
type: string
127+
typeClassName:
128+
type: string
127129
type: object
128130
pod:
129131
properties:
@@ -2824,8 +2826,6 @@ spec:
28242826
type: string
28252827
type: object
28262828
type: object
2827-
sinkType:
2828-
type: string
28292829
sourceConfig:
28302830
additionalProperties:
28312831
type: string

0 commit comments

Comments
 (0)