Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
module: [ core, flink, lake ]
module: [ core, flink, spark3, lake ]
name: "${{ matrix.module }}"
steps:
- name: Checkout code
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

STAGE_CORE="core"
STAGE_FLINK="flink"
STAGE_SPARK="spark3"
STAGE_LAKE="lake"

MODULES_FLINK="\
Expand All @@ -28,6 +29,20 @@ fluss-flink/fluss-flink-2.2,\
fluss-flink/fluss-flink-1.20,\
"

MODULES_COMMON_SPARK="\
fluss-spark,\
fluss-spark/fluss-spark-common,\
fluss-spark/fluss-spark-ut,\
"

MODULES_SPARK3="\
fluss-spark,\
fluss-spark/fluss-spark-common,\
fluss-spark/fluss-spark-ut,\
fluss-spark/fluss-spark-3.5,\
fluss-spark/fluss-spark-3.4,\
"

# we move Flink legacy version tests to "lake" module for balancing testing time
MODULES_LAKE="\
fluss-flink/fluss-flink-1.19,\
Expand All @@ -42,10 +57,12 @@ function get_test_modules_for_stage() {
local stage=$1

local modules_flink=$MODULES_FLINK
local modules_spark3=$MODULES_SPARK3
local modules_lake=$MODULES_LAKE
local negated_flink=\!${MODULES_FLINK//,/,\!}
local negated_spark=\!${MODULES_COMMON_SPARK//,/,\!}
local negated_lake=\!${MODULES_LAKE//,/,\!}
local modules_core="$negated_flink,$negated_lake"
local modules_core="$negated_flink,$negated_spark,$negated_lake"

case ${stage} in
(${STAGE_CORE})
Expand All @@ -54,6 +71,9 @@ function get_test_modules_for_stage() {
(${STAGE_FLINK})
echo "-pl fluss-test-coverage,$modules_flink"
;;
(${STAGE_SPARK})
echo "-Pspark3 -pl fluss-test-coverage,$modules_spark3"
;;
(${STAGE_LAKE})
echo "-pl fluss-test-coverage,$modules_lake"
;;
Expand Down
70 changes: 70 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
runner.dialect = scala212

# Version is required to make sure IntelliJ picks the right version
version = 3.10.2
preset = default

# Max column
maxColumn = 100

# This parameter simply says the .stripMargin method was not redefined by the user to assign
# special meaning to indentation preceding the | character. Hence, that indentation can be modified.
assumeStandardLibraryStripMargin = true
align.stripMargin = true

# Align settings
align.preset = none
align.closeParenSite = false
align.openParenCallSite = false
danglingParentheses.defnSite = false
danglingParentheses.callSite = false
danglingParentheses.ctrlSite = true
danglingParentheses.tupleSite = false
align.openParenCallSite = false
align.openParenDefnSite = false
align.openParenTupleSite = false

# Newlines
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.beforeCurlyLambdaParams = multiline # Newline before lambda params
newlines.afterCurlyLambdaParams = squash # No newline after lambda params
newlines.inInterpolation = "avoid"
newlines.avoidInResultType = true
optIn.annotationNewlines = true

# Scaladoc
docstrings.style = Asterisk # Javadoc style
docstrings.removeEmpty = true
docstrings.oneline = fold
docstrings.forceBlankLineBefore = true

# Indentation
indent.extendSite = 2 # This makes sure extend is not indented as the ctor parameters

# Rewrites
rewrite.rules = [AvoidInfix, Imports, RedundantBraces, SortModifiers]

# Imports
rewrite.imports.sort = scalastyle
rewrite.imports.groups = [
["org.apache.fluss\\..*"],
["org.apache.fluss.shade\\..*"],
[".*"],
["javax\\..*"],
["java\\..*"],
["scala\\..*"]
]
rewrite.imports.contiguousGroups = no
importSelectors = singleline # Imports in a single line, like IntelliJ

# Remove redundant braces in string interpolation.
rewrite.redundantBraces.stringInterpolation = true
rewrite.redundantBraces.defnBodies = false
rewrite.redundantBraces.generalExpressions = false
rewrite.redundantBraces.ifElseExpressions = false
rewrite.redundantBraces.methodBodies = false
rewrite.redundantBraces.includeUnitMethods = false
rewrite.redundantBraces.maxBreaks = 1

# Remove trailing commas
rewrite.trailingCommas.style = "never"
17 changes: 17 additions & 0 deletions copyright.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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.
*/

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.fluss.config;

import org.apache.fluss.annotation.PublicStable;
import org.apache.fluss.annotation.VisibleForTesting;
import org.apache.fluss.utils.CollectionUtils;

import org.slf4j.Logger;
Expand Down Expand Up @@ -643,7 +644,8 @@ <T> void setValueInternal(String key, T value) {
}
}

private Optional<Object> getRawValue(String key) {
@VisibleForTesting
public Optional<Object> getRawValue(String key) {
if (key == null) {
throw new NullPointerException("Key must not be null.");
}
Expand Down
129 changes: 129 additions & 0 deletions fluss-spark/fluss-spark-3.4/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.fluss</groupId>
<artifactId>fluss-spark</artifactId>
<version>0.9-SNAPSHOT</version>
</parent>

<artifactId>fluss-spark-3.4_${scala.binary.version}</artifactId>
<name>Fluss : Engine Spark : 3.4</name>

<properties>
<spark.version>3.4.3</spark.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.fluss</groupId>
<artifactId>fluss-spark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.fluss</groupId>
<artifactId>fluss-spark-ut_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- compilation of main sources -->
<skipMain>${skip.on.java8}</skipMain>
<!-- compilation of test sources -->
<skip>${skip.on.java8}</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<executions>
<!-- Test end with ITCase is e2e test in this module -->
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<inherited>false</inherited>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>${skip.on.java8}</skip>
<includes>
<include>**/*ITCase.*</include>
</includes>
<!-- e2e test with flink/zookeeper cluster, we set forkCount=1 -->
<forkCount>1</forkCount>
</configuration>
</execution>
<!-- others unit tests -->
<execution>
<id>default-test</id>
<phase>test</phase>
<inherited>false</inherited>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>${skip.on.java8}</skip>
<excludes>
<exclude>**/*ITCase.*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-fluss</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes combine.children="append">
<include>org.apache.fluss:fluss-spark-common</include>
<include>org.apache.fluss:fluss-client</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading