未验证 提交 bde07d7e 编写于 作者: H Humbertzhang 提交者: GitHub

Fix typo in ProfileTask.java (#5647)

* fix typo in ProfileTask
上级 39815388
......@@ -38,7 +38,7 @@ public class ProfileTaskCommandExecutor implements CommandExecutor {
// build profile task
final ProfileTask profileTask = new ProfileTask();
profileTask.setTaskId(profileTaskCommand.getTaskId());
profileTask.setFistSpanOPName(profileTaskCommand.getEndpointName());
profileTask.setFirstSpanOPName(profileTaskCommand.getEndpointName());
profileTask.setDuration(profileTaskCommand.getDuration());
profileTask.setMinDurationThreshold(profileTaskCommand.getMinDurationThreshold());
profileTask.setThreadDumpPeriod(profileTaskCommand.getDumpPeriod());
......
......@@ -29,7 +29,7 @@ public class ProfileTask {
private String taskId;
// monitor first span operation name
private String fistSpanOPName;
private String firstSpanOPName;
// task duration (minute)
private int duration;
......@@ -49,12 +49,12 @@ public class ProfileTask {
// task create time
private long createTime;
public String getFistSpanOPName() {
return fistSpanOPName;
public String getFirstSpanOPName() {
return firstSpanOPName;
}
public void setFistSpanOPName(String fistSpanOPName) {
this.fistSpanOPName = fistSpanOPName;
public void setFirstSpanOPName(String firstSpanOPName) {
this.firstSpanOPName = firstSpanOPName;
}
public int getDuration() {
......@@ -121,11 +121,11 @@ public class ProfileTask {
return false;
ProfileTask that = (ProfileTask) o;
return duration == that.duration && minDurationThreshold == that.minDurationThreshold && threadDumpPeriod == that.threadDumpPeriod && maxSamplingCount == that.maxSamplingCount && startTime == that.startTime && createTime == that.createTime && taskId
.equals(that.taskId) && fistSpanOPName.equals(that.fistSpanOPName);
.equals(that.taskId) && firstSpanOPName.equals(that.firstSpanOPName);
}
@Override
public int hashCode() {
return Objects.hash(taskId, fistSpanOPName, duration, minDurationThreshold, threadDumpPeriod, maxSamplingCount, startTime, createTime);
return Objects.hash(taskId, firstSpanOPName, duration, minDurationThreshold, threadDumpPeriod, maxSamplingCount, startTime, createTime);
}
}
......@@ -82,7 +82,7 @@ public class ProfileTaskExecutionContext {
}
// check first operation name matches
if (!Objects.equals(task.getFistSpanOPName(), firstSpanOPName)) {
if (!Objects.equals(task.getFirstSpanOPName(), firstSpanOPName)) {
return ProfileStatusReference.createWithNone();
}
......
......@@ -186,7 +186,7 @@ public class ProfileTaskExecutionService implements BootService, TracingThreadLi
*/
private CheckResult checkProfileTaskSuccess(ProfileTask task) {
// endpoint name
if (StringUtil.isEmpty(task.getFistSpanOPName())) {
if (StringUtil.isEmpty(task.getFirstSpanOPName())) {
return new CheckResult(false, "endpoint name cannot be empty");
}
......@@ -234,7 +234,7 @@ public class ProfileTaskExecutionService implements BootService, TracingThreadLi
return new CheckResult(
false,
"there already have processing task in time range, could not add a new task again. processing task monitor endpoint name: "
+ profileTask.getFistSpanOPName()
+ profileTask.getFirstSpanOPName()
);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册