Skip to content

Commit

Permalink
squash all committer
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrart committed Sep 3, 2024
1 parent 623a39e commit 2cfc962
Show file tree
Hide file tree
Showing 69 changed files with 2,921 additions and 191 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ print_logo() {
build() {
if [[ -x "$PRG_DIR/mvnw" ]]; then
echo_g "Apache StreamPark, building..."
"$PRG_DIR/mvnw" -Pshaded,webapp,dist -DskipTests clean install -Drat.skip=true
"$PRG_DIR/mvnw" -Pshaded,webapp,dist -DskipTests clean install
if [[ $? -eq 0 ]]; then
printf '\n'
echo_g """StreamPark project build successful!
Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@
<scala.xml.version>1.3.0</scala.xml.version>
<scalatest.version>3.2.9</scalatest.version>
<scala.binary.flink.version>_${scala.binary.version}</scala.binary.flink.version>

<flink.version>1.14.4</flink.version>
<flink.connector.version>3.2.0-1.18</flink.connector.version>
<flink.elasticserch.connector.version>3.0.1-1.17</flink.elasticserch.connector.version>
<flink.version>1.18.1</flink.version>
<flink.shaded.version>1.8.1</flink.shaded.version>
<streampark.shaded.version>1.0.0</streampark.shaded.version>
<streampark.flink.shims.version>1.14</streampark.flink.shims.version>
Expand Down Expand Up @@ -139,13 +140,13 @@
<owasp-dependency-check-maven.version>10.0.2</owasp-dependency-check-maven.version>
<build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version>
<streampark.shaded.package>org.apache.streampark.shaded</streampark.shaded.package>
<flink.table.uber.artifact.id>flink-table-uber_${scala.binary.version}</flink.table.uber.artifact.id>
<httpclient5.version>5.1</httpclient5.version>
<lombok.version>1.18.24</lombok.version>
<jupiter.version>5.9.1</jupiter.version>
<mockito.version>3.4.6</mockito.version>
<mockito-scala.version>1.17.14</mockito-scala.version>
<assertj.version>3.23.1</assertj.version>
<testcontainers.version>1.19.8</testcontainers.version>

<maven.scaladoc.skip>false</maven.scaladoc.skip>
<maven.scalastyle.skip>false</maven.scalastyle.skip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

/** catalog type */
public enum CatalogType {
MYSQL,
PGSQL,
ORACLE,
JDBC,
HIVE,
PAIMON,
Expand Down
48 changes: 48 additions & 0 deletions streampark-console/streampark-console-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@
<groupId>org.pac4j</groupId>
<artifactId>pac4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
</exclusion>
</exclusions>

</dependency>
Expand Down Expand Up @@ -367,12 +371,32 @@
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-spark-client-api_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-flink-kubernetes_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -449,6 +473,30 @@
<version>${flink.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-api-java</artifactId>
<version>${flink.version}</version>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-flink-connector-plugin</artifactId>
<version>2.2.0-SNAPSHOT</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Map;

/** Serialization utils */
public final class JacksonUtils {
Expand Down Expand Up @@ -67,4 +68,8 @@ public static boolean isValidJson(String jsonStr) {
return false;
}
}

public static Map<String, String> toMap(String jsonStr) throws JsonProcessingException {
return (Map<String, String>) MAPPER.readValue(jsonStr, Map.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,7 @@ public static File getAppClientDir() {
return getAppDir(CLIENT);
}

public static File getPluginDir() {
return getAppDir(PLUGINS);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.streampark.console.core.bean;

import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class DatabaseParam {

@NotBlank(message = "invalid.databaseName")
private String name;

@NotBlank(message = "invalid.catalogId")
private Long catalogId;

private String catalogName;
private boolean ignoreIfExits;
private boolean cascade;
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import org.apache.streampark.console.base.util.JacksonUtils;
import org.apache.streampark.console.core.entity.FlinkCatalog;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.codehaus.jackson.annotate.JsonProperty;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotBlank;
Expand Down Expand Up @@ -67,6 +67,9 @@ public static FlinkCatalogParams of(FlinkCatalog flinkCatalog) {
BeanUtils.copyProperties(flinkCatalog, flinkCatalogParams, "configuration");
try {
switch (flinkCatalog.getCatalogType()) {
case MYSQL:
case PGSQL:
case ORACLE:
case JDBC:
flinkCatalogParams.setFlinkJDBCCatalog(
JacksonUtils.read(flinkCatalog.getConfiguration(), FlinkJDBCCatalog.class));
Expand Down Expand Up @@ -130,6 +133,54 @@ public static class FlinkHiveCatalog implements Serializable {

@JsonProperty("hadoop-conf-dir")
private String hadoopConfDir;

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getHiveConfDir() {
return hiveConfDir;
}

public void setHiveConfDir(String hiveConfDir) {
this.hiveConfDir = hiveConfDir;
}

public String getDefaultDatabase() {
return defaultDatabase;
}

public void setDefaultDatabase(String defaultDatabase) {
this.defaultDatabase = defaultDatabase;
}

public String getHiveVersion() {
return hiveVersion;
}

public void setHiveVersion(String hiveVersion) {
this.hiveVersion = hiveVersion;
}

public String getHadoopConfDir() {
return hadoopConfDir;
}

public void setHadoopConfDir(String hadoopConfDir) {
this.hadoopConfDir = hadoopConfDir;
}
}

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.streampark.console.core.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/** flink table datatype */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FlinkDataType {

private String type;

private boolean isNullable;

private Integer precision;

private Integer scale;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* 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.streampark.console.core.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.annotation.Nullable;

/** TableColumn model. */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TableColumn {

private Integer id;

private String field;

private FlinkDataType dataType;

@Nullable
private String comment;

@Nullable
private boolean isPk;

@Nullable
private String defaultValue;

private Integer sort;
}
Loading

0 comments on commit 2cfc962

Please sign in to comment.