healchow commented on code in PR #4396:
URL: https://github.com/apache/incubator-inlong/pull/4396#discussion_r885205270


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/ExtractNodeUtils.java:
##########
@@ -283,4 +288,56 @@ public static PostgresExtractNode 
createExtractNode(PostgresSource postgresSourc
                 postgresSource.getSchema(), postgresSource.getPort(),
                 postgresSource.getDecodingPluginName());
     }
+
+    /**
+     * Create oracleExtractNode based on OracleSourceResponse
+     *
+     * @param oracleSource oracle source response info
+     * @return oracle extract node info
+     */
+    public static OracleExtractNode createExtractNode(OracleSource 
oracleSource) {
+        final String id = oracleSource.getSourceName();
+        final String name = oracleSource.getSourceName();
+        final String database = oracleSource.getDatabase();
+        final String schemaname = oracleSource.getSchemaName();
+        final String tablename = oracleSource.getTableName();
+        final String primaryKey = oracleSource.getPrimaryKey();
+        final String hostName = oracleSource.getHostname();
+        final String userName = oracleSource.getUsername();
+        final String password = oracleSource.getPassword();
+        final Integer port = oracleSource.getPort();
+        final String scanstartupMode = oracleSource.getScanStartupMode();

Review Comment:
   Please use the lower camel format for variables.



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/ExtractNodeUtils.java:
##########
@@ -283,4 +288,56 @@ public static PostgresExtractNode 
createExtractNode(PostgresSource postgresSourc
                 postgresSource.getSchema(), postgresSource.getPort(),
                 postgresSource.getDecodingPluginName());
     }
+
+    /**
+     * Create oracleExtractNode based on OracleSourceResponse
+     *
+     * @param oracleSource oracle source response info
+     * @return oracle extract node info
+     */
+    public static OracleExtractNode createExtractNode(OracleSource 
oracleSource) {
+        final String id = oracleSource.getSourceName();
+        final String name = oracleSource.getSourceName();
+        final String database = oracleSource.getDatabase();
+        final String schemaname = oracleSource.getSchemaName();
+        final String tablename = oracleSource.getTableName();
+        final String primaryKey = oracleSource.getPrimaryKey();
+        final String hostName = oracleSource.getHostname();
+        final String userName = oracleSource.getUsername();
+        final String password = oracleSource.getPassword();
+        final Integer port = oracleSource.getPort();
+        final String scanstartupMode = oracleSource.getScanStartupMode();
+        OracleConstant.ScanStartUpMode scanStartupMode;
+        switch (scanstartupMode) {
+            case "initial":

Review Comment:
   Please use some constant or enum to replace those magic strings.



-- 
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]

Reply via email to