[
https://issues.apache.org/jira/browse/HBASE-11996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14136609#comment-14136609
]
Andrew Purtell commented on HBASE-11996:
----------------------------------------
bq. Just need to initialize a metadata value for "owner" with getCurrentUser()
upon table creation.
We almost already have this, and deprecated...
HTableDescriptor:
{code}
@Deprecated
public void setOwner(User owner) {
setOwnerString(owner != null ? owner.getShortName() : null);
}
// used by admin.rb:alter(table_name,*args) to update owner.
@Deprecated
public void setOwnerString(String ownerString) {
if (ownerString != null) {
setValue(OWNER_KEY, ownerString);
} else {
remove(OWNER_KEY);
}
}
@Deprecated
public String getOwnerString() {
if (getValue(OWNER_KEY) != null) {
return Bytes.toString(getValue(OWNER_KEY));
}
// Note that every table should have an owner (i.e. should have OWNER_KEY
set).
// hbase:meta and -ROOT- should return system user as owner, not null (see
// MasterFileSystem.java:bootstrap()).
return null;
}
{code}
Right now only the AccessController will set OWNER_KEY on the HTD if it is
active when the table is created.
> Add "Table Creator" to the HTD
> ------------------------------
>
> Key: HBASE-11996
> URL: https://issues.apache.org/jira/browse/HBASE-11996
> Project: HBase
> Issue Type: New Feature
> Components: Admin, master, Operability
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Priority: Trivial
> Fix For: 2.0.0, 0.98.7, 0.99.1
>
>
> It will be nice storing the user who created the table. It is useful in
> situations where you want to remove a table but you don't know who asking to.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)