Unverified Commit bc594b65 authored by Licho's avatar Licho Committed by GitHub

feat:spotlessFirst (#1529)

* feat:spotlessFirst * feat: clone all Signed-off-by: 's avatarlicho <lecho.sun@gmail.com> * chore: spotless:apply Signed-off-by: 's avatarlicho <lecho.sun@gmail.com> Signed-off-by: 's avatarlicho <lecho.sun@gmail.com>
parent 16cf584f
...@@ -32,10 +32,21 @@ concurrency: ...@@ -32,10 +32,21 @@ concurrency:
group: backend-${{ github.event.pull_request.number || github.ref }} group: backend-${{ github.event.pull_request.number || github.ref }}
jobs: jobs:
check:
name: Check Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Style
run: |
./mvnw -T 4C -B --no-snapshot-updates clean spotless:check
build_npm: build_npm:
name: Build_NPM name: Build_NPM
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
needs: check
env: env:
MAVEN_OPTS: -Xmx2G -Xms2G MAVEN_OPTS: -Xmx2G -Xms2G
steps: steps:
...@@ -74,6 +85,7 @@ jobs: ...@@ -74,6 +85,7 @@ jobs:
build_jdk: build_jdk:
name: Build_JDK name: Build_JDK
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: check
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
...@@ -112,9 +124,6 @@ jobs: ...@@ -112,9 +124,6 @@ jobs:
key: ${{ runner.os }}-${{ matrix.flink }}-maven-${{ hashFiles('pom.xml') }} key: ${{ runner.os }}-${{ matrix.flink }}-maven-${{ hashFiles('pom.xml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ matrix.flink }}-maven- ${{ runner.os }}-${{ matrix.flink }}-maven-
- name: Check Style
run: |
./mvnw -T 4C -B --no-snapshot-updates -Dspotless.ratchetFrom=HEAD clean spotless:check
- name: Build and Package - name: Build and Package
run: | run: |
./mvnw -B clean install \ ./mvnw -B clean install \
......
...@@ -29,10 +29,10 @@ import org.apache.flink.table.delegation.Planner; ...@@ -29,10 +29,10 @@ import org.apache.flink.table.delegation.Planner;
* *
*/ */
public abstract class AbstractCustomTableEnvironment public abstract class AbstractCustomTableEnvironment
implements implements
CustomTableEnvironment, CustomTableEnvironment,
DefaultTableEnvironmentInternal, DefaultTableEnvironmentInternal,
DefaultStreamTableEnvironment { DefaultStreamTableEnvironment {
protected StreamTableEnvironment streamTableEnvironment; protected StreamTableEnvironment streamTableEnvironment;
......
...@@ -37,13 +37,17 @@ import org.apache.flink.types.Row; ...@@ -37,13 +37,17 @@ import org.apache.flink.types.Row;
/** /**
* *
*/ */
public interface DefaultStreamTableEnvironment extends StreamTableEnvironment, DefaultTableEnvironment, TableEnvironmentInstance { public interface DefaultStreamTableEnvironment
extends
StreamTableEnvironment,
DefaultTableEnvironment,
TableEnvironmentInstance {
default StreamTableEnvironment getStreamTableEnvironment() { default StreamTableEnvironment getStreamTableEnvironment() {
return (StreamTableEnvironment) getTableEnvironment(); return (StreamTableEnvironment) getTableEnvironment();
} }
@Override// region StreamTableEnvironment interface @Override // region StreamTableEnvironment interface
default <T> void registerFunction(String s, TableFunction<T> tableFunction) { default <T> void registerFunction(String s, TableFunction<T> tableFunction) {
getStreamTableEnvironment().registerFunction(s, tableFunction); getStreamTableEnvironment().registerFunction(s, tableFunction);
} }
......
...@@ -43,6 +43,7 @@ import java.util.Optional; ...@@ -43,6 +43,7 @@ import java.util.Optional;
* *
*/ */
public interface DefaultTableEnvironment extends TableEnvironment, TableEnvironmentInstance { public interface DefaultTableEnvironment extends TableEnvironment, TableEnvironmentInstance {
@Override @Override
default Table fromValues(Expression... expressions) { default Table fromValues(Expression... expressions) {
return getTableEnvironment().fromValues(expressions); return getTableEnvironment().fromValues(expressions);
......
/** /*
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
...@@ -42,7 +42,11 @@ import com.fasterxml.jackson.databind.node.ObjectNode; ...@@ -42,7 +42,11 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
* @author wenmo * @author wenmo
* @since 2022/2/5 10:35 * @since 2022/2/5 10:35
*/ */
public interface CustomTableEnvironment extends StreamTableEnvironment, TableEnvironmentInternal, TableEnvironmentInstance { public interface CustomTableEnvironment
extends
StreamTableEnvironment,
TableEnvironmentInternal,
TableEnvironmentInstance {
ObjectNode getStreamGraph(String statement); ObjectNode getStreamGraph(String statement);
......
...@@ -543,9 +543,9 @@ public class JobManager { ...@@ -543,9 +543,9 @@ public class JobManager {
job.setJids(gatewayResult.getJids()); job.setJids(gatewayResult.getJids());
job.setJobManagerAddress(formatAddress(gatewayResult.getWebURL())); job.setJobManagerAddress(formatAddress(gatewayResult.getWebURL()));
if (gatewayResult.isSucess()){ if (gatewayResult.isSucess()) {
job.setStatus(Job.JobStatus.SUCCESS); job.setStatus(Job.JobStatus.SUCCESS);
}else { } else {
job.setStatus(Job.JobStatus.FAILED); job.setStatus(Job.JobStatus.FAILED);
job.setError(gatewayResult.getError()); job.setError(gatewayResult.getError());
} }
...@@ -577,9 +577,9 @@ public class JobManager { ...@@ -577,9 +577,9 @@ public class JobManager {
} }
} }
job.setEndTime(LocalDateTime.now()); job.setEndTime(LocalDateTime.now());
if (job.getStatus().name().equals(Job.JobStatus.FAILED.name())){ if (job.getStatus().name().equals(Job.JobStatus.FAILED.name())) {
failed(); failed();
}else { } else {
success(); success();
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -740,10 +740,10 @@ public class JobManager { ...@@ -740,10 +740,10 @@ public class JobManager {
job.setJobManagerAddress(formatAddress(gatewayResult.getWebURL())); job.setJobManagerAddress(formatAddress(gatewayResult.getWebURL()));
job.setEndTime(LocalDateTime.now()); job.setEndTime(LocalDateTime.now());
if (gatewayResult.isSucess()){ if (gatewayResult.isSucess()) {
job.setStatus(Job.JobStatus.SUCCESS); job.setStatus(Job.JobStatus.SUCCESS);
success(); success();
}else { } else {
job.setError(gatewayResult.getError()); job.setError(gatewayResult.getError());
job.setStatus(Job.JobStatus.FAILED); job.setStatus(Job.JobStatus.FAILED);
failed(); failed();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment