You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -243,7 +251,8 @@ public CompressionDictionaryDataObject(@JsonProperty("keyspace") String keyspace
243
251
@JsonProperty("dict") byte[] dict,
244
252
@JsonProperty("kind") Stringkind,
245
253
@JsonProperty("dictChecksum") intdictChecksum,
246
-
@JsonProperty("dictLength") intdictLength)
254
+
@JsonProperty("dictLength") intdictLength,
255
+
@JsonProperty("createdAt") InstantcreatedAt)
247
256
{
248
257
this.keyspace = keyspace;
249
258
this.table = table;
@@ -253,6 +262,7 @@ public CompressionDictionaryDataObject(@JsonProperty("keyspace") String keyspace
253
262
this.kind = kind;
254
263
this.dictChecksum = dictChecksum;
255
264
this.dictLength = dictLength;
265
+
this.createdAt = createdAt;
256
266
257
267
validate();
258
268
}
@@ -269,6 +279,7 @@ public CompressionDictionaryDataObject(@JsonProperty("keyspace") String keyspace
269
279
* <li>dictLength is bigger than 0</li>
270
280
* <li>dictLength has to be equal to dict's length</li>
271
281
* <li>dictChecksum has to be equal to checksum computed as part of this method</li>
282
+
* <li>creation date is not null</li>
272
283
* </ul>
273
284
*/
274
285
privatevoidvalidate()
@@ -278,15 +289,11 @@ private void validate()
278
289
if (table == null)
279
290
thrownewIllegalArgumentException("Table not specified.");
280
291
if (tableId == null)
281
-
thrownewIllegalArgumentException("Table id not specified");
292
+
thrownewIllegalArgumentException("Table id not specified.");
282
293
if (dictId <= 0)
283
294
thrownewIllegalArgumentException("Provided dictionary id must be positive but it is '" + dictId + "'.");
284
295
if (dict == null || dict.length == 0)
285
296
thrownewIllegalArgumentException("Provided dictionary byte array is null or empty.");
286
-
if (dict.length > FileUtils.ONE_MIB)
287
-
thrownewIllegalArgumentException("Imported dictionary can not be larger than " +
288
-
FileUtils.ONE_MIB + " bytes, but it is " +
289
-
dict.length + " bytes.");
290
297
if (kind == null)
291
298
thrownewIllegalArgumentException("Provided kind is null.");
292
299
@@ -305,6 +312,8 @@ private void validate()
305
312
thrownewIllegalArgumentException("Size has to be strictly positive number, it is '" + dictLength + "'.");
306
313
if (dict.length != dictLength)
307
314
thrownewIllegalArgumentException("The length of the provided dictionary array (" + dict.length + ") is not equal to provided length value (" + dictLength + ").");
315
+
if (createdAt == null)
316
+
thrownewIllegalArgumentException("The creation date not specified.");
0 commit comments