Skip to content

Commit

Permalink
task bind job id in highflip, remove adaptor path configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TingSty committed Aug 9, 2023
1 parent 505f72b commit 0264f8e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 22 deletions.
10 changes: 0 additions & 10 deletions highflip-proto/src/main/proto/highflip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -561,16 +561,6 @@ message ConfigListResponse{
string key = 1;
}

message GetServiceConfigResponse{

string url = 1;

string party_id = 2;

string role = 3;
}


////////////////////////////////////////////////////////////////////////////////
// SERVICE
////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void listTask(Highflip.TaskListRequest request,
log.info("job id: {}, job binging id: {}", job.getJobId(),
job.getBingingId());
Iterator<Highflip.TaskListResponse> response = Streams
.stream(getEngine().listTask(job.getBingingId()))
.stream(getEngine().listTask(request.getJobId()))
.map(t -> Highflip.TaskListResponse
.newBuilder()
.setTaskId(t.getTaskid())
Expand Down
2 changes: 1 addition & 1 deletion highflip-server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#########################################################
# highflip adaptor
#########################################################
highflip.server.adaptor.path=file:/Users/songtingyu/tmp/fate_adaptor/highflip-adaptor-fate-1.0.0-SNAPSHOT-jar-with-dependencies.jar
highflip.server.adaptor.path=
#########################################################
# spring grpc
#########################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public com.baidu.highflip.core.entity.runtime.Job createJob(com.baidu.highflip.c
@Override
public com.baidu.highflip.core.entity.runtime.Job updateJob(com.baidu.highflip.core.entity.runtime.Job job) {

String bindId = job.getBingingId();
String bindId = job.getJobId();
final Iterable<Task> tasks =
getContext().getHighFlipRuntime().listTask(bindId);
for (Task task : tasks) {
Expand Down Expand Up @@ -181,6 +181,8 @@ public List<Task> getTaskList(com.baidu.highflip.core.entity.runtime.Job job, Li
for (int i = 0; i < tasks.size(); i++) {
Task queryTask = queryResult.get(i);
Task ret = tasks.get(i);
// task bind job id in highflip
queryTask.setJobid(job.getJobId());
queryTask.setTaskid(ret.getTaskid());
BeanUtils.copyProperties(queryTask, ret);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class FFateTask {

public static Task convertToEntity(FFateTask data) {
Task task = new Task();
task.setJobid(data.getF_job_id());
task.setName(data.getF_component_name());
task.setCreateTime(new DateTime(data.getF_create_time()));
task.setUpdateTime(new DateTime(data.getF_update_time()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,13 @@ public class FateTask {

public static Task convertToEntity(FateTask data) {
Task task = new Task();
// task.setTaskid();
task.setJobid(data.getJob_id());
task.setName(data.getComponent_name());
// task.setDescription();
task.setCreateTime(new DateTime(data.getCreate_time()));
task.setUpdateTime(new DateTime(data.getUpdate_time()));
task.setFinishTime(new DateTime(data.getEnd_time()));
task.setNodeName(data.getComponent_name());
task.setStatus(data.getStatus());
// task.setMessage();
// task.setIsDeleted();
// task.setPrevious();
// task.setNext();
task.setBingingId(data.getTask_id());
// task.setBinding();
return task;
}

Expand Down

0 comments on commit 0264f8e

Please sign in to comment.