[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-08-15 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: (was: HBASE-20821.master.v003.patch)

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
>  Labels: Quota, Space
> Fix For: 3.0.0, 2.1.0
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-08-15 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: HBASE-20821.master.001.patch
HBASE-20821.master.002.patch
HBASE-20821.master.003.patch

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
>  Labels: Quota, Space
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.001.patch, 
> HBASE-20821.master.002.patch, HBASE-20821.master.003.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-08-15 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: (was: HBASE-20821.master.v002.patch)

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
>  Labels: Quota, Space
> Fix For: 3.0.0, 2.1.0
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-08-15 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: (was: HBASE-20821.master.v001patch)

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
>  Labels: Quota, Space
> Fix For: 3.0.0, 2.1.0
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-07-24 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Labels: Quota Space  (was: )

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
>  Labels: Quota, Space
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch, 
> HBASE-20821.master.v002.patch, HBASE-20821.master.v003.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-08 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: HBASE-20821.master.v003.patch

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch, 
> HBASE-20821.master.v002.patch, HBASE-20821.master.v003.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-07 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: HBASE-20821.master.v002.patch

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch, 
> HBASE-20821.master.v002.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-07 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: HBASE-20821.master.v001patch

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch, 
> HBASE-20821.master.v002.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-07 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: (was: HBASE-20821.master.v001patch)

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 3.0.0, 2.1.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch, 
> HBASE-20821.master.v002.patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-07 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Attachment: HBASE-20821.master.v001patch

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Attachments: HBASE-20821.master.v001patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2019-05-07 Thread Shardul Singh (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shardul Singh updated HBASE-20821:
--
Fix Version/s: 2.1.0
   3.0.0
Affects Version/s: 3.0.0
   2.1.0
   Status: Patch Available  (was: Open)

> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 2.1.0, 3.0.0
>Reporter: Nihal Jain
>Assignee: Shardul Singh
>Priority: Major
> Fix For: 3.0.0, 2.1.0
>
> Attachments: HBASE-20821.master.v001patch
>
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> Bytes.toBytes("to"),
> Bytes.toBytes("reject"));
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   // Do puts until we violate space policy
>   final TableName tn = 
> writeUntilNSSpaceViolationAndVerifyViolation(namespace, policy, put);
>   // Now, drop the table
>   TEST_UTIL.deleteTable(tn);
>   LOG.debug("Successfully deleted table ", tn);
>   // Now, drop the namespace
>   TEST_UTIL.getAdmin().deleteNamespace(namespace);
>   LOG.debug("Successfully deleted the namespace ", namespace);
>   // Now re-create the namespace
>   createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
>   LOG.debug("Successfully re-created the namespace ", namespace);
>   TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
>   LOG.debug("Successfully re-created table ", tn);
>   // Put some rows now: should not violate as namespace/quota was dropped
>   verifyNoViolation(policy, tn, put);
> }
> {code}
> *Expected*: SpaceQuota settings should not exist on the newly re-created 
> table and we should be able to put limit less data into the table
> *Actual:* We fail to put data into newly created table as SpaceQuota settings 
> (systematically created due to previously added namespace space quota) exist 
> on table



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2018-06-29 Thread Nihal Jain (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nihal Jain updated HBASE-20821:
---
Description: 
As demonstarted in [^HBASE-20662.master.002.patch] re-creating a dropped 
namespace and contained table inherits previously set space quota settings.

*Steps:*
 * Create a namespace and a table in it
 * Set space quota on namespace
 * Violate namespace quota
 * Drop table and then namespace
 * Re create same namespace and same table
 * Put data into the table (more than the previosuly set namespace quota limit)
{code:java}
private void setQuotaAndThenDropNamespace(final String namespace, 
SpaceViolationPolicy policy)
throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
Bytes.toBytes("reject"));
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  // Do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, drop the table
  TEST_UTIL.deleteTable(tn);
  LOG.debug("Successfully deleted table ", tn);
  // Now, drop the namespace
  TEST_UTIL.getAdmin().deleteNamespace(namespace);
  LOG.debug("Successfully deleted the namespace ", namespace);
  // Now re-create the namespace
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  LOG.debug("Successfully re-created the namespace ", namespace);
  TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
  LOG.debug("Successfully re-created table ", tn);
  // Put some rows now: should not violate as namespace/quota was dropped
  verifyNoViolation(policy, tn, put);
}
{code}

*Expected*: SpaceQuota settings should not exist on the newly re-created table 
and we should be able to put limit less data into the table

*Actual:* We fail to put data into newly created table as SpaceQuota settings 
(systematically created due to previously added namespace space quota) exist on 
table

  was:
As demonstarted in 
[HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
 re-creating a dropped namespace and contained table inherits previously set 
space quota settings.

*Steps*
 * Create a namespace and a table in it
 * Set space quota on namespace
 * Drop table and then namespace
 * Re create same namespace and same table
 * 
{code:java}
private void setQuotaAndThenDropNamespace(final String namespace, 
SpaceViolationPolicy policy)
throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
Bytes.toBytes("reject"));
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  // Do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, drop the table
  TEST_UTIL.deleteTable(tn);
  LOG.debug("Successfully deleted table ", tn);
  // Now, drop the namespace
  TEST_UTIL.getAdmin().deleteNamespace(namespace);
  LOG.debug("Successfully deleted the namespace ", namespace);
  // Now re-create the namespace
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  LOG.debug("Successfully re-created the namespace ", namespace);
  TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
  LOG.debug("Successfully re-created table ", tn);
  // Put some rows now: should not violate as namespace/quota was dropped
  verifyNoViolation(policy, tn, put);
}
{code}

*Expected*: SpaceQuota settings should not exist on the newly re-created table

*Actual:* SpaceQuota settings (systematically created due to previously added 
namespace space quota) exist on table


> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Major
>
> As demonstarted in [^HBASE-20662.master.002.patch] re-creating a dropped 
> namespace and contained table inherits previously set space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the previosuly set namespace quota 
> limit)
> {code:java}
> private void setQuotaAndThenDropNamespace(final String namespace, 
> SpaceViolationPolicy policy)
> throws Exception {
>   Put put = new Put(Bytes.toBytes("to_reject"));
>   put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), 
> 

[jira] [Updated] (HBASE-20821) Re-creating a dropped namespace and contained table inherits previously set space quota settings

2018-06-29 Thread Nihal Jain (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-20821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nihal Jain updated HBASE-20821:
---
Description: 
As demonstarted in 
[HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
 re-creating a dropped namespace and contained table inherits previously set 
space quota settings.

*Steps:*
 * Create a namespace and a table in it
 * Set space quota on namespace
 * Violate namespace quota
 * Drop table and then namespace
 * Re create same namespace and same table
 * Put data into the table (more than the previosuly set namespace quota limit)
{code:java}
private void setQuotaAndThenDropNamespace(final String namespace, 
SpaceViolationPolicy policy)
throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
Bytes.toBytes("reject"));
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  // Do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, drop the table
  TEST_UTIL.deleteTable(tn);
  LOG.debug("Successfully deleted table ", tn);
  // Now, drop the namespace
  TEST_UTIL.getAdmin().deleteNamespace(namespace);
  LOG.debug("Successfully deleted the namespace ", namespace);
  // Now re-create the namespace
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  LOG.debug("Successfully re-created the namespace ", namespace);
  TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
  LOG.debug("Successfully re-created table ", tn);
  // Put some rows now: should not violate as namespace/quota was dropped
  verifyNoViolation(policy, tn, put);
}
{code}

*Expected*: SpaceQuota settings should not exist on the newly re-created table 
and we should be able to put limit less data into the table

*Actual:* We fail to put data into newly created table as SpaceQuota settings 
(systematically created due to previously added namespace space quota) exist on 
table

  was:
As demonstarted in [^HBASE-20662.master.002.patch] re-creating a dropped 
namespace and contained table inherits previously set space quota settings.

*Steps:*
 * Create a namespace and a table in it
 * Set space quota on namespace
 * Violate namespace quota
 * Drop table and then namespace
 * Re create same namespace and same table
 * Put data into the table (more than the previosuly set namespace quota limit)
{code:java}
private void setQuotaAndThenDropNamespace(final String namespace, 
SpaceViolationPolicy policy)
throws Exception {
  Put put = new Put(Bytes.toBytes("to_reject"));
  put.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"),
Bytes.toBytes("reject"));
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  // Do puts until we violate space policy
  final TableName tn = writeUntilNSSpaceViolationAndVerifyViolation(namespace, 
policy, put);
  // Now, drop the table
  TEST_UTIL.deleteTable(tn);
  LOG.debug("Successfully deleted table ", tn);
  // Now, drop the namespace
  TEST_UTIL.getAdmin().deleteNamespace(namespace);
  LOG.debug("Successfully deleted the namespace ", namespace);
  // Now re-create the namespace
  createNamespaceIfNotExist(TEST_UTIL.getAdmin(), namespace);
  LOG.debug("Successfully re-created the namespace ", namespace);
  TEST_UTIL.createTable(tn, Bytes.toBytes(SpaceQuotaHelperForTests.F1));
  LOG.debug("Successfully re-created table ", tn);
  // Put some rows now: should not violate as namespace/quota was dropped
  verifyNoViolation(policy, tn, put);
}
{code}

*Expected*: SpaceQuota settings should not exist on the newly re-created table 
and we should be able to put limit less data into the table

*Actual:* We fail to put data into newly created table as SpaceQuota settings 
(systematically created due to previously added namespace space quota) exist on 
table


> Re-creating a dropped namespace and contained table inherits previously set 
> space quota settings
> 
>
> Key: HBASE-20821
> URL: https://issues.apache.org/jira/browse/HBASE-20821
> Project: HBase
>  Issue Type: Bug
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Major
>
> As demonstarted in 
> [HBASE-20662.master.002.patch|https://issues.apache.org/jira/secure/attachment/12927187/HBASE-20662.master.002.patch]
>  re-creating a dropped namespace and contained table inherits previously set 
> space quota settings.
> *Steps:*
>  * Create a namespace and a table in it
>  * Set space quota on namespace
>  * Violate namespace quota
>  * Drop table and then namespace
>  * Re create same namespace and same table
>  * Put data into the table (more than the