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

Fix typo in ProfileTask.java (#5647)

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