Skip to content

PHOENIX-6386 Bulkload generates unverified index rows - #1144

Closed
stoty wants to merge 2 commits into
apache:masterfrom
stoty:PHOENIX-6386
Closed

PHOENIX-6386 Bulkload generates unverified index rows#1144
stoty wants to merge 2 commits into
apache:masterfrom
stoty:PHOENIX-6386

Conversation

@stoty

Copy link
Copy Markdown
Contributor

No description provided.

@stoty

Copy link
Copy Markdown
ContributorAuthor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 16sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall15m 28smaster passed
+0hbaserecompile22m 44sHBase recompiled.
+1 💚compile1m 6smaster passed
+1 💚checkstyle0m 35smaster passed
+1 💚javadoc0m 52smaster passed
+0 🆗spotbugs3m 6sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall8m 31sthe patch passed
+0hbaserecompile18m 2sHBase recompiled.
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
-1 ❌checkstyle0m 36sphoenix-core: The patch generated 33 new + 138 unchanged - 4 fixed = 171 total (was 142)
-1 ❌whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚javadoc0m 51sthe patch passed
+1 💚spotbugs3m 17sthe patch passed
_ Other Tests _
+1 💚unit237m 17sphoenix-core in the patch passed.
+1 💚asflicense0m 17sThe patch does not generate ASF License warnings.
289m 19s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1144
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 4500104df372 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 34113c5
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
whitespacehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/3/artifact/yetus-general-check/output/whitespace-eol.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/3/testReport/
Max. process+thread count10175 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/3/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasanivirajjasani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left few comments, looks good overall

Comment on lines 194 to 196
for (Cell kv : keyValueList) {
list.add(kv);
cellsForTable.add(kv);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: can be replaced with cellsForTable.addAll(keyValueList)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

Comment on lines +452 to +453
for(int i=0; i < keyValues.size() ; i++) {
Cell kv = keyValues.get(i);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can be replaced by

for (Cell kv : keyValues) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I purposefully chose this construct, as we're processing a lot a objects, and this is reportedly faster and easier on memory / GC.

*
* @param keyValues will be modified
*/
public void setVerfied(List<Cell> keyValues) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: "s/setVerfied/setVerified"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks.

Comment on lines +434 to +437
private byte[] emptyKeyValueCF;
private int emptyKeyValueCFLength;
private byte[] emptyKeyValueQualifier;
private int emptyKeyValueQualifierLength;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: good to mark all final

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

checkIndexTableIsVerfied("TABLE3_IDX");
}

private void checkIndexTableIsVerfied(String indexTableName) throws SQLException, IOException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: "s/checkIndexTableIsVerfied/checkIndexTableIsVerified"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks

Comment on lines +44 to +45
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Result;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Few unused imports, nothing urgent, can be removed while committing changes

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

Comment on lines +191 to +193
if(indexStatusUpdaters[i] != null) {
indexStatusUpdaters[i].setVerfied(keyValueList);
}

@virajjasanivirajjasaniFeb 21, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should solve the problem of verifying index rows right?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Strictly speaking, we are not verifying them, as we're generating the records in bulk, and we assume that they are correct (we assume that the bluk load job runs fully).
We're just setting the status to verified to avoid repairing the freshly generated index rows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it, makes sense

@stotystoty left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks for the thorough review @virajjasani

Comment on lines +44 to +45
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Result;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

checkIndexTableIsVerfied("TABLE3_IDX");
}

private void checkIndexTableIsVerfied(String indexTableName) throws SQLException, IOException {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks

Comment on lines +191 to +193
if(indexStatusUpdaters[i] != null) {
indexStatusUpdaters[i].setVerfied(keyValueList);
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Strictly speaking, we are not verifying them, as we're generating the records in bulk, and we assume that they are correct (we assume that the bluk load job runs fully).
We're just setting the status to verified to avoid repairing the freshly generated index rows.

Comment on lines +434 to +437
private byte[] emptyKeyValueCF;
private int emptyKeyValueCFLength;
private byte[] emptyKeyValueQualifier;
private int emptyKeyValueQualifierLength;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

*
* @param keyValues will be modified
*/
public void setVerfied(List<Cell> keyValues) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks.

Comment on lines +452 to +453
for(int i=0; i < keyValues.size() ; i++) {
Cell kv = keyValues.get(i);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I purposefully chose this construct, as we're processing a lot a objects, and this is reportedly faster and easier on memory / GC.

Comment on lines 194 to 196
for (Cell kv : keyValueList) {
list.add(kv);
cellsForTable.add(kv);
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

OK

@stoty

Copy link
Copy Markdown
ContributorAuthor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 10sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall15m 31smaster passed
+0hbaserecompile22m 5sHBase recompiled.
+1 💚compile1m 7smaster passed
+1 💚checkstyle0m 36smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 6sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall8m 14sthe patch passed
+0hbaserecompile18m 13sHBase recompiled.
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
-1 ❌checkstyle0m 37sphoenix-core: The patch generated 24 new + 138 unchanged - 4 fixed = 162 total (was 142)
-1 ❌whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚javadoc0m 50sthe patch passed
+1 💚spotbugs3m 20sthe patch passed
_ Other Tests _
+1 💚unit107m 14sphoenix-core in the patch passed.
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
158m 44s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1144
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux ea68963707d2 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 34113c5
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
whitespacehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/4/artifact/yetus-general-check/output/whitespace-eol.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/4/testReport/
Max. process+thread count10892 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1144/4/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

Copy link
Copy Markdown
ContributorAuthor

@virajjasani If the changes look good can you add a formal +1 / approved ?

@virajjasanivirajjasani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@stotystoty closed this Feb 22, 2021
@stoty
stoty deleted the PHOENIX-6386 branch July 29, 2021 14:37
Sign up for freeto 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.

2 participants

@stoty@virajjasani