Skip to content

Commit

Permalink
[Connector] [Dependency] Add Miss Dependency Cassandra And Change Kud…
Browse files Browse the repository at this point in the history
…u Plugin Name (#3432)

* [Connector] [Dependency] Add Miss Dependency Cassandra

* [Connector] [Dependency] Add Miss Dependency Cassandra

* [Connector] [Dependency] Add Miss Dependency Cassandra

* [Plugin] change PluginIdentifier hashcode method

* [Kudu] [Config] Change Kudu connector name
  • Loading branch information
Hisoka-X committed Nov 21, 2022
1 parent 06359ea commit 6ac6a0a
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 14 deletions.
6 changes: 5 additions & 1 deletion docs/en/connector-v2/sink/Kudu.md
Expand Up @@ -42,7 +42,7 @@ Sink plugin common parameters, please refer to [Sink Common Options](common-opti

```bash

kuduSink {
kudu {
kudu_master = "192.168.88.110:7051"
kudu_table = "studentlyhresultflink"
save_mode="append"
Expand All @@ -58,3 +58,7 @@ Sink plugin common parameters, please refer to [Sink Common Options](common-opti

### 2.3.0-beta 2022-10-20
- [Improve] Kudu Sink Connector Support to upsert row ([2881](https://github.com/apache/incubator-seatunnel/pull/2881))

### Next Version

- Change plugin name from `KuduSink` to `Kudu` [3432](https://github.com/apache/incubator-seatunnel/pull/3432)
6 changes: 5 additions & 1 deletion docs/en/connector-v2/source/Kudu.md
Expand Up @@ -46,7 +46,7 @@ Source plugin common parameters, please refer to [Source Common Options](common-

```hocon
source {
KuduSource {
Kudu {
result_table_name = "studentlyh2"
kudu_master = "192.168.88.110:7051"
kudu_table = "studentlyh2"
Expand All @@ -61,3 +61,7 @@ source {
### 2.2.0-beta 2022-09-26

- Add Kudu Source Connector

### Next Version

- Change plugin name from `KuduSource` to `Kudu` [3432](https://github.com/apache/incubator-seatunnel/pull/3432)
4 changes: 3 additions & 1 deletion plugin-mapping.properties
Expand Up @@ -18,6 +18,8 @@
# This mapping is used to resolve the Jar package name without version (or call artifactId)
# corresponding to the module in the user Config, helping SeaTunnel to load the correct Jar package.

## *** WARNING **** : `seatunnel.source.XXX`, the `XXX` should be string which SeaTunnelSource::getPluginName and TableSinkFactory::factoryIdentifier returned value##

# Flink Source
flink.source.DruidSource = seatunnel-connector-flink-druid
flink.source.FakeSource = seatunnel-connector-flink-fake
Expand Down Expand Up @@ -106,7 +108,7 @@ seatunnel.source.Jdbc = connector-jdbc
seatunnel.sink.Jdbc = connector-jdbc
seatunnel.source.Kudu = connector-kudu
seatunnel.sink.Kudu = connector-kudu
seatunnel.sink.Email = connector-email
seatunnel.sink.EmailSink = connector-email
seatunnel.source.HdfsFile = connector-file-hadoop
seatunnel.sink.HdfsFile = connector-file-hadoop
seatunnel.source.LocalFile = connector-file-local
Expand Down
Expand Up @@ -44,7 +44,7 @@ public class KuduSink extends AbstractSimpleSink<SeaTunnelRow, Void> {

@Override
public String getPluginName() {
return "kuduSink";
return "kudu";
}

@Override
Expand Down
Expand Up @@ -95,7 +95,7 @@ public Serializer<KuduSourceState> getEnumeratorStateSerializer() {

@Override
public String getPluginName() {
return "KuduSource";
return "Kudu";
}

@Override
Expand Down
Expand Up @@ -78,7 +78,7 @@

@AutoService(SeaTunnelSource.class)
public class PulsarSource<T> implements SeaTunnelSource<T, PulsarPartitionSplit, PulsarSplitEnumeratorState> {
public static final String IDENTIFIER = "pulsar";
public static final String IDENTIFIER = "Pulsar";
private DeserializationSchema<T> deserialization;

private PulsarAdminConfig adminConfig;
Expand Down
Expand Up @@ -22,7 +22,7 @@

public class SentryConfig {

public static final String SENTRY = "sentry";
public static final String SENTRY = "Sentry";

public static final Option<String> DSN = Options.key("dsn").stringType().noDefaultValue().withDescription("sentry dsn");
public static final Option<String> ENV = Options.key("env").stringType().noDefaultValue().withDescription("env");
Expand Down
6 changes: 6 additions & 0 deletions seatunnel-dist/pom.xml
Expand Up @@ -315,6 +315,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.seatunnel</groupId>
<artifactId>connector-cassandra</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.seatunnel</groupId>
<artifactId>connector-file-s3</artifactId>
Expand Down
Expand Up @@ -17,7 +17,7 @@

package org.apache.seatunnel.plugin.discovery;

import java.util.Objects;
import org.apache.commons.lang3.StringUtils;

/**
* Used to identify a plugin.
Expand Down Expand Up @@ -60,20 +60,20 @@ public boolean equals(Object o) {

PluginIdentifier that = (PluginIdentifier) o;

if (!Objects.equals(engineType, that.engineType)) {
if (!StringUtils.equalsIgnoreCase(engineType, that.engineType)) {
return false;
}
if (!Objects.equals(pluginType, that.pluginType)) {
if (!StringUtils.equalsIgnoreCase(pluginType, that.pluginType)) {
return false;
}
return Objects.equals(pluginName, that.pluginName);
return StringUtils.equalsIgnoreCase(pluginName, that.pluginName);
}

@Override
public int hashCode() {
int result = engineType != null ? engineType.hashCode() : 0;
result = 31 * result + (pluginType != null ? pluginType.hashCode() : 0);
result = 31 * result + (pluginName != null ? pluginName.hashCode() : 0);
int result = engineType != null ? engineType.toLowerCase().hashCode() : 0;
result = 31 * result + (pluginType != null ? pluginType.toLowerCase().hashCode() : 0);
result = 31 * result + (pluginName != null ? pluginName.toLowerCase().hashCode() : 0);
return result;
}

Expand Down

0 comments on commit 6ac6a0a

Please sign in to comment.