You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2018/02/27 07:15:00 UTC
[jira] [Created] (HBASE-20097) Remove TableDescriptors#getAll since
it just clone the returned object from TableDescriptors#getAllDescriptors
Chia-Ping Tsai created HBASE-20097:
--------------------------------------
Summary: Remove TableDescriptors#getAll since it just clone the returned object from TableDescriptors#getAllDescriptors
Key: HBASE-20097
URL: https://issues.apache.org/jira/browse/HBASE-20097
Project: HBase
Issue Type: Task
Reporter: Chia-Ping Tsai
Assignee: Chia-Ping Tsai
Fix For: 2.0.0
{code:java}
@Override
public Map<String, TableDescriptor> getAll() throws IOException {
Map<String, TableDescriptor> htds = new TreeMap<>();
Map<String, TableDescriptor> allDescriptors = getAllDescriptors();
for (Map.Entry<String, TableDescriptor> entry : allDescriptors
.entrySet()) {
htds.put(entry.getKey(), entry.getValue());
}
return htds;
}{code}
The returned map from #getAllDescriptors isn't a inner object so doing the clone is meaningless.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)