27
27
import org .apache .iotdb .commons .client .container .PipeConsensusClientMgrContainer ;
28
28
import org .apache .iotdb .commons .client .sync .SyncPipeConsensusServiceClient ;
29
29
import org .apache .iotdb .commons .consensus .index .ProgressIndex ;
30
+ import org .apache .iotdb .commons .exception .pipe .PipeRuntimeConnectorRetryTimesConfigurableException ;
30
31
import org .apache .iotdb .commons .pipe .config .PipeConfig ;
31
32
import org .apache .iotdb .commons .pipe .connector .payload .pipeconsensus .response .PipeConsensusTransferFilePieceResp ;
32
33
import org .apache .iotdb .commons .pipe .connector .protocol .IoTDBConnector ;
53
54
import org .apache .iotdb .pipe .api .event .Event ;
54
55
import org .apache .iotdb .pipe .api .event .dml .insertion .TabletInsertionEvent ;
55
56
import org .apache .iotdb .pipe .api .event .dml .insertion .TsFileInsertionEvent ;
56
- import org .apache .iotdb .pipe .api .exception .PipeConnectionException ;
57
57
import org .apache .iotdb .pipe .api .exception .PipeException ;
58
58
import org .apache .iotdb .rpc .TSStatusCode ;
59
59
@@ -146,11 +146,11 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc
146
146
pipeConsensusConnectorMetrics .recordRetryWALTransferTimer (duration );
147
147
}
148
148
} catch (final Exception e ) {
149
- throw new PipeConnectionException (
149
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
150
150
String .format (
151
151
"Failed to transfer tablet insertion event %s, because %s." ,
152
152
tabletInsertionEvent , e .getMessage ()),
153
- e );
153
+ Integer . MAX_VALUE );
154
154
}
155
155
}
156
156
@@ -169,11 +169,11 @@ public void transfer(final TsFileInsertionEvent tsFileInsertionEvent) throws Exc
169
169
final long duration = System .nanoTime () - startTime ;
170
170
pipeConsensusConnectorMetrics .recordRetryTsFileTransferTimer (duration );
171
171
} catch (Exception e ) {
172
- throw new PipeConnectionException (
172
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
173
173
String .format (
174
174
"Failed to transfer tsfile insertion event %s, because %s." ,
175
175
tsFileInsertionEvent , e .getMessage ()),
176
- e );
176
+ Integer . MAX_VALUE );
177
177
}
178
178
}
179
179
@@ -215,14 +215,14 @@ private void doTransfer() {
215
215
216
216
tabletBatchBuilder .onSuccess ();
217
217
} catch (final Exception e ) {
218
- throw new PipeConnectionException (
218
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
219
219
String .format (
220
220
PIPE_CONSENSUS_SYNC_CONNECTION_FAILED_FORMAT ,
221
221
getFollowerUrl ().getIp (),
222
222
getFollowerUrl ().getPort (),
223
223
TABLET_BATCH_SCENARIO ,
224
224
e .getMessage ()),
225
- e );
225
+ Integer . MAX_VALUE );
226
226
}
227
227
}
228
228
@@ -265,14 +265,14 @@ private void doTransfer(final PipeDeleteDataNodeEvent pipeDeleteDataNodeEvent)
265
265
progressIndex ,
266
266
thisDataNodeId ));
267
267
} catch (final Exception e ) {
268
- throw new PipeConnectionException (
268
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
269
269
String .format (
270
270
PIPE_CONSENSUS_SYNC_CONNECTION_FAILED_FORMAT ,
271
271
getFollowerUrl ().getIp (),
272
272
getFollowerUrl ().getPort (),
273
273
DELETION_SCENARIO ,
274
274
e .getMessage ()),
275
- e );
275
+ Integer . MAX_VALUE );
276
276
}
277
277
278
278
final TSStatus status = resp .getStatus ();
@@ -344,14 +344,14 @@ private void doTransfer(PipeInsertNodeTabletInsertionEvent pipeInsertNodeTabletI
344
344
thisDataNodeId ));
345
345
}
346
346
} catch (final Exception e ) {
347
- throw new PipeConnectionException (
347
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
348
348
String .format (
349
349
PIPE_CONSENSUS_SYNC_CONNECTION_FAILED_FORMAT ,
350
350
getFollowerUrl ().getIp (),
351
351
getFollowerUrl ().getPort (),
352
352
TABLET_INSERTION_NODE_SCENARIO ,
353
353
e .getMessage ()),
354
- e );
354
+ Integer . MAX_VALUE );
355
355
}
356
356
357
357
final TSStatus status = resp .getStatus ();
@@ -418,14 +418,14 @@ private void doTransfer(final PipeTsFileInsertionEvent pipeTsFileInsertionEvent)
418
418
thisDataNodeId ));
419
419
}
420
420
} catch (final Exception e ) {
421
- throw new PipeConnectionException (
421
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
422
422
String .format (
423
423
PIPE_CONSENSUS_SYNC_CONNECTION_FAILED_FORMAT ,
424
424
getFollowerUrl ().getIp (),
425
425
getFollowerUrl ().getPort (),
426
426
TSFILE_SCENARIO ,
427
427
e .getMessage ()),
428
- e );
428
+ Integer . MAX_VALUE );
429
429
}
430
430
431
431
final TSStatus status = resp .getStatus ();
@@ -483,10 +483,10 @@ protected void transferFilePieces(
483
483
tConsensusGroupId ,
484
484
thisDataNodeId )));
485
485
} catch (Exception e ) {
486
- throw new PipeConnectionException (
486
+ throw new PipeRuntimeConnectorRetryTimesConfigurableException (
487
487
String .format (
488
488
"Network error when transfer file %s, because %s." , file , e .getMessage ()),
489
- e );
489
+ Integer . MAX_VALUE );
490
490
}
491
491
492
492
position += readLength ;
0 commit comments