mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 20:07:41 +08:00
Fix streaming ci (#8159)
This commit is contained in:
@@ -37,10 +37,6 @@ define_java_module(
|
||||
"//java:io_ray_ray_api",
|
||||
":io_ray_ray_streaming-api",
|
||||
"@ray_streaming_maven//:com_google_guava_guava",
|
||||
"@ray_streaming_maven//:org_mockito_mockito_all",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_api_mockito",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_module_testng",
|
||||
"@ray_streaming_maven//:org_projectlombok_lombok",
|
||||
"@ray_streaming_maven//:org_slf4j_slf4j_api",
|
||||
"@ray_streaming_maven//:org_slf4j_slf4j_log4j12",
|
||||
"@ray_streaming_maven//:org_testng_testng",
|
||||
@@ -114,7 +110,6 @@ define_java_module(
|
||||
"@ray_streaming_maven//:org_mockito_mockito_all",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_api_mockito",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_module_testng",
|
||||
"@ray_streaming_maven//:org_projectlombok_lombok",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
@@ -127,7 +122,6 @@ define_java_module(
|
||||
"@ray_streaming_maven//:de_ruedigermoeller_fst",
|
||||
"@ray_streaming_maven//:org_aeonbits_owner_owner",
|
||||
"@ray_streaming_maven//:org_msgpack_msgpack_core",
|
||||
"@ray_streaming_maven//:org_projectlombok_lombok",
|
||||
"@ray_streaming_maven//:org_slf4j_slf4j_api",
|
||||
"@ray_streaming_maven//:org_slf4j_slf4j_log4j12",
|
||||
],
|
||||
@@ -147,7 +141,6 @@ java_binary(
|
||||
"@ray_streaming_maven//:org_mockito_mockito_all",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_api_mockito",
|
||||
"@ray_streaming_maven//:org_powermock_powermock_module_testng",
|
||||
"@ray_streaming_maven//:org_projectlombok_lombok",
|
||||
"@ray_streaming_maven//:org_testng_testng",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -27,26 +27,6 @@
|
||||
<artifactId>guava</artifactId>
|
||||
<version>27.0.1-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.10.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<version>1.6.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-testng</artifactId>
|
||||
<version>1.6.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
|
||||
@@ -15,7 +15,6 @@ public class Config {
|
||||
|
||||
public static final String STREAMING_JOB_NAME = "streaming.job.name";
|
||||
public static final String STREAMING_OP_NAME = "streaming.op_name";
|
||||
public static final String TASK_JOB_ID = "streaming.task_job_id";
|
||||
public static final String STREAMING_WORKER_NAME = "streaming.worker_name";
|
||||
|
||||
// channel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This file is auto-generated by Bazel from pom_template.xml, do not modify it. -->
|
||||
<!-- This file is auto-generated by Bazel from pom_template.xml, do not modify it. -->
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
@@ -76,11 +76,6 @@
|
||||
<artifactId>powermock-module-testng</artifactId>
|
||||
<version>1.6.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
|
||||
+2
-2
@@ -55,9 +55,9 @@ public class JobSchedulerImpl implements JobScheduler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocating job worker resource then create job worker actor
|
||||
* Allocate job workers' resource then create job workers' actor.
|
||||
*
|
||||
* @param executionGraph
|
||||
* @param executionGraph the physical plan
|
||||
*/
|
||||
protected void prepareResourceAndCreateWorker(ExecutionGraph executionGraph) {
|
||||
List<Container> containers = resourceManager.getRegisteredContainers();
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class WorkerLifecycleController {
|
||||
RayActor<JobWorker> actor = null;
|
||||
// TODO (datayjz): ray create actor
|
||||
|
||||
if (null == actor) {
|
||||
if (null == actor) {
|
||||
LOG.error("Create worker actor failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
-3
@@ -14,9 +14,6 @@ public class ChannelUtils {
|
||||
if (conf.containsKey(Config.STREAMING_JOB_NAME)) {
|
||||
builder.setJobName(conf.get(Config.STREAMING_JOB_NAME));
|
||||
}
|
||||
if (conf.containsKey(Config.TASK_JOB_ID)) {
|
||||
builder.setTaskJobId(conf.get(Config.TASK_JOB_ID));
|
||||
}
|
||||
if (conf.containsKey(Config.STREAMING_WORKER_NAME)) {
|
||||
builder.setWorkerName(conf.get(Config.STREAMING_WORKER_NAME));
|
||||
}
|
||||
|
||||
+2
-3
@@ -49,11 +49,10 @@ public abstract class StreamTask implements Runnable {
|
||||
private void prepareTask() {
|
||||
Map<String, String> queueConf = new HashMap<>();
|
||||
worker.getConfig().forEach((k, v) -> queueConf.put(k, String.valueOf(v)));
|
||||
String queueSize = (String) worker.getConfig()
|
||||
String queueSize = worker.getConfig()
|
||||
.getOrDefault(Config.CHANNEL_SIZE, Config.CHANNEL_SIZE_DEFAULT);
|
||||
queueConf.put(Config.CHANNEL_SIZE, queueSize);
|
||||
queueConf.put(Config.TASK_JOB_ID, Ray.getRuntimeContext().getCurrentJobId().toString());
|
||||
String channelType = (String) worker.getConfig()
|
||||
String channelType = worker.getConfig()
|
||||
.getOrDefault(Config.CHANNEL_TYPE, Config.MEMORY_CHANNEL);
|
||||
queueConf.put(Config.CHANNEL_TYPE, channelType);
|
||||
|
||||
|
||||
@@ -23,9 +23,15 @@ bazel test //streaming/java:all --test_tag_filters="checkstyle" --build_tests_on
|
||||
|
||||
echo "Running streaming tests."
|
||||
java -cp "$ROOT_DIR"/../../bazel-bin/streaming/java/all_streaming_tests_deploy.jar\
|
||||
org.testng.TestNG -d /tmp/ray_streaming_java_test_output "$ROOT_DIR"/testng.xml || exit_code=$?
|
||||
org.testng.TestNG -d /tmp/ray_streaming_java_test_output "$ROOT_DIR"/testng.xml
|
||||
exit_code=$?
|
||||
echo "Streaming TestNG results"
|
||||
cat /tmp/ray_streaming_java_test_output/testng-results.xml
|
||||
if [ -f "/tmp/ray_streaming_java_test_output/testng-results.xml" ] ; then
|
||||
cat /tmp/ray_streaming_java_test_output/testng-results.xml
|
||||
else
|
||||
echo "Test result file doesn't exist"
|
||||
fi
|
||||
|
||||
# exit_code == 2 means there are skipped tests.
|
||||
if [ $exit_code -ne 2 ] && [ $exit_code -ne 0 ] ; then
|
||||
exit $exit_code
|
||||
|
||||
Reference in New Issue
Block a user