You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "EdColeman (via GitHub)" <gi...@apache.org> on 2024/01/25 19:49:49 UTC

[PR] clean up some AddressUtil usages [accumulo]

EdColeman opened a new pull request, #4194:
URL: https://github.com/apache/accumulo/pull/4194

   This is a follow-on to suggestion made in PR #4185.
   
    - names methods fromDfsFileFormat and toDfsFileFormat with documentation.
    - replaces calls that where using string.replace with appropriate method.
   
   The replace calls were easy to find, but the are likely other places where the ':' to '+' substitutions are occurring and they can be fixed later.
   


-- 
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


Re: [PR] clean up some AddressUtil usages [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on code in PR #4194:
URL: https://github.com/apache/accumulo/pull/4194#discussion_r1467114407


##########
core/src/test/java/org/apache/accumulo/core/tabletserver/log/LogEntryTest.java:
##########
@@ -64,7 +63,7 @@ public void testFromMetadata() {
   private void verifyLogEntry(LogEntry logEntry, Text expectedColumnQualifier) {
     assertEquals(validPath, logEntry.toString());
     assertEquals(validPath, logEntry.getPath());
-    assertEquals(HostAndPort.fromString(validHost.replace('+', ':')), logEntry.getTServer());
+    assertEquals(AddressUtil.parseAddress(validHost), logEntry.getTServer());

Review Comment:
   I think this one might be okay to leave alone... that way the test validates the conversion is being done. With this change, it merely validates that it's consistent with AddressUtil... but AddressUtil could be wrongly used, and this would go undetected. It's probably best to keep the lower-level conversion in the test, so it's not dependent on the AddressUtil behavior.



-- 
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


Re: [PR] clean up some AddressUtil usages [accumulo]

Posted by "EdColeman (via GitHub)" <gi...@apache.org>.
EdColeman commented on code in PR #4194:
URL: https://github.com/apache/accumulo/pull/4194#discussion_r1467166005


##########
core/src/test/java/org/apache/accumulo/core/tabletserver/log/LogEntryTest.java:
##########
@@ -64,7 +63,7 @@ public void testFromMetadata() {
   private void verifyLogEntry(LogEntry logEntry, Text expectedColumnQualifier) {
     assertEquals(validPath, logEntry.toString());
     assertEquals(validPath, logEntry.getPath());
-    assertEquals(HostAndPort.fromString(validHost.replace('+', ':')), logEntry.getTServer());
+    assertEquals(AddressUtil.parseAddress(validHost), logEntry.getTServer());

Review Comment:
   Reverted in 952b4f4b4e



-- 
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


Re: [PR] clean up some AddressUtil usages [accumulo]

Posted by "EdColeman (via GitHub)" <gi...@apache.org>.
EdColeman commented on PR #4194:
URL: https://github.com/apache/accumulo/pull/4194#issuecomment-1911285693

   The primary driver for this change was to get it documented why the `:` and `+` conversion is being used.  I suspect that if we can change places where we use strings, but could use HostAndPort, the other locations will be uncovered / changed.


-- 
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