Caideyipi commented on code in PR #15644:
URL: https://github.com/apache/iotdb/pull/15644#discussion_r2128324597
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/connection/PipeEventCollector.java:
##########
@@ -144,32 +141,9 @@ private void parseAndCollectEvent(final
PipeTsFileInsertionEvent sourceEvent) th
}
try {
- final Iterable<TabletInsertionEvent> iterable =
sourceEvent.toTabletInsertionEvents();
- final Iterator<TabletInsertionEvent> iterator = iterable.iterator();
- while (iterator.hasNext()) {
- final TabletInsertionEvent parsedEvent = iterator.next();
- int retryCount = 0;
- while (true) {
- try {
- collectParsedRawTableEvent((PipeRawTabletInsertionEvent)
parsedEvent);
- break;
- } catch (final PipeRuntimeOutOfMemoryCriticalException e) {
- if (retryCount++ % 100 == 0) {
- LOGGER.warn(
- "parseAndCollectEvent: failed to allocate memory for parsing
TsFile {}, retry count is {}, will keep retrying.",
- sourceEvent.getTsFile(),
- retryCount,
- e);
- } else if (LOGGER.isDebugEnabled()) {
- LOGGER.debug(
- "parseAndCollectEvent: failed to allocate memory for parsing
TsFile {}, retry count is {}, will keep retrying.",
- sourceEvent.getTsFile(),
- retryCount,
- e);
- }
- }
- }
- }
+ sourceEvent.consumeTabletInsertionEventsWithRetry(
+ this::collectParsedRawTableEvent,
+ this.getClass().getSimpleName() + "::parseAndCollectEvent");
Review Comment:
Better use a "static final" variable instead of compute this string each
time...
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/downsampling/DownSamplingProcessor.java:
##########
@@ -45,6 +48,7 @@
import static
org.apache.iotdb.commons.pipe.config.constant.PipeProcessorConstant.PROCESSOR_DOWN_SAMPLING_SPLIT_FILE_KEY;
public abstract class DownSamplingProcessor implements PipeProcessor {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(DownSamplingProcessor.class);
Review Comment:
Is this used?
--
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]