kevinrr888 commented on code in PR #5740:
URL: https://github.com/apache/accumulo/pull/5740#discussion_r2216890985


##########
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java:
##########
@@ -114,9 +135,24 @@ public void testAllColumns() {
     FateId fateId1 = FateId.from(type, UUID.randomUUID());
     FateId fateId2 = FateId.from(type, UUID.randomUUID());
 
+    mutation.put(MetadataSchema.TabletsSection.CompactedColumnFamily.STR_NAME, 
fateId1.canonical(),
+        "");
+
     DIRECTORY_COLUMN.put(mutation, new Value("t-0001757"));
     FLUSH_COLUMN.put(mutation, new Value("6"));
     TIME_COLUMN.put(mutation, new Value("M123456789"));
+    Value opidValue = new 
Value("SPLITTING:FATE:META:12345678-9abc-def1-2345-6789abcdef12");
+    OPID_COLUMN.put(mutation, opidValue);

Review Comment:
   Same comment here



##########
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java:
##########
@@ -114,9 +135,24 @@ public void testAllColumns() {
     FateId fateId1 = FateId.from(type, UUID.randomUUID());
     FateId fateId2 = FateId.from(type, UUID.randomUUID());
 
+    mutation.put(MetadataSchema.TabletsSection.CompactedColumnFamily.STR_NAME, 
fateId1.canonical(),
+        "");
+
     DIRECTORY_COLUMN.put(mutation, new Value("t-0001757"));
     FLUSH_COLUMN.put(mutation, new Value("6"));
     TIME_COLUMN.put(mutation, new Value("M123456789"));
+    Value opidValue = new 
Value("SPLITTING:FATE:META:12345678-9abc-def1-2345-6789abcdef12");
+    OPID_COLUMN.put(mutation, opidValue);
+    Path selectedPath =
+        new 
Path("hdfs://nn.somewhere.com:86753/accumulo/tables/42/t-0000/F00001.rf");
+    SELECTED_COLUMN.put(mutation,
+        new Value(new SelectedFiles(Set.of(new 
ReferencedTabletFile(selectedPath).insert()), true,
+            fateId1, SteadyTime.from(100, 
TimeUnit.NANOSECONDS)).getMetadataValue()));
+    AVAILABILITY_COLUMN.put(mutation, 
TabletAvailabilityUtil.toValue(TabletAvailability.ONDEMAND));
+    Value mergeabilityValue = new 
Value("{\"delay\":1,\"steadyTime\":1,\"never\"=false}");
+    MERGEABILITY_COLUMN.put(mutation, mergeabilityValue);
+    TabletMergeabilityMetadata mergeability =
+        TabletMergeabilityMetadata.fromValue(mergeabilityValue);

Review Comment:
   With my mergeability comment, I meant something more like:
   
   ```
   TabletMergeabilityMetadata tmm = 
TabletMergeabilityMetadata.toMetadata(TabletMergeability.after(Duration.ofMinutes(3)),
 SteadyTime.from(Duration.ofMinutes(1)));
   MERGEABILITY_COLUMN.put(mutation, new Value(tmm));
   ```
   Then comparing 
   `tm.getTabletMergeability()` to `tmm`
   
   This code is currently relying on the internal json representation which may 
change



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to