@@ -48,7 +48,7 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
48
48
public static final ParseField MAX_BATCH_SIZE_IN_BYTES = new ParseField ("max_batch_size_in_bytes" );
49
49
public static final ParseField MAX_CONCURRENT_WRITE_BATCHES = new ParseField ("max_concurrent_write_batches" );
50
50
public static final ParseField MAX_WRITE_BUFFER_SIZE = new ParseField ("max_write_buffer_size" );
51
- public static final ParseField RETRY_TIMEOUT = new ParseField ("retry_timeout " );
51
+ public static final ParseField MAX_RETRY_DELAY = new ParseField ("max_retry_delay " );
52
52
public static final ParseField IDLE_SHARD_RETRY_DELAY = new ParseField ("idle_shard_retry_delay" );
53
53
54
54
@ SuppressWarnings ("unchecked" )
@@ -71,8 +71,8 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
71
71
PARSER .declareInt (ConstructingObjectParser .constructorArg (), MAX_CONCURRENT_WRITE_BATCHES );
72
72
PARSER .declareInt (ConstructingObjectParser .constructorArg (), MAX_WRITE_BUFFER_SIZE );
73
73
PARSER .declareField (ConstructingObjectParser .constructorArg (),
74
- (p , c ) -> TimeValue .parseTimeValue (p .text (), RETRY_TIMEOUT .getPreferredName ()),
75
- RETRY_TIMEOUT , ObjectParser .ValueType .STRING );
74
+ (p , c ) -> TimeValue .parseTimeValue (p .text (), MAX_RETRY_DELAY .getPreferredName ()),
75
+ MAX_RETRY_DELAY , ObjectParser .ValueType .STRING );
76
76
PARSER .declareField (ConstructingObjectParser .constructorArg (),
77
77
(p , c ) -> TimeValue .parseTimeValue (p .text (), IDLE_SHARD_RETRY_DELAY .getPreferredName ()),
78
78
IDLE_SHARD_RETRY_DELAY , ObjectParser .ValueType .STRING );
@@ -87,13 +87,13 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
87
87
private final long maxBatchSizeInBytes ;
88
88
private final int maxConcurrentWriteBatches ;
89
89
private final int maxWriteBufferSize ;
90
- private final TimeValue retryTimeout ;
90
+ private final TimeValue maxRetryDelay ;
91
91
private final TimeValue idleShardRetryDelay ;
92
92
private final Map <String , String > headers ;
93
93
94
94
ShardFollowTask (String leaderClusterAlias , ShardId followShardId , ShardId leaderShardId , int maxBatchOperationCount ,
95
95
int maxConcurrentReadBatches , long maxBatchSizeInBytes , int maxConcurrentWriteBatches ,
96
- int maxWriteBufferSize , TimeValue retryTimeout , TimeValue idleShardRetryDelay , Map <String , String > headers ) {
96
+ int maxWriteBufferSize , TimeValue maxRetryDelay , TimeValue idleShardRetryDelay , Map <String , String > headers ) {
97
97
this .leaderClusterAlias = leaderClusterAlias ;
98
98
this .followShardId = followShardId ;
99
99
this .leaderShardId = leaderShardId ;
@@ -102,7 +102,7 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
102
102
this .maxBatchSizeInBytes = maxBatchSizeInBytes ;
103
103
this .maxConcurrentWriteBatches = maxConcurrentWriteBatches ;
104
104
this .maxWriteBufferSize = maxWriteBufferSize ;
105
- this .retryTimeout = retryTimeout ;
105
+ this .maxRetryDelay = maxRetryDelay ;
106
106
this .idleShardRetryDelay = idleShardRetryDelay ;
107
107
this .headers = headers != null ? Collections .unmodifiableMap (headers ) : Collections .emptyMap ();
108
108
}
@@ -116,7 +116,7 @@ public ShardFollowTask(StreamInput in) throws IOException {
116
116
this .maxBatchSizeInBytes = in .readVLong ();
117
117
this .maxConcurrentWriteBatches = in .readVInt ();
118
118
this .maxWriteBufferSize = in .readVInt ();
119
- this .retryTimeout = in .readTimeValue ();
119
+ this .maxRetryDelay = in .readTimeValue ();
120
120
this .idleShardRetryDelay = in .readTimeValue ();
121
121
this .headers = Collections .unmodifiableMap (in .readMap (StreamInput ::readString , StreamInput ::readString ));
122
122
}
@@ -153,8 +153,8 @@ public long getMaxBatchSizeInBytes() {
153
153
return maxBatchSizeInBytes ;
154
154
}
155
155
156
- public TimeValue getRetryTimeout () {
157
- return retryTimeout ;
156
+ public TimeValue getMaxRetryDelay () {
157
+ return maxRetryDelay ;
158
158
}
159
159
160
160
public TimeValue getIdleShardRetryDelay () {
@@ -184,7 +184,7 @@ public void writeTo(StreamOutput out) throws IOException {
184
184
out .writeVLong (maxBatchSizeInBytes );
185
185
out .writeVInt (maxConcurrentWriteBatches );
186
186
out .writeVInt (maxWriteBufferSize );
187
- out .writeTimeValue (retryTimeout );
187
+ out .writeTimeValue (maxRetryDelay );
188
188
out .writeTimeValue (idleShardRetryDelay );
189
189
out .writeMap (headers , StreamOutput ::writeString , StreamOutput ::writeString );
190
190
}
@@ -210,7 +210,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
210
210
builder .field (MAX_BATCH_SIZE_IN_BYTES .getPreferredName (), maxBatchSizeInBytes );
211
211
builder .field (MAX_CONCURRENT_WRITE_BATCHES .getPreferredName (), maxConcurrentWriteBatches );
212
212
builder .field (MAX_WRITE_BUFFER_SIZE .getPreferredName (), maxWriteBufferSize );
213
- builder .field (RETRY_TIMEOUT .getPreferredName (), retryTimeout .getStringRep ());
213
+ builder .field (MAX_RETRY_DELAY .getPreferredName (), maxRetryDelay .getStringRep ());
214
214
builder .field (IDLE_SHARD_RETRY_DELAY .getPreferredName (), idleShardRetryDelay .getStringRep ());
215
215
builder .field (HEADERS .getPreferredName (), headers );
216
216
return builder .endObject ();
@@ -229,15 +229,15 @@ public boolean equals(Object o) {
229
229
maxConcurrentWriteBatches == that .maxConcurrentWriteBatches &&
230
230
maxBatchSizeInBytes == that .maxBatchSizeInBytes &&
231
231
maxWriteBufferSize == that .maxWriteBufferSize &&
232
- Objects .equals (retryTimeout , that .retryTimeout ) &&
232
+ Objects .equals (maxRetryDelay , that .maxRetryDelay ) &&
233
233
Objects .equals (idleShardRetryDelay , that .idleShardRetryDelay ) &&
234
234
Objects .equals (headers , that .headers );
235
235
}
236
236
237
237
@ Override
238
238
public int hashCode () {
239
239
return Objects .hash (leaderClusterAlias , followShardId , leaderShardId , maxBatchOperationCount , maxConcurrentReadBatches ,
240
- maxConcurrentWriteBatches , maxBatchSizeInBytes , maxWriteBufferSize , retryTimeout , idleShardRetryDelay , headers );
240
+ maxConcurrentWriteBatches , maxBatchSizeInBytes , maxWriteBufferSize , maxRetryDelay , idleShardRetryDelay , headers );
241
241
}
242
242
243
243
public String toString () {
0 commit comments