Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ $# == 0 ]
then
args="-h"
else
args=$@
args=("$@")
fi

set +u
Expand All @@ -60,7 +60,7 @@ fi

CLASS_PATH=${APP_DIR}/starter/logging/*:${APP_JAR}

CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}") && EXIT_CODE=$? || EXIT_CODE=$?
if [ ${EXIT_CODE} -eq 234 ]; then
# print usage
echo "${CMD}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ $# == 0 ]
then
args="-h"
else
args=$@
args=("$@")
fi

set +u
Expand All @@ -60,7 +60,7 @@ fi

CLASS_PATH=${APP_DIR}/starter/logging/*:${APP_JAR}

CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}") && EXIT_CODE=$? || EXIT_CODE=$?
if [ ${EXIT_CODE} -eq 234 ]; then
# print usage
echo "${CMD}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ $# == 0 ]
then
args="-h"
else
args=$@
args=("$@")
fi

set +u
Expand All @@ -60,7 +60,7 @@ fi

CLASS_PATH=${APP_DIR}/starter/logging/*:${APP_JAR}

CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}") && EXIT_CODE=$? || EXIT_CODE=$?
if [ ${EXIT_CODE} -eq 234 ]; then
# print usage
echo "${CMD}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ $# == 0 ]
then
args="-h"
else
args=$@
args=("$@")
fi

set +u
Expand All @@ -60,7 +60,7 @@ fi

CLASS_PATH=${APP_DIR}/starter/logging/*:${APP_JAR}

CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}") && EXIT_CODE=$? || EXIT_CODE=$?
if [ ${EXIT_CODE} -eq 234 ]; then
# print usage
echo "${CMD}"
Expand Down
4 changes: 2 additions & 2 deletions seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ $# == 0 ]
then
args="-h"
else
args=$@
args=("$@")
fi

set +u
Expand Down Expand Up @@ -107,4 +107,4 @@ while IFS= read -r line || [[ -n "$line" ]]; do
fi
done < ${APP_DIR}/config/jvm_client_options

java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}
java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} "${args[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,15 @@ public void userVariableTest(TestContainer container) throws IOException, Interr
container.executeJob("/fake_to_console.variables.conf", variables);
Assertions.assertEquals(0, execResult.getExitCode());
}

@TestTemplate
public void userVariableWithSpaceTest(TestContainer container)
throws IOException, InterruptedException {
List<String> variables = new ArrayList<>();
String list = "\"AA AA\"";
variables.add("blankSpace=" + list);
Container.ExecResult execResult =
container.executeJob("/fake_variable_with_space_assert.conf", variables);
Assertions.assertEquals(0, execResult.getExitCode());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#
# 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.
#
######
###### This config file is a demonstration of streaming processing in seatunnel config
######

env {
job.mode = "BATCH"
parallelism = 1
}

source {
# This is a example source plugin **only for test and demonstrate the feature source plugin**
FakeSource {
row.num = 1
schema {
fields {
c_string = string
}
}
rows = [
{
kind = INSERT
fields = [${blankSpace}]
}
]
}
}

sink {
Assert {
rules =
{
row_rules = [
{
rule_type = MAX_ROW
rule_value = 1
},
{
rule_type = MIN_ROW
rule_value = 1
}
],
field_rules = [
{
field_name = c_string
field_type = string
field_value = [
{
rule_type = NOT_NULL
equals_to = "AA AA"
}
]
}
]
}
}
}