You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/11/08 14:59:01 UTC

[GitHub] [accumulo] keith-turner opened a new issue #1417: Remove usage of Text from code creating mutations

keith-turner opened a new issue #1417: Remove usage of Text from code creating mutations
URL: https://github.com/apache/accumulo/issues/1417
 
 
   While working on #1412 I noticed some unnecessary usage of Text in the creations of mutations, like at [InMemoryMapIT.java line 193](https://github.com/apache/accumulo/blob/6b54a5d89aa10103105db1a6c6c88903fcaa90e6/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java#L193).  These usages are historical from a time long ago when mutation only supported text, now it supports charsequence.  
   
   Find and sed w/ a regex could be used like in #1412 to replace calls matching `put(new Text(X), new Text(Y), new Value(Z))` with `put(X,Y,Z)`.  If after doing the replacement things do not compile, one possible reason could be that X,Y,Z are different types like `byte[]` and `String`.  These cases should be caught by the compiler. Maybe these could be manually refactored to use the new `at()` method added to mutation in 2.0 which easily supports mixing of types.
   
   One thing to watch out for in this change is test for mutation that are explicitly testing the mutation methods with text types.  For example may want to checkout MutationTest after making the changes.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services