Skip to content
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

[FLINK-5206] [py] Use random file names in tests #2973

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from flink.plan.Constants import Order, WriteMode
from flink.plan.Constants import INT, STRING
import struct
from uuid import uuid4
from utils import Id, Verify

if __name__ == "__main__":
Expand Down Expand Up @@ -58,14 +59,17 @@
#CSV Source/Sink
csv_data = env.read_csv("src/test/python/org/apache/flink/python/api/data_csv", (INT, INT, STRING))

csv_data.write_csv("/tmp/flink/result1", line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
out = "flink_python_" + str(uuid4())
csv_data.write_csv("/tmp/flink/" + out, line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)

d8.write_csv("/tmp/flink/result2", line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
out = "flink_python_" + str(uuid4())
d8.write_csv("/tmp/flink/" + out, line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)

#Text Source/Sink
text_data = env.read_text("src/test/python/org/apache/flink/python/api/data_text")

text_data.write_text("/tmp/flink/result2", WriteMode.OVERWRITE)
out = "flink_python_" + str(uuid4())
text_data.write_text("/tmp/flink/" + out, WriteMode.OVERWRITE)

#Types
env.from_elements(bytearray(b"hello"), bytearray(b"world"))\
Expand Down