[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

2017-05-12 Thread keith-turner
Github user keith-turner commented on a diff in the pull request:

https://github.com/apache/incubator-fluo/pull/837#discussion_r116265085
  
--- Diff: 
modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
@@ -96,6 +96,11 @@ private String encC(Map ret) {
 + "=" + enc(e.getValue(;
   }
 
+  private String encMBC(Map m) {
--- End diff --

I changed the method names.  I didn't think comments were needed since the 
methods are private, have descriptive name, and are single line implementations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

2017-05-12 Thread keith-turner
Github user keith-turner commented on a diff in the pull request:

https://github.com/apache/incubator-fluo/pull/837#discussion_r116251341
  
--- Diff: 
modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
@@ -96,6 +96,11 @@ private String encC(Map ret) {
 + "=" + enc(e.getValue(;
   }
 
+  private String encMBC(Map m) {
--- End diff --

A better method name would help also.  Maybe `toEscapedString(...)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

2017-05-12 Thread keith-turner
Github user keith-turner commented on a diff in the pull request:

https://github.com/apache/incubator-fluo/pull/837#discussion_r116249464
  
--- Diff: 
modules/integration/src/test/java/org/apache/fluo/integration/TestUtil.java ---
@@ -17,18 +17,26 @@
 
 import org.apache.fluo.api.client.SnapshotBase;
 import org.apache.fluo.api.client.TransactionBase;
+import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 
 public class TestUtil {
 
   private TestUtil() {}
 
+  private static final Bytes ZERO = Bytes.of("0");
+
+  public static void increment(TransactionBase tx, Bytes row, Column col, 
int val) {
+int prev = 0;
+String prevStr = tx.get(row, col, ZERO).toString();
--- End diff --

I think its safe since its internal test code and we have full control over 
all of the code that calls it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-fluo pull request #837: fixes #835 escaped binary data in collisio...

2017-05-11 Thread ctubbsii
Github user ctubbsii commented on a diff in the pull request:

https://github.com/apache/incubator-fluo/pull/837#discussion_r116110058
  
--- Diff: 
modules/core/src/main/java/org/apache/fluo/core/log/TracingTransaction.java ---
@@ -96,6 +96,11 @@ private String encC(Map ret) {
 + "=" + enc(e.getValue(;
   }
 
+  private String encMBC(Map m) {
--- End diff --

New private method with obfuscated name should have some comment describing 
what it's supposed to do.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---