DomGarguilo commented on code in PR #6430:
URL: https://github.com/apache/accumulo/pull/6430#discussion_r3454062059


##########
core/src/main/java/org/apache/accumulo/core/data/Key.java:
##########
@@ -686,11 +684,11 @@ public Key(Key other) {
    * @param tkey Thrift key
    */
   public Key(TKey tkey) {
-    this.row = toBytes(tkey.row);
-    this.colFamily = toBytes(tkey.colFamily);
-    this.colQualifier = toBytes(tkey.colQualifier);
-    this.colVisibility = toBytes(tkey.colVisibility);
-    this.timestamp = tkey.timestamp;
+    this.row = tkey.getRow();

Review Comment:
   ```suggestion
       this.row = ByteBufferUtil.toBytes(tkey.bufferForRow());
   ```
   These 4 fields need the same treatment here



##########
core/src/main/java/org/apache/accumulo/core/data/Mutation.java:
##########
@@ -236,10 +236,10 @@ public Mutation() {}
    * @param tmutation Thrift mutation
    */
   public Mutation(TMutation tmutation) {
-    this.row = ByteBufferUtil.toBytes(tmutation.row);
-    this.data = ByteBufferUtil.toBytes(tmutation.data);
-    this.entries = tmutation.entries;
-    this.values = ByteBufferUtil.toBytesList(tmutation.values);
+    this.row = tmutation.getRow();

Review Comment:
   ```suggestion
       this.row = ByteBufferUtil.toBytes(tmutation.bufferForRow());
   ```
   `row` and `data` need to be handled like this i think



##########
core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java:
##########
@@ -126,9 +125,9 @@ public class Gatherer {
   public Gatherer(ClientContext context, TSummaryRequest request, 
AccumuloConfiguration tableConfig,
       CryptoService cryptoService) {
     this.ctx = context;
-    this.tableId = TableId.of(request.tableId);
-    this.startRow = ByteBufferUtil.toText(request.bounds.startRow);
-    this.endRow = ByteBufferUtil.toText(request.bounds.endRow);
+    this.tableId = TableId.of(request.getTableId());
+    this.startRow = new Text(request.getBounds().getStartRow());

Review Comment:
   also `lowerBound` and upperBound` later on in this file



##########
core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java:
##########
@@ -126,9 +125,9 @@ public class Gatherer {
   public Gatherer(ClientContext context, TSummaryRequest request, 
AccumuloConfiguration tableConfig,
       CryptoService cryptoService) {
     this.ctx = context;
-    this.tableId = TableId.of(request.tableId);
-    this.startRow = ByteBufferUtil.toText(request.bounds.startRow);
-    this.endRow = ByteBufferUtil.toText(request.bounds.endRow);
+    this.tableId = TableId.of(request.getTableId());
+    this.startRow = new Text(request.getBounds().getStartRow());

Review Comment:
   ```suggestion
       this.startRow = 
ByteBufferUtil.toText(request.getBounds().bufferForStartRow());
   ```
   `tableId` and `startRow` should be updated like this



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to