Skip to content

HBASE-22146 SpaceQuotaViolationPolicy Disable is not working in Names… - #1935

Closed
skochhar wants to merge 5 commits into
apache:masterfrom
skochhar:HBASE-22146Fix
Closed

HBASE-22146 SpaceQuotaViolationPolicy Disable is not working in Names…#1935
skochhar wants to merge 5 commits into
apache:masterfrom
skochhar:HBASE-22146Fix

Conversation

@skochhar

Copy link
Copy Markdown
Contributor

HBASE-22146 SpaceQuotaViolationPolicy Disable is not working in Namespace level

When a namespace space quota is deleted, the namespace quota (q:s) row from hbase:quota table is removed, however the related u:p rows from tables in the namespace still stay. Removing the u:p rows for tables in the namespace to fix this issue.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

}
}
}
doDelete(connection, delete);

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.

What would happen if we get an exception trying to delete a quota? Would it be necessary to retry the operation again?

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.

What would happen if we get an exception trying to delete a quota? Would it be necessary to retry the operation again?

Thanks for reviewing Esteban.

I am doing null checks everywhere to avoid NPEs. I tested this code with a namespace quota on a namespace both without any tables, and with tables and the code worked fine.

I see that in line 282 connection.getAdmin().listTableNamesByNamespace(ns) can throw IOException. I can add try-catch around my new code to avoid the final doDelete() for the namespace getting impacted from any exception in the new code.

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 checked more usages of this method and other files where getAdmin().listTableNamesByNamespace(ns) is used and in case of error they let the calling method handle it and allow the user to decide to retry the operation.

The call for deleteQuotas() also mentions about throwing IOException like other methods:
private static void deleteQuotas(final Connection connection, final byte[] rowKey,
final byte[] qualifier) throws IOException

package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is the only line added in the file, an import statement?

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.

Good catch Sakthi, I will remove the import

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.

Added a new PR where I removed the import

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker 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.
_ master Compile Tests _
+1 💚mvninstall3m 43smaster passed
+1 💚checkstyle1m 4smaster passed
+1 💚spotbugs2m 3smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 22sthe patch passed
-0 ⚠️checkstyle1m 4shbase-server: The patch generated 4 new + 6 unchanged - 0 fixed = 10 total (was 6)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 14sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs2m 6sthe patch passed
_ Other Tests _
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
32m 38s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1935
Optional Testsdupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
unameLinux 9b058ce96e41 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afe2eac
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count94 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 29sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 15smaster passed
+1 💚compile1m 3smaster passed
+1 💚shadedjars5m 51sbranch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 41shbase-server in master failed.
_ Patch Compile Tests _
+1 💚mvninstall4m 1sthe patch passed
+1 💚compile1m 3sthe patch passed
+1 💚javac1m 3sthe patch passed
+1 💚shadedjars5m 42spatch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 39shbase-server in the patch failed.
_ Other Tests _
+1 💚unit128m 50shbase-server in the patch passed.
154m 47s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 72e359bcee4a 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afe2eac
Default Java2020-01-14
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/testReport/
Max. process+thread count4296 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 49smaster passed
+1 💚compile0m 54smaster passed
+1 💚shadedjars5m 38sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 25sthe patch passed
+1 💚compile0m 53sthe patch passed
+1 💚javac0m 53sthe patch passed
+1 💚shadedjars5m 32spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 35sthe patch passed
_ Other Tests _
+1 💚unit139m 10shbase-server in the patch passed.
163m 12s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux e1a0d6d7c6a3 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afe2eac
Default Java1.8.0_232
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/testReport/
Max. process+thread count4857 (vs. ulimit of 12500)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@infraio

Copy link
Copy Markdown
Contributor

HBASE-22146 SpaceQuotaViolationPolicy Disable is not working in Namespace level

When a namespace space quota is deleted, the namespace quota (q:s) row from hbase:quota table is removed, however the related u:p rows from tables in the namespace still stay. Removing the u:p rows for tables in the namespace to fix this issue.

How this fix related to the issue description?

@skochharskochhar 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.

HBASE-22146 SpaceQuotaViolationPolicy Disable is not working in Namespace level
When a namespace space quota is deleted, the namespace quota (q:s) row from hbase:quota table is removed, however the related u:p rows from tables in the namespace still stay. Removing the u:p rows for tables in the namespace to fix this issue.

How this fix related to the issue description?

Thanks for your question Guanghao.

When a new space quota is added on a namespace,

  1. A new row is added to the HBase:quota table with that namespace and column family (q => QUOTA_FAMILY_INFO)
  2. For the tables in the namespace new rows are added to hbase:quota table, these rows have column family:qualifier (u:p ==>QUOTA_FAMILY_USAGE:QUOTA_QUALIFIER_POLICY) and are used to check the table usage.

Lets say a namespace "test" has 2 tables "test:table1" and "test:table2".
And namespace "test" has a space quota on it so you see 3 rows in quota table, the row for the namespace and the usage rows for the tables under the namespace.
Showing you below scan of hbase:quota table with a namespace "test" that has the space quota

hbase(main):006:0> scan 'hbase:quota'
ROW COLUMN+CELL
n.test column=q:s, timestamp=1591306396362, value=PBUF\x1A\x07..
t.test:table1 column=u:p, timestamp=1591304829353, value=\x0A\x04\x08..
t.test:table2 column=u:p, timestamp=1591304829349, value=\x0A\x04\x08..
3 row(s)

list_quotas
OWNER QUOTAS
NAMESPACE => test TYPE => SPACE, NAMESPACE => test, LIMIT => 2.00M, VIOLATION_POLICY => NO_INSERTS

If there is a space violation in this namespace, the space quota disallows you to insert into the tables under the namespace.

When you remove the space quota on the namespace, the namespace row in the hbase:quota table is deleted but the table QUOTA_FAMILY_USAGE column family rows stay and make the user still unable to insert rows into the table even after the space quota on the namespace is removed.

hbase(main):013:0> scan 'hbase:quota'
ROW COLUMN+CELL
t.test:table1 column=u:p, timestamp=1591304829353, value=\x0A\x04\x08..
t.test:table2 column=u:p, timestamp=1591304829349, value=\x0A\x04\x08..

My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed.

We had a customer complain about this issue in Cloudera, so debugged this for them. Even after removing the space quota on their namespace, they were still unable to insert into their tables in the namespace.

I have also added a test case to test this namespace space quota removal now, and the test works with my changes.

}
}
}
doDelete(connection, delete);

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.

What would happen if we get an exception trying to delete a quota? Would it be necessary to retry the operation again?

Thanks for reviewing Esteban.

I am doing null checks everywhere to avoid NPEs. I tested this code with a namespace quota on a namespace both without any tables, and with tables and the code worked fine.

I see that in line 282 connection.getAdmin().listTableNamesByNamespace(ns) can throw IOException. I can add try-catch around my new code to avoid the final doDelete() for the namespace getting impacted from any exception in the new code.

package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;

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.

Good catch Sakthi, I will remove the import

}
}
}
doDelete(connection, delete);

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 checked more usages of this method and other files where getAdmin().listTableNamesByNamespace(ns) is used and in case of error they let the calling method handle it and allow the user to decide to retry the operation.

The call for deleteQuotas() also mentions about throwing IOException like other methods:
private static void deleteQuotas(final Connection connection, final byte[] rowKey,
final byte[] qualifier) throws IOException

package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;

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.

Added a new PR where I removed the import

@infraio

infraio commented Jul 9, 2020

Copy link
Copy Markdown
Contributor

My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed.

Got it. But I thought you should fix the problem not in QuotaUtil class, maybe in MasterQuotaManager? Keep QuotaUtil simple and fix this in upper layer. Thanks.

@skochhar

Copy link
Copy Markdown
ContributorAuthor

My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed.

Got it. But I thought you should fix the problem not in QuotaUtil class, maybe in MasterQuotaManager? Keep QuotaUtil simple and fix this in upper layer. Thanks.

Thanks Guanghao, I had looked at MasterQuotaManager, it in turn calls QuotaUtil.deleteNamespaceQuota(), and there are other classes that also directly call QuotaUtil.deleteNamespaceQuota(). If I make a change only in MasterQuotaManager, other classes that call QuotaUtil.deleteNamespaceQuota() will not get the fix.

@infraio

Copy link
Copy Markdown
Contributor

If I make a change only in MasterQuotaManager, other classes that call QuotaUtil.deleteNamespaceQuota() will not get the fix.

Which class will call this? Clear all related table's quota is not the duty of QuotaUtil.deleteNamespaceQuota(). The upper layer should do this job, call deleteNamespaceQuota first then call deleteTableQuota. Thanks.

//Check if delete qualifier is for persisted space quota snapshot usage column family
if (Arrays.equals(qualifier,QUOTA_QUALIFIER_POLICY)) {
delete.addColumns(QUOTA_FAMILY_USAGE, qualifier);
} else

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing curly-brackets on else-branch

}
if (isNamespaceRowKey(rowKey)) {
//Check namespace is not deleted before you get info about quota and list of tables in namespace
NamespaceDescriptor[] descs = connection.getAdmin().listNamespaceDescriptors();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Beware that this requires ADMIN to list descriptors. This might be increasing the permissions required to modify quotas.

if (namespaceQuota != null && namespaceQuota.hasSpace()) {
TableName[] tableArray = connection.getAdmin().listTableNamesByNamespace(ns);
for (TableName tableName : tableArray) {
deleteQuotas(connection, getTableRowKey(tableName), QUOTA_QUALIFIER_POLICY);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I override the namespace quota with a table-level quota, will this remove my table-level quota too?

e.g. say there is a 10G quota on a namespace, but I further restrict a specific table in that namespace to be 1G. I would expect that my table can only use 1G at most.

@joshelser

Copy link
Copy Markdown
Member

My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed.

But I thought you should fix the problem not in QuotaUtil class, maybe in MasterQuotaManager? Keep QuotaUtil simple and fix this in upper layer.

Thanks for the explanation in #1935 (review), Surbhi. This helps tremendously.

I'm not sure that removing the u:p cell is the correct solution. These columns are just tracking the size of the table. In themselves, they aren't controlling anything (if memory serves). Instead, we should know that when we delete the NamespaceQuota, MasterQuotaManager needs to become aware of this (somehow) and remove any SpaceQuotaViolationPolicies that are in effect.

I suspect your fix does work, but for the wrong reason. If you remove the sizes for these tables, the Master will simply think that the table is no longer in validation. If you have a table-level quota also defined (like I commented in-code), I think this change will incorrectly cause that table-level to not be applied.

@skochhar

Copy link
Copy Markdown
ContributorAuthor

My change removes these QUOTA_FAMILY_USAGE column family for the tables when a namespace quota is deleted and allows the user to insert into the tables in the namespace when the violated space quota is removed.

But I thought you should fix the problem not in QuotaUtil class, maybe in MasterQuotaManager? Keep QuotaUtil simple and fix this in upper layer.

Thanks for the explanation in #1935 (review), Surbhi. This helps tremendously.

I'm not sure that removing the u:p cell is the correct solution. These columns are just tracking the size of the table. In themselves, they aren't controlling anything (if memory serves). Instead, we should know that when we delete the NamespaceQuota, MasterQuotaManager needs to become aware of this (somehow) and remove any SpaceQuotaViolationPolicies that are in effect.

I suspect your fix does work, but for the wrong reason. If you remove the sizes for these tables, the Master will simply think that the table is no longer in validation. If you have a table-level quota also defined (like I commented in-code), I think this change will incorrectly cause that table-level to not be applied.

Thanks Josh, I tested that my fix does not remove any table-level quotas.

If a namespace "test" has 2 tables "test:table1" and "test:table2".
And namespace "test" has a space quota on it and the "test.table1" also has a table-quota on it so you see 4 rows in quota table, the row for the namespace quota, the row for the table quota and the usage rows for the tables under the namespace.
Showing you below scan of hbase:quota table with a namespace "test" and table "test:table1" that has the space quota

hbase(main):015:0> scan 'hbase:quota'
ROW COLUMN+CELL
n.test column=q:s, timestamp=1591306396362, value=PBUF\x1A\x07\x08..
t.test:table1 column=q:s, timestamp=1591274418036, value=PBUF\x1A\x07\x08..
t.test:table1 column=u:p, timestamp=1591306447760, value=\x0A\x04\x08..
t.test:table2 column=u:p, timestamp=1591306447758, value=\x0A\x04\x08..

hbase(main):018:0> list_quotas
OWNER QUOTAS
NAMESPACE => test TYPE => SPACE, NAMESPACE => test, LIMIT => 2.00M, VIOLATION_POLICY => NO_INSERTS
TABLE => test:table1 TYPE => SPACE, TABLE => test:table1, LIMIT => 30.00M, VIOLATION_POLICY => NO_INSERTS
2 row(s)

My fix only removes the column family QUOTA_FAMILY_USAGE(u:p here) for the table and the QUOTA_FAMILY_INFO(q:s here) stay with my fix, so the table-quotas still get applied once the namespace quota is removed.

@joshelser

Copy link
Copy Markdown
Member

I just had a chat with Surbhi and we walked through the code, end to end, talking about her solution here.

tl;dr I'm with her on the solution, barring one exception where we remove the serialized SpaceQuotaSnapshot (column u:p) for a table which had both a namespace quota (now removed) and a table quota. Removing the u:p record when the table quota still applies would result in a RegionServer potentially move a table out of quota violation when it should still remain in violation.

A sketch of how space quotas work again, because I had to remind myself:

  1. RegionServers report Region space utilization to the master
  2. Master holds this in memory, eventually computing table-level and namespace-level utilization.
  3. Master computes whether each table is or is not in violation, and persists that (with usage and limit) into a SpaceQuotaSnapshot (u:p column) for each table.
  4. RegionServers will read these SpaceQuotaSnapshots from hbase:quota and use this to determine whether or not to reject the new Mutations in multi().

That is, when we drop a quota for a namespace, we should clean up all SpaceQuotaSnapshot records in hbase:quota that do not otherwise have a table-level space quota defined on them. for example,

hbase(main):015:0> scan 'hbase:quota'
ROW COLUMN+CELL
n.test column=q:s, timestamp=1591306396362, value=PBUF\x1A\x07\x08..
t.test:table1 column=q:s, timestamp=1591274418036, value=PBUF\x1A\x07\x08..
t.test:table1 column=u:p, timestamp=1591306447760, value=\x0A\x04\x08..
t.test:table2 column=u:p, timestamp=1591306447758, value=\x0A\x04\x08..

when the space quota on namespace test is deleted, we would want to delete t.test:table2 u:p, but we would not want to delete t.test:table1 u:p because there is a quota defined on this table (t.test:table1 q:s).

Normally, QuotaObserverChore (in the master) is pushing new SpaceQuotaSnapshot records into hbase:quota, but this class doesn't handle the cleanup. The method that Surbhi has modified is what MasterQuotaManager is ultimately calling (after a couple of levels of indirection), so making this change inside QuotaUtil appears to be the right thing to me, hiding the complexity of what it means to delete a namespace quota :)

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 19sDocker 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.
_ master Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall4m 3smaster passed
+1 💚checkstyle1m 38smaster passed
+1 💚spotbugs3m 9smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall3m 45sthe patch passed
-0 ⚠️checkstyle1m 11shbase-server: The patch generated 1 new + 6 unchanged - 0 fixed = 7 total (was 6)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 28sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs3m 37sthe patch passed
_ Other Tests _
+1 💚asflicense0m 25sThe patch does not generate ASF License warnings.
40m 18s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1935
Optional Testsdupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
unameLinux 13c674ccd6f9 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 2505c77
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count84 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 8sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall4m 44smaster passed
+1 💚compile1m 37smaster passed
+1 💚shadedjars6m 25sbranch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 27shbase-client in master failed.
-0 ⚠️javadoc0m 40shbase-server in master failed.
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall4m 32sthe patch passed
+1 💚compile1m 38sthe patch passed
+1 💚javac1m 38sthe patch passed
+1 💚shadedjars6m 31spatch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 26shbase-client in the patch failed.
-0 ⚠️javadoc0m 41shbase-server in the patch failed.
_ Other Tests _
+1 💚unit1m 20shbase-client in the patch passed.
+1 💚unit220m 39shbase-server in the patch passed.
253m 17s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 8bb9f794a9cf 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 2505c77
Default Java2020-01-14
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/testReport/
Max. process+thread count3197 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec10m 51sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 24sMaven dependency ordering for branch
+1 💚mvninstall4m 5smaster passed
+1 💚compile1m 21smaster passed
+1 💚shadedjars6m 3sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 58smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall3m 47sthe patch passed
+1 💚compile1m 21sthe patch passed
+1 💚javac1m 21sthe patch passed
+1 💚shadedjars6m 3spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 4sthe patch passed
_ Other Tests _
+1 💚unit1m 8shbase-client in the patch passed.
+1 💚unit219m 55shbase-server in the patch passed.
259m 23s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 8818ecb214cb 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 2505c77
Default Java1.8.0_232
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/testReport/
Max. process+thread count2903 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@joshelserjoshelser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Getting close!

throws IOException {
Scan s = new Scan();
//Get rows for all tables in namespace
s.setRowPrefixFilter(Bytes.toBytes("t." + namespace));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

need the namespace delimiter at the end of your prefix filter, otherwise you'll over-match

e.g. deleting usage for the namespace 'foo' would also end up matching and deleting for the namespace 'foobar'. Making it 't.foo:' should be good enough.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Bonus points if you write a test which demonstrates the bug before you fix it :)

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 Josh for the good catch!

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 added a test to check for the bug, in my test I create 2 namespaces with similar names and tested that the code only deletes the usage columns for the tables in the deleted namespace.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 15sDocker 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.
_ master Compile Tests _
+0 🆗mvndep0m 31sMaven dependency ordering for branch
+1 💚mvninstall3m 53smaster passed
+1 💚checkstyle1m 40smaster passed
+1 💚spotbugs3m 7smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall3m 46sthe patch passed
-0 ⚠️checkstyle0m 28shbase-client: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
-0 ⚠️checkstyle1m 10shbase-server: The patch generated 3 new + 6 unchanged - 0 fixed = 9 total (was 6)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 20sPatch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚spotbugs3m 29sthe patch passed
_ Other Tests _
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
40m 10s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1935
Optional Testsdupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
unameLinux 09cb01171fe1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 16f306b
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-general-check/output/diff-checkstyle-hbase-client.txt
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count84 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@joshelserjoshelser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Excellent changes fixing that last bug, Surbhi!

LGTM.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec2m 37sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall4m 43smaster passed
+1 💚compile1m 37smaster passed
+1 💚shadedjars6m 20sbranch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 26shbase-client in master failed.
-0 ⚠️javadoc0m 42shbase-server in master failed.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall4m 33sthe patch passed
+1 💚compile1m 38sthe patch passed
+1 💚javac1m 38sthe patch passed
+1 💚shadedjars6m 21spatch has no errors when building our shaded downstream artifacts.
-0 ⚠️javadoc0m 25shbase-client in the patch failed.
-0 ⚠️javadoc0m 41shbase-server in the patch failed.
_ Other Tests _
+1 💚unit1m 25shbase-client in the patch passed.
+1 💚unit199m 59shbase-server in the patch passed.
234m 0s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 9de714d8fa26 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 16f306b
Default Java2020-01-14
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt
javadochttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/testReport/
Max. process+thread count3449 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 27sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 23sMaven dependency ordering for branch
+1 💚mvninstall4m 13smaster passed
+1 💚compile1m 20smaster passed
+1 💚shadedjars6m 5sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 0smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall3m 44sthe patch passed
+1 💚compile1m 22sthe patch passed
+1 💚javac1m 22sthe patch passed
+1 💚shadedjars7m 20spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 13sthe patch passed
_ Other Tests _
+1 💚unit1m 27shbase-client in the patch passed.
+1 💚unit202m 55shbase-server in the patch passed.
234m 45s
SubsystemReport/Notes
DockerClient=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#1935
Optional Testsjavac javadoc unit shadedjars compile
unameLinux ec9de4fad3cc 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 16f306b
Default Java1.8.0_232
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/testReport/
Max. process+thread count3575 (vs. ulimit of 12500)
modulesC: hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versionsgit=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

asfgit pushed a commit that referenced this pull request Jul 22, 2020
…licies against contained tables
Closes#1935
Signed-off-by: Josh Elser <elserj@apache.org>
asfgit pushed a commit that referenced this pull request Jul 22, 2020
…licies against contained tables
Closes#1935
Signed-off-by: Josh Elser <elserj@apache.org>
asfgit pushed a commit that referenced this pull request Jul 22, 2020
…licies against contained tables
Closes#1935
Signed-off-by: Josh Elser <elserj@apache.org>
clarax pushed a commit to clarax/hbase that referenced this pull request Nov 15, 2020
…licies against contained tables
Closesapache#1935
Signed-off-by: Josh Elser <elserj@apache.org>
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
…licies against contained tables
Closesapache#1935
Author: surbhi
Reason: Bug
Ref: CDPD-15964
Signed-off-by: Josh Elser <elserj@apache.org>
Change-Id: Id4a8994739618ca9c3c6946e67dccd3009213445
(cherry picked from commit 8f125e0)
wchevreuil pushed a commit to wchevreuil/hbase that referenced this pull request May 24, 2021
…licies against contained tables
Closesapache#1935
Signed-off-by: Josh Elser <elserj@apache.org>
(cherry picked from commit 2c08876)
Change-Id: Id4a8994739618ca9c3c6946e67dccd3009213445
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@skochhar@Apache-HBase@infraio@joshelser@esteban@the-sakthi