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 #867 - Stream support for Scanners #884

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

cjmctague
Copy link
Contributor

No description provided.

this.age = a;
this.id = id;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Since these are being placed in a set, also need to implement equals method.

expected.add(new Person("Hulk", "Hogan", 60, 55234234));

Assert.assertEquals(expected.hashCode(), people.hashCode());
Assert.assertEquals(expected.size(), people.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

After adding a equals method to the Person type , you can replace these two checks with :

  Assert.assertEquals(expected, people);

colsVal.add(new ColumnValue(new Column("f1", "q2"), Bytes.of("v4")));
colsVal.add(new ColumnValue(new Column("f2", "q5"), Bytes.of("v5")));

ColumnScanner colScanStream = new ColumnScannerImpl(row, colsVal);
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I would not have Stream in this var name. Could call it scanner of colScanner

rowCols.stream().filter(rcv -> rcv.getColumn().getsFamily().equals("f2"))
.collect(Collectors.toSet());
cellScanStream.stream().filter(rcv -> rcv.getColumn().getsFamily().equals("f2"))
.collect(Collectors.toSet());
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing is done with the sets created by the two stream operations above.

@keith-turner keith-turner merged commit 2f11089 into apache:master Jul 25, 2017
@cjmctague cjmctague deleted the fluo-867 branch August 9, 2017 15:22
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.

3 participants