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

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

Closed
wants to merge 5 commits into from

Conversation

skochhar
Copy link
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
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
Contributor Author

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
Contributor Author

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

@@ -18,6 +18,7 @@
package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;
Copy link
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
Contributor Author

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
Contributor Author

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

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 43s master passed
+1 💚 checkstyle 1m 4s master passed
+1 💚 spotbugs 2m 3s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 22s the patch passed
-0 ⚠️ checkstyle 1m 4s hbase-server: The patch generated 4 new + 6 unchanged - 0 fixed = 10 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 11m 14s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 2m 6s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 15s The patch does not generate ASF License warnings.
32m 38s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / afe2eac
checkstyle https://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 count 94 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 4m 15s master passed
+1 💚 compile 1m 3s master passed
+1 💚 shadedjars 5m 51s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 41s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 1s the patch passed
+1 💚 compile 1m 3s the patch passed
+1 💚 javac 1m 3s the patch passed
+1 💚 shadedjars 5m 42s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 39s hbase-server in the patch failed.
_ Other Tests _
+1 💚 unit 128m 50s hbase-server in the patch passed.
154m 47s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / afe2eac
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/testReport/
Max. process+thread count 4296 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 3m 49s master passed
+1 💚 compile 0m 54s master passed
+1 💚 shadedjars 5m 38s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 25s the patch passed
+1 💚 compile 0m 53s the patch passed
+1 💚 javac 0m 53s the patch passed
+1 💚 shadedjars 5m 32s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 35s the patch passed
_ Other Tests _
+1 💚 unit 139m 10s hbase-server in the patch passed.
163m 12s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / afe2eac
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/testReport/
Max. process+thread count 4857 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@infraio
Copy link
Contributor

infraio commented Jul 6, 2020

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?

Copy link
Contributor Author

@skochhar skochhar left a comment

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
Contributor Author

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.

@@ -18,6 +18,7 @@
package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;
Copy link
Contributor Author

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
Contributor Author

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

@@ -18,6 +18,7 @@
package org.apache.hadoop.hbase.namespace;

import java.io.IOException;
import java.util.Set;
Copy link
Contributor Author

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
Copy link
Contributor

infraio commented Jul 9, 2020

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
Contributor Author

skochhar commented Jul 9, 2020

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
Contributor

infraio commented Jul 10, 2020

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
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
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
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
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
Contributor Author

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
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

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 3s master passed
+1 💚 checkstyle 1m 38s master passed
+1 💚 spotbugs 3m 9s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 45s the patch passed
-0 ⚠️ checkstyle 1m 11s hbase-server: The patch generated 1 new + 6 unchanged - 0 fixed = 7 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 12m 28s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 3m 37s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 25s The patch does not generate ASF License warnings.
40m 18s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2505c77
checkstyle https://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 count 84 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 8s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 44s master passed
+1 💚 compile 1m 37s master passed
+1 💚 shadedjars 6m 25s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 27s hbase-client in master failed.
-0 ⚠️ javadoc 0m 40s hbase-server in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 4m 32s the patch passed
+1 💚 compile 1m 38s the patch passed
+1 💚 javac 1m 38s the patch passed
+1 💚 shadedjars 6m 31s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 26s hbase-client in the patch failed.
-0 ⚠️ javadoc 0m 41s hbase-server in the patch failed.
_ Other Tests _
+1 💚 unit 1m 20s hbase-client in the patch passed.
+1 💚 unit 220m 39s hbase-server in the patch passed.
253m 17s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2505c77
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/testReport/
Max. process+thread count 3197 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 10m 51s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
+1 💚 mvninstall 4m 5s master passed
+1 💚 compile 1m 21s master passed
+1 💚 shadedjars 6m 3s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 58s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 47s the patch passed
+1 💚 compile 1m 21s the patch passed
+1 💚 javac 1m 21s the patch passed
+1 💚 shadedjars 6m 3s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 4s the patch passed
_ Other Tests _
+1 💚 unit 1m 8s hbase-client in the patch passed.
+1 💚 unit 219m 55s hbase-server in the patch passed.
259m 23s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2505c77
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/testReport/
Max. process+thread count 2903 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@joshelser joshelser left a comment

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
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
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
Contributor Author

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
Contributor Author

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

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 15s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 31s Maven dependency ordering for branch
+1 💚 mvninstall 3m 53s master passed
+1 💚 checkstyle 1m 40s master passed
+1 💚 spotbugs 3m 7s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 46s the patch passed
-0 ⚠️ checkstyle 0m 28s hbase-client: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
-0 ⚠️ checkstyle 1m 10s hbase-server: The patch generated 3 new + 6 unchanged - 0 fixed = 9 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 12m 20s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 3m 29s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
40m 10s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 16f306b
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-general-check/output/diff-checkstyle-hbase-client.txt
checkstyle https://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 count 84 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@joshelser joshelser left a comment

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

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 37s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 43s master passed
+1 💚 compile 1m 37s master passed
+1 💚 shadedjars 6m 20s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 26s hbase-client in master failed.
-0 ⚠️ javadoc 0m 42s hbase-server in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 4m 33s the patch passed
+1 💚 compile 1m 38s the patch passed
+1 💚 javac 1m 38s the patch passed
+1 💚 shadedjars 6m 21s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 25s hbase-client in the patch failed.
-0 ⚠️ javadoc 0m 41s hbase-server in the patch failed.
_ Other Tests _
+1 💚 unit 1m 25s hbase-client in the patch passed.
+1 💚 unit 199m 59s hbase-server in the patch passed.
234m 0s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 16f306b
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/testReport/
Max. process+thread count 3449 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 27s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for branch
+1 💚 mvninstall 4m 13s master passed
+1 💚 compile 1m 20s master passed
+1 💚 shadedjars 6m 5s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 0s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 3m 44s the patch passed
+1 💚 compile 1m 22s the patch passed
+1 💚 javac 1m 22s the patch passed
+1 💚 shadedjars 7m 20s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 13s the patch passed
_ Other Tests _
+1 💚 unit 1m 27s hbase-client in the patch passed.
+1 💚 unit 202m 55s hbase-server in the patch passed.
234m 45s
Subsystem Report/Notes
Docker Client=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 16f306b
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/testReport/
Max. process+thread count 3575 (vs. ulimit of 12500)
modules C: hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1935/5/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache 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 <[email protected]>
asfgit pushed a commit that referenced this pull request Jul 22, 2020
…licies against contained tables

Closes #1935

Signed-off-by: Josh Elser <[email protected]>
asfgit pushed a commit that referenced this pull request Jul 22, 2020
…licies against contained tables

Closes #1935

Signed-off-by: Josh Elser <[email protected]>
@asfgit asfgit closed this in 8191fbd Jul 22, 2020
clarax pushed a commit to clarax/hbase that referenced this pull request Nov 15, 2020
…licies against contained tables

Closes apache#1935

Signed-off-by: Josh Elser <[email protected]>
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
…licies against contained tables

Closes apache#1935

Author: surbhi
Reason: Bug
Ref: CDPD-15964

Signed-off-by: Josh Elser <[email protected]>

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

Closes apache#1935

Signed-off-by: Josh Elser <[email protected]>
(cherry picked from commit 2c08876)

Change-Id: Id4a8994739618ca9c3c6946e67dccd3009213445
Sign up for free to 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