-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[E2E Test][Improvement] Add Test Case for LocalFile CSV Sink #8436
Open
welsh-wen
wants to merge
8
commits into
apache:dev
Choose a base branch
from
welsh-wen:wt_wendada_localfile_csv_sink
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2ee9642
[Improve][Doc] Add enable_header_write parameter in FtpFile.md
e5170d2
[Improve][Doc] Add enable_header_write parameter in FtpFile.md
6c271c9
add blank
aa78d6e
Merge branch 'dev' of github.com:welsh-wen/seatunnel into dev
8f96068
Merge branch 'apache:dev' into dev
welsh-wen 21f1630
add blank
49ec541
Add enable_header_write parameter in FtpFile.md,remove blank
a45ed2a
[E2E Test][Improvement] Add Test Case for LocalFile CSV Sink
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,9 +295,15 @@ public class LocalFileIT extends TestSuiteBase { | |
}; | ||
|
||
@TestTemplate | ||
@DisabledOnContainer( | ||
value = {TestContainerId.SPARK_2_4}, | ||
type = {EngineType.SPARK, EngineType.FLINK}, | ||
disabledReason = | ||
"Fink test is multi-node, LocalFile connector will use different containers for obtaining files") | ||
public void testLocalFileReadAndWrite(TestContainer container) | ||
throws IOException, InterruptedException { | ||
TestHelper helper = new TestHelper(container); | ||
helper.execute("/excel/fake_to_local_csv.conf"); | ||
helper.execute("/excel/fake_to_local_excel.conf"); | ||
helper.execute("/excel/local_excel_to_assert.conf"); | ||
helper.execute("/excel/local_excel_projection_to_assert.conf"); | ||
|
@@ -391,7 +397,7 @@ public void testLocalFileReadAndWrite(TestContainer container) | |
@TestTemplate | ||
@DisabledOnContainer( | ||
value = {TestContainerId.SPARK_2_4}, | ||
type = {EngineType.FLINK}, | ||
type = {EngineType.SPARK, EngineType.FLINK}, | ||
disabledReason = | ||
"Fink test is multi-node, LocalFile connector will use different containers for obtaining files") | ||
public void testLocalFileReadAndWriteWithSaveMode(TestContainer container) | ||
|
@@ -437,6 +443,11 @@ private List<String> getFileListFromContainer(String path) { | |
} | ||
|
||
@TestTemplate | ||
@DisabledOnContainer( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
value = {TestContainerId.SPARK_2_4}, | ||
type = {EngineType.SPARK, EngineType.FLINK}, | ||
disabledReason = | ||
"Fink test is multi-node, LocalFile connector will use different containers for obtaining files") | ||
public void testLocalFileCatalog(TestContainer container) | ||
throws IOException, InterruptedException { | ||
final LocalFileCatalog localFileCatalog = | ||
|
80 changes: 80 additions & 0 deletions
80
...connector-v2-e2e/connector-file-local-e2e/src/test/resources/excel/fake_to_local_csv.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
env { | ||
parallelism = 1 | ||
job.mode = "BATCH" | ||
|
||
# You can set spark configuration here | ||
spark.app.name = "SeaTunnel" | ||
spark.executor.instances = 2 | ||
spark.executor.cores = 1 | ||
spark.executor.memory = "1g" | ||
spark.master = local | ||
} | ||
|
||
source { | ||
FakeSource { | ||
plugin_output = "fake" | ||
schema = { | ||
fields { | ||
c_map = "map<string, string>" | ||
c_array = "array<int>" | ||
c_string = string | ||
c_boolean = boolean | ||
c_tinyint = tinyint | ||
c_smallint = smallint | ||
c_int = int | ||
c_bigint = bigint | ||
c_float = float | ||
c_double = double | ||
c_bytes = bytes | ||
c_date = date | ||
c_decimal = "decimal(38, 18)" | ||
c_timestamp = timestamp | ||
c_row = { | ||
c_map = "map<string, string>" | ||
c_array = "array<int>" | ||
c_string = string | ||
c_boolean = boolean | ||
c_tinyint = tinyint | ||
c_smallint = smallint | ||
c_int = int | ||
c_bigint = bigint | ||
c_float = float | ||
c_double = double | ||
c_bytes = bytes | ||
c_date = date | ||
c_decimal = "decimal(38, 18)" | ||
c_timestamp = timestamp | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
sink { | ||
LocalFile { | ||
path = "/tmp/seatunnel/csv" | ||
partition_dir_expression = "${k0}=${v0}" | ||
is_partition_field_write_in_file = true | ||
file_name_expression = "${transactionId}_${now}" | ||
file_format_type = "csv" | ||
filename_time_format = "yyyy.MM.dd" | ||
is_enable_transaction = true | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why disabled spark