yunqingmoswu commented on code in PR #4396:
URL: https://github.com/apache/incubator-inlong/pull/4396#discussion_r882580955
##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SourceType.java:
##########
@@ -42,6 +43,7 @@ public enum SourceType {
public static final String SOURCE_KAFKA = "KAFKA";
public static final String SOURCE_PULSAR = "PULSAR";
public static final String SOURCE_POSTGRES = "POSTGRES";
+ public static final String SOURCE_ORACLE = "oracle";
Review Comment:
oracle->ORACLE?
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/ExtractNodeUtils.java:
##########
@@ -280,4 +284,44 @@ public static PostgresExtractNode
createExtractNode(PostgresSourceResponse postg
postgresSourceResponse.getSchema(),
postgresSourceResponse.getPort(),
postgresSourceResponse.getDecodingPluginName());
}
+
+ /**
+ * Create oracleExtractNode based on OracleSourceResponse
+ *
+ * @param oracleSourceResponse oracle source response info
+ * @return oracle extract node info
+ */
+ public static OracleExtractNode createExtractNode(OracleSourceResponse
oracleSourceResponse) {
+ final String id = oracleSourceResponse.getSourceName();
+ final String name = oracleSourceResponse.getSourceName();
+ final String database = oracleSourceResponse.getDatabase();
+ final String schemaname = oracleSourceResponse.getSchemaName();
+ final String tablename = oracleSourceResponse.getTableName();
+ final String primaryKey = oracleSourceResponse.getPrimaryKey();
+ final String hostName = oracleSourceResponse.getHostname();
+ final String userName = oracleSourceResponse.getUsername();
+ final String password = oracleSourceResponse.getPassword();
+ final Integer port = oracleSourceResponse.getPort();
+
+ final List<InlongStreamFieldInfo> streamFieldInfos =
oracleSourceResponse.getFieldList();
+ final List<FieldInfo> fieldInfos = streamFieldInfos.stream()
+ .map(streamFieldInfo ->
FieldInfoUtils.parseStreamFieldInfo(streamFieldInfo, name))
+ .collect(Collectors.toList());
+ Map<String, String> properties = Maps.newHashMap();
+ return new OracleExtractNode(id,
+ name,
+ fieldInfos,
+ null,
+ properties,
+ primaryKey,
+ hostName,
+ userName,
+ password,
+ database,
+ schemaname,
+ tablename,
+ port,
+ null
Review Comment:
Make sure it is null all right?
--
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]