github-advanced-security[bot] commented on code in PR #68:
URL: https://github.com/apache/iotdb-extras/pull/68#discussion_r2079041473
##
iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/config/TaskRuntimeOptions.java:
##
@@ -72,4 +72,20 @@
value = addHomeDir(valueString);
}
};
+
+ public static final Option
EXECUTOR_CRON_HEARTBEAT_EVENT_INTERVAL_SECONDS =
+ new Option("executor_cron_heartbeat_event_interval_seconds", 20L) {
+@Override
+public void setValue(final String valueString) {
+ value = Long.parseLong(valueString);
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/260)
##
iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/processor/ProcessorTask.java:
##
@@ -64,7 +65,9 @@
taskId,
attributes,
TASK_PROCESS_PARALLELISM_NUM.key(),
-TASK_PROCESS_PARALLELISM_NUM.value());
+attributes.containsKey(TASK_PROCESS_PARALLELISM_NUM.key())
+? Integer.parseInt(TASK_PROCESS_PARALLELISM_NUM.key())
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/263)
##
iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/sink/SinkTask.java:
##
@@ -54,7 +54,13 @@
private SinkConsumer[] consumers;
public SinkTask(final String taskId, final Map attributes) {
-super(taskId, attributes, TASK_SINK_PARALLELISM_NUM.key(),
TASK_SINK_PARALLELISM_NUM.value());
+super(
+taskId,
+attributes,
+TASK_SINK_PARALLELISM_NUM.key(),
+attributes.containsKey(TASK_SINK_PARALLELISM_NUM.key())
+? Integer.parseInt(TASK_SINK_PARALLELISM_NUM.key())
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/264)
##
iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/runtime/task/source/SourceTask.java:
##
@@ -43,7 +43,12 @@
final EventCollector processorProducer,
final TaskStateEnum taskState) {
super(
-taskId, attributes, TASK_SOURCE_PARALLELISM_NUM.key(),
TASK_SOURCE_PARALLELISM_NUM.value());
+taskId,
+attributes,
+TASK_SOURCE_PARALLELISM_NUM.key(),
+attributes.containsKey(TASK_SOURCE_PARALLELISM_NUM.key())
+?
Integer.parseInt(attributes.get(TASK_SOURCE_PARALLELISM_NUM.key()))
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/262)
##
iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/config/TaskRuntimeOptions.java:
##
@@ -72,4 +72,20 @@
value = addHomeDir(valueString);
}
};
+
+ public static final Option
EXECUTOR_CRON_HEARTBEAT_EVENT_INTERVAL_SECONDS =
+ new Option("executor_cron_heartbeat_event_interval_seconds", 20L) {
+@Override
+public void setValue(final String valueString) {
+ value = Long.parseLong(valueString);
+}
+ };
+
+ public static final Option TASK_PROGRESS_REPORT_INTERVAL =
+ new Option("task_progress_report_interval", 60) {
+@Override
+public void setValue(String valueString) {
+ value = Integer.parseInt(valueString);
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/iotdb-extras/security/code-scanning/261)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]