Skip to content

Commit f183b9f

Browse files
authored
feat: 算子上传适配 (#216)
1 parent 6a1eb85 commit f183b9f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

backend/services/operator-market-service/src/main/java/com/datamate/operator/domain/contants/OperatorConstant.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ public class OperatorConstant {
3232

3333
public static String CATEGORY_PREDEFINED_ID = "96a3b07a-3439-4557-a835-525faad60ca3";
3434

35+
public static String CATEGORY_DATAMATE_ID = "431e7798-5426-4e1a-aae6-b9905a836b34";
36+
3537
public static String CATEGORY_DATA_JUICER_ID = "79b385b4-fde8-4617-bcba-02a176938996";
3638

39+
public static String CATEGORY_OTHER_VENDOR_ID = "f00eaa3e-96c1-4de4-96cd-9848ef5429ec";
40+
3741
public static Map<String, String> CATEGORY_MAP = new HashMap<>();
3842

3943
static {
@@ -44,5 +48,7 @@ public class OperatorConstant {
4448
CATEGORY_MAP.put("audio", CATEGORY_AUDIO_ID);
4549
CATEGORY_MAP.put("video", CATEGORY_VIDEO_ID);
4650
CATEGORY_MAP.put("all", CATEGORY_ALL_ID);
51+
CATEGORY_MAP.put("datamate", CATEGORY_DATAMATE_ID);
52+
CATEGORY_MAP.put("data-juicer", CATEGORY_DATA_JUICER_ID);
4753
}
4854
}

backend/services/operator-market-service/src/main/java/com/datamate/operator/infrastructure/parser/AbstractParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ protected OperatorDto parseYaml(InputStream yamlContent) {
3636
List<String> categories = new ArrayList<>();
3737
categories.add(OperatorConstant.CATEGORY_MAP.get(toLowerCaseIfNotNull(content.get("language"))));
3838
categories.add(OperatorConstant.CATEGORY_MAP.get(toLowerCaseIfNotNull(content.get("modal"))));
39+
categories.add(OperatorConstant.CATEGORY_MAP.getOrDefault(toLowerCaseIfNotNull(content.get("vendor")),
40+
OperatorConstant.CATEGORY_OTHER_VENDOR_ID));
3941
categories.add(OperatorConstant.CATEGORY_CUSTOMIZED_ID);
4042
operator.setCategories(categories);
4143
return operator;
42-
};
44+
}
4345

4446
/**
4547
* 从压缩包内读取指定路径的 yaml 文件并解析为指定类型

deployment/helm/datamate/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ backend-python:
119119
mountPath: /var/log/datamate
120120

121121
gateway:
122-
service:
123-
type: NodePort
124-
nodePort: 30000
125122
volumes:
126123
- *logVolume
127124
volumeMounts:

0 commit comments

Comments
 (0)