mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-11-29 18:48:23 +08:00
[Core] [Executor] Fixed code bug
This commit is contained in:
parent
338631cb6f
commit
dc36186d30
@ -24,7 +24,7 @@ import java.sql.Timestamp;
|
||||
@Entity
|
||||
@Table(name = "role")
|
||||
@org.hibernate.annotations.Table(appliesTo = "role", comment = "User rights configuration table")
|
||||
@SuppressFBWarnings(value = {"EI_EXPOSE_REP"},
|
||||
@SuppressFBWarnings(value = {"EI_EXPOSE_REP", "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"},
|
||||
justification = "I prefer to suppress these FindBugs warnings")
|
||||
public class RoleEntity
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
|
||||
import com.google.common.base.Preconditions;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import io.edurt.datacap.executor.connector.Connector;
|
||||
import io.edurt.datacap.executor.connector.ConnectorFactory;
|
||||
import io.edurt.datacap.executor.connector.ConnectorType;
|
||||
@ -24,6 +25,7 @@ import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
@SuppressFBWarnings(value = {"RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"})
|
||||
public class SeatunnelExecutor
|
||||
implements Executor
|
||||
{
|
||||
|
@ -4,14 +4,15 @@ import com.google.common.base.Preconditions;
|
||||
import io.edurt.datacap.spi.executor.PipelineField;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class Connector
|
||||
{
|
||||
protected final ConnectorType type;
|
||||
protected final PipelineField configure;
|
||||
private final String[] supportOptions;
|
||||
private final Set<String> supportOptions;
|
||||
|
||||
public Connector(ConnectorType type, PipelineField configure, String[] supportOptions)
|
||||
public Connector(ConnectorType type, PipelineField configure, Set<String> supportOptions)
|
||||
{
|
||||
this.type = type;
|
||||
this.configure = configure;
|
||||
|
@ -2,19 +2,22 @@ package io.edurt.datacap.executor.connector;
|
||||
|
||||
import io.edurt.datacap.spi.executor.PipelineField;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ConnectorClickHouse
|
||||
extends Connector
|
||||
{
|
||||
private static final String[] supportOptions = {
|
||||
"host",
|
||||
"database",
|
||||
"sql",
|
||||
"username",
|
||||
"password"
|
||||
};
|
||||
private static final Set<String> supportOptions = new HashSet<String>()
|
||||
{{
|
||||
add("host");
|
||||
add("database");
|
||||
add("sql");
|
||||
add("username");
|
||||
add("password");
|
||||
}};
|
||||
|
||||
public ConnectorClickHouse(ConnectorType type, PipelineField configure)
|
||||
{
|
||||
|
@ -3,14 +3,16 @@ package io.edurt.datacap.executor.connector;
|
||||
import io.edurt.datacap.spi.executor.PipelineField;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ConnectorConsole
|
||||
extends Connector
|
||||
{
|
||||
private static final String[] supportOptions = {};
|
||||
private static final Set<String> supportOptions = new HashSet<>();
|
||||
|
||||
public ConnectorConsole(ConnectorType type, PipelineField configure)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user