diff --git a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/PatternReplaceUtils.java b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/PatternReplaceUtils.java index 5b831d7026..20f70c5205 100644 --- a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/PatternReplaceUtils.java +++ b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/PatternReplaceUtils.java @@ -31,7 +31,7 @@ public final class PatternReplaceUtils { public static String replace(String pattern, Map params) { if (pattern == null) { - return pattern; + return null; } Matcher matcher = REGEX_PATTERN.matcher(pattern); StringBuffer sb = new StringBuffer(); diff --git a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/SchemaUpdateExceptionPolicy.java b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/SchemaUpdateExceptionPolicy.java deleted file mode 100644 index 24745baf6f..0000000000 --- a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/SchemaUpdateExceptionPolicy.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.inlong.sdk.dirtydata; - -/** - * Multiple sink scenes will meet different table data. - * Maybe one table data have different schema, once it's schema mismatch with catalog schema, how to handle - * this table data. For example schema mismatch: - * - *
- * data : {a : int, b : string, c : date}
- * catalog : {a : string, b : timestamp}
- * 
- */ -public enum SchemaUpdateExceptionPolicy { - - TRY_IT_BEST("Try it best to handle schema update, if can not handle it, just ignore it."), - LOG_WITH_IGNORE("Ignore schema update and log it."), - ALERT_WITH_IGNORE("Ignore schema update and alert it."), - STOP_PARTIAL("Only stop abnormal sink table, other tables writes normally."), - THROW_WITH_STOP("Throw exception to stop flink job when meet schema update."); - - private String description; - - SchemaUpdateExceptionPolicy(String description) { - this.description = description; - } - - public String getDescription() { - return description; - } -} diff --git a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/sink/InlongSdkDirtySink.java b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/sink/InlongSdkDirtySink.java index 9b58af6224..bef0fc3110 100644 --- a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/sink/InlongSdkDirtySink.java +++ b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/sink/InlongSdkDirtySink.java @@ -94,7 +94,7 @@ public void invoke(DirtyData dirtyData) { private InlongSdkOptions getOptions(Configure config) { return InlongSdkOptions.builder() - .inlongManagerAddr(config.get(DIRTY_SIDE_OUTPUT_INLONG_MANAGER)) + .inlongManagerAddr(config.get(DIRTY_SIDE_OUTPUT_INLONG_MANAGER_ADDR)) .inlongGroupId(config.get(DIRTY_SIDE_OUTPUT_INLONG_GROUP)) .inlongStreamId(config.get(DIRTY_SIDE_OUTPUT_INLONG_STREAM)) .inlongManagerAuthKey(config.get(DIRTY_SIDE_OUTPUT_INLONG_AUTH_KEY))