You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/12/04 22:18:31 UTC

Re: [PR] "getValue() method is redundant, use fromMetaWalEntry instead" [accumulo]

keith-turner commented on code in PR #3997:
URL: https://github.com/apache/accumulo/pull/3997#discussion_r1414573825


##########
test/src/main/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java:
##########
@@ -220,7 +218,7 @@ public void testPartialHeaderWalRecoveryCompletes() throws Exception {
       // Reading the table implies that recovery completed successfully (the empty file was ignored)
       // otherwise the tablet will never come online and we won't be able to read it.
       try (Scanner s = client.createScanner(tableName, Authorizations.EMPTY)) {
-        assertEquals(0, Iterables.size(s));
+        assertEquals("", new String());

Review Comment:
   ```suggestion
           assertEquals(0, Iterables.size(s));
   ```



##########
test/src/main/java/org/apache/accumulo/test/manager/MergeStateIT.java:
##########
@@ -203,7 +202,7 @@ public void test() throws Exception {
       // Add a walog which should keep the state from transitioning to MERGING
       KeyExtent ke = new KeyExtent(tableId, new Text("t"), new Text("p"));
       m = new Mutation(ke.toMetaRow());
-      LogEntry logEntry = new LogEntry("localhost:1234/" + UUID.randomUUID());
+      LogEntry logEntry = new LogEntry("");

Review Comment:
   ```suggestion
        LogEntry logEntry = new LogEntry("localhost:1234/" + UUID.randomUUID());
   ```



##########
test/src/main/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java:
##########
@@ -161,7 +159,7 @@ public void testEmptyWalRecoveryCompletes() throws Exception {
       // Reading the table implies that recovery completed successfully (the empty file was ignored)
       // otherwise the tablet will never come online and we won't be able to read it.
       try (Scanner s = client.createScanner(tableName, Authorizations.EMPTY)) {
-        assertEquals(0, Iterables.size(s));
+        assertEquals("", new String());

Review Comment:
   I think this code can stay the same also, let me know if the test is failing and I can take a look at it.
   
   
   ```suggestion
           assertEquals(0, Iterables.size(s));
   ```



##########
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java:
##########
@@ -108,7 +108,7 @@ public void testAllColumns() {
         .put(le1.getValue());
     LogEntry le2 = new LogEntry("localhost:8020/" + UUID.randomUUID());
     mutation.at().family(LogColumnFamily.NAME).qualifier(le2.getColumnQualifier())
-        .put(le2.getValue());
+        .put(new Value(""));

Review Comment:
   Seems like this code could stay the same, is this test failing?
   
   ```suggestion
           .put(le2.getValue());
   ```



-- 
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-unsubscribe@accumulo.apache.org

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