Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #835 escaped binary data in collision logging #837

Merged
merged 1 commit into from
May 17, 2017

Conversation

keith-turner
Copy link
Contributor

No description provided.

@@ -96,6 +96,11 @@ private String encC(Map<Column, Bytes> ret) {
+ "=" + enc(e.getValue())));
}

private String encMBC(Map<Bytes, Set<Column>> m) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


public static void increment(TransactionBase tx, Bytes row, Column col, int val) {
int prev = 0;
String prevStr = tx.get(row, col, ZERO).toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to call toString here on arbitrary bytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@asfgit asfgit merged commit 6a05f6c into apache:master May 17, 2017
@keith-turner keith-turner deleted the fluo-835 branch June 12, 2017 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants