You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "yschengzi (via GitHub)" <gi...@apache.org> on 2023/06/12 09:48:30 UTC
[GitHub] [iotdb] yschengzi opened a new pull request, #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
yschengzi opened a new pull request, #10131:
URL: https://github.com/apache/iotdb/pull/10131
This PR contains:
- add exception messages when meeting PipeConnectorCriticalException
- fix checking customize value range
- fix checking historical date format
- add regionId in env
- filter data by database in PipeDoNothingProcessor
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] SteveYurongSu commented on a diff in pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #10131:
URL: https://github.com/apache/iotdb/pull/10131#discussion_r1226901834
##########
server/src/main/java/org/apache/iotdb/db/pipe/collector/realtime/PipeRealtimeDataRegionCollector.java:
##########
@@ -50,7 +50,7 @@ public void customize(PipeParameters parameters, PipeCollectorRuntimeConfigurati
final PipeTaskCollectorRuntimeEnvironment environment =
(PipeTaskCollectorRuntimeEnvironment) configuration.getRuntimeEnvironment();
- dataRegionId = String.valueOf(environment.getRegionId());
+ dataRegionId = String.valueOf(environment.getRegionId().getId());
Review Comment:
Is String.valueOf unnecessary or not?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] SteveYurongSu commented on a diff in pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #10131:
URL: https://github.com/apache/iotdb/pull/10131#discussion_r1226964379
##########
server/src/main/java/org/apache/iotdb/db/pipe/processor/PipeDoNothingProcessor.java:
##########
@@ -44,17 +49,22 @@ public void validate(PipeParameterValidator validator) {
@Override
public void customize(
PipeParameters parameters, PipeProcessorRuntimeConfiguration configuration) {
- // do nothing
+ database =
+ StorageEngine.getInstance()
+ .getDataRegion(
+ (DataRegionId)
+ ConsensusGroupId.Factory.createFromTConsensusGroupId(
+ ((PipeTaskRuntimeEnvironment) configuration.getRuntimeEnvironment())
+ .getRegionId()))
+ .getDatabaseName();
}
@Override
public void process(TabletInsertionEvent tabletInsertionEvent, EventCollector eventCollector)
throws IOException {
if (tabletInsertionEvent instanceof EnrichedEvent) {
final EnrichedEvent enrichedEvent = (EnrichedEvent) tabletInsertionEvent;
- if (enrichedEvent
- .getPattern()
- .equals(PipeCollectorConstant.COLLECTOR_PATTERN_DEFAULT_VALUE)) {
+ if (enrichedEvent.getPattern().equals(database)) {
Review Comment:
if (database.startsWith(enrichedEvent.getPattern())) ?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check [iotdb]
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu closed pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
URL: https://github.com/apache/iotdb/pull/10131
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] SteveYurongSu commented on a diff in pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #10131:
URL: https://github.com/apache/iotdb/pull/10131#discussion_r1226964622
##########
server/src/main/java/org/apache/iotdb/db/pipe/processor/PipeDoNothingProcessor.java:
##########
@@ -86,8 +96,7 @@ public void process(TsFileInsertionEvent tsFileInsertionEvent, EventCollector ev
if (tsFileInsertionEvent instanceof PipeTsFileInsertionEvent) {
final PipeTsFileInsertionEvent enrichedEvent =
(PipeTsFileInsertionEvent) tsFileInsertionEvent;
- if (enrichedEvent.getPattern().equals(PipeCollectorConstant.COLLECTOR_PATTERN_DEFAULT_VALUE)
- && !enrichedEvent.hasTimeFilter()) {
+ if (enrichedEvent.getPattern().equals(database) && !enrichedEvent.hasTimeFilter()) {
Review Comment:
if (database.startsWith(enrichedEvent.getPattern())) ?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] yschengzi commented on a diff in pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
Posted by "yschengzi (via GitHub)" <gi...@apache.org>.
yschengzi commented on code in PR #10131:
URL: https://github.com/apache/iotdb/pull/10131#discussion_r1227454906
##########
server/src/main/java/org/apache/iotdb/db/pipe/processor/PipeDoNothingProcessor.java:
##########
@@ -44,17 +49,22 @@ public void validate(PipeParameterValidator validator) {
@Override
public void customize(
PipeParameters parameters, PipeProcessorRuntimeConfiguration configuration) {
- // do nothing
+ database =
+ StorageEngine.getInstance()
+ .getDataRegion(
+ (DataRegionId)
+ ConsensusGroupId.Factory.createFromTConsensusGroupId(
+ ((PipeTaskRuntimeEnvironment) configuration.getRuntimeEnvironment())
+ .getRegionId()))
+ .getDatabaseName();
}
@Override
public void process(TabletInsertionEvent tabletInsertionEvent, EventCollector eventCollector)
throws IOException {
if (tabletInsertionEvent instanceof EnrichedEvent) {
final EnrichedEvent enrichedEvent = (EnrichedEvent) tabletInsertionEvent;
- if (enrichedEvent
- .getPattern()
- .equals(PipeCollectorConstant.COLLECTOR_PATTERN_DEFAULT_VALUE)) {
+ if (enrichedEvent.getPattern().equals(database)) {
Review Comment:
I will fix it.
##########
server/src/main/java/org/apache/iotdb/db/pipe/processor/PipeDoNothingProcessor.java:
##########
@@ -86,8 +96,7 @@ public void process(TsFileInsertionEvent tsFileInsertionEvent, EventCollector ev
if (tsFileInsertionEvent instanceof PipeTsFileInsertionEvent) {
final PipeTsFileInsertionEvent enrichedEvent =
(PipeTsFileInsertionEvent) tsFileInsertionEvent;
- if (enrichedEvent.getPattern().equals(PipeCollectorConstant.COLLECTOR_PATTERN_DEFAULT_VALUE)
- && !enrichedEvent.hasTimeFilter()) {
+ if (enrichedEvent.getPattern().equals(database) && !enrichedEvent.hasTimeFilter()) {
Review Comment:
I will fix it.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] yschengzi commented on a diff in pull request #10131: [IOTDB-5987] Pipe: Add exception messages, check customize value range, historical date format check
Posted by "yschengzi (via GitHub)" <gi...@apache.org>.
yschengzi commented on code in PR #10131:
URL: https://github.com/apache/iotdb/pull/10131#discussion_r1227452850
##########
server/src/main/java/org/apache/iotdb/db/pipe/collector/realtime/PipeRealtimeDataRegionCollector.java:
##########
@@ -50,7 +50,7 @@ public void customize(PipeParameters parameters, PipeCollectorRuntimeConfigurati
final PipeTaskCollectorRuntimeEnvironment environment =
(PipeTaskCollectorRuntimeEnvironment) configuration.getRuntimeEnvironment();
- dataRegionId = String.valueOf(environment.getRegionId());
+ dataRegionId = String.valueOf(environment.getRegionId().getId());
Review Comment:
Necessary, because DataRegion's reserved member variables are of type string
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org