<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Introduction of HBase namespaces into a pre-existing application? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151338#M20430</link>
    <description>&lt;P&gt;Yes, HBase does not have a "use namespace" equivalent. I doubt that we will ever add one, since in most of the cases, the default namespace is the special namespace "default". However, changing an application to use a table in a namespace should be pretty trivial. Make sure that you are using TableName.valueOf() methods properly.   &lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2016 03:37:16 GMT</pubDate>
    <dc:creator>Enis</dc:creator>
    <dc:date>2016-02-23T03:37:16Z</dc:date>
    <item>
      <title>Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151333#M20425</link>
      <description>&lt;P&gt;I've inherited the support role for an application that writes all of its tables to the default namespace in HBase. I'd like to be able to leverage namespaces so that I can manage a centralized instance of HBase that many instances of our application can then be configured/reconfigured to use.&lt;/P&gt;&lt;H4&gt;Questions&lt;/H4&gt;&lt;UL&gt;
&lt;LI&gt;I understand how to use namespaces but was wondering if there was a easy way to facilitate this through HBase/Hadoop on the backend?&lt;/LI&gt;&lt;LI&gt;What's required to use namespaces from our application's standpoint?&lt;/LI&gt;&lt;LI&gt;Can our application simply do a &lt;CODE&gt;"use &amp;lt;namespace&amp;gt;"&lt;/CODE&gt; and from that point be referencing a specific namespace's tables?&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 22 Feb 2016 01:25:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151333#M20425</guid>
      <dc:creator>slm</dc:creator>
      <dc:date>2016-02-22T01:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151334#M20426</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1461/hortonworks.html" nodeid="1461"&gt;@Sam Mingolelli&lt;/A&gt;&lt;/P&gt;&lt;P&gt;namespaces have been available since 0.96 and not very well documented. Here's a scenario I was able to dig up to attempt answering your question. &lt;/P&gt;&lt;P&gt;Step 1: Superuser (e.g. user hbase) creates namespace foo.&lt;/P&gt;&lt;PRE&gt;create_namespace ‘foo’&lt;/PRE&gt;&lt;P&gt;Step 2: Admin gives dba-bar full permissions to the namespace: &lt;/P&gt;&lt;PRE&gt;grant ’dba-bar', 'RWXCA', '@foo’ &lt;/PRE&gt;&lt;P&gt;Note: namespaces are prefixed by @. &lt;/P&gt;&lt;P&gt;Step 3: dba-bar creates tables within the namespace: &lt;/P&gt;&lt;PRE&gt;create ’foo:t1', 'f1’ &lt;/PRE&gt;&lt;P&gt;Step 4: dba-bar hands out permissions to the tables: &lt;/P&gt;&lt;PRE&gt;grant ‘user-x’, ‘RWXCA’, ‘foo:t1’ &lt;/PRE&gt;&lt;P&gt;Note: All users will be able to see namespaces and tables within namespaces, but not the data.&lt;/P&gt;&lt;P&gt;The next best source of information would be the umbrela Jira for namespaces &lt;A href="https://issues.apache.org/jira/browse/HBASE-8015" target="_blank"&gt;https://issues.apache.org/jira/browse/HBASE-8015&lt;/A&gt;. It has a design document in PDF form &lt;A href="https://issues.apache.org/jira/secure/attachment/12580245/Namespace%20Design.pdf" target="_blank"&gt;https://issues.apache.org/jira/secure/attachment/12580245/Namespace%20Design.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Outside of that, please feel free to read the namespace source code or unit tests &lt;A href="https://github.com/apache/hbase/blob/master/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java" target="_blank"&gt;https://github.com/apache/hbase/blob/master/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java&lt;/A&gt;. Bottom line, to use namespaces see above, to make your current application compliant with namespaces, change the code to point to the tables within namespaces, I already suggested to use Clone Snapshot and Export Snapshot tools or write Mapreduce to export/import into new table within a new namespace. I will escalate this to our docs team to have a better document as it's obvious people are starting to use this. I would've pointed you to our docs if we had that info, that's why I sent you stack overflow link as this question has not come up before. Finally, if at some point you will want to grant authorization to namespaces using Ranger, here's a thread for that &lt;A href="https://community.hortonworks.com/questions/17764/ranger-hbase-namespace.html" target="_blank"&gt;https://community.hortonworks.com/questions/17764/ranger-hbase-namespace.html&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 09:39:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151334#M20426</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-22T09:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151335#M20427</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/372/enis.html" nodeid="372"&gt;@Enis&lt;/A&gt;&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/412/ddas.html" nodeid="412"&gt;@Devaraj Das&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/223/jelser.html" nodeid="223"&gt;@Josh Elser&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 09:40:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151335#M20427</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-22T09:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151336#M20428</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thank you, this is a much more substantial answer to what I was looking for. In reviewing this material and in my previous researching it does not look like there's any method available via the hbase-site.xml file or top level command where you can specify a default namespace wrt client calls. So our only recourse looks to be to modify our application so that it explicitly calls out &amp;lt;ns&amp;gt;.&amp;lt;table&amp;gt; instead of what it's doing now. I was hopeful there was something along the lines of a `use &amp;lt;ns&amp;gt;` type of operation that I could utilize to "pin" our application's calls to HBase tables to a specific namespace, but that doesn't seem to be the case. At any rate I appreciate your time and look forward to some more thorough docs around namespaces.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 11:44:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151336#M20428</guid>
      <dc:creator>slm</dc:creator>
      <dc:date>2016-02-22T11:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151337#M20429</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1461/hortonworks.html" nodeid="1461"&gt;@Sam Mingolelli&lt;/A&gt;, namespaces are indeed poorly documented. Here is a list of hbase shell commands you can use:&lt;/P&gt;&lt;PRE&gt;alter_namespace, create_namespace, describe_namespace, 
drop_namespace, list_namespace, list_namespace_tables&lt;/PRE&gt;&lt;P&gt;The first 4 are self-explanatory. With list_namespace you can list all available namespaces. The system namespace is now called "hbase" and tables without namespace all go to the "default" namespace. With "list_namespace_tables &amp;lt;namespace&amp;gt;" you can list tables in a given namespace. After that you can reference created tables by 'namespace:table', note that a semicolon is used as the delimiter, not a dot like in the design document.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:44:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151337#M20429</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-02-22T14:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Introduction of HBase namespaces into a pre-existing application?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151338#M20430</link>
      <description>&lt;P&gt;Yes, HBase does not have a "use namespace" equivalent. I doubt that we will ever add one, since in most of the cases, the default namespace is the special namespace "default". However, changing an application to use a table in a namespace should be pretty trivial. Make sure that you are using TableName.valueOf() methods properly.   &lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 03:37:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Introduction-of-HBase-namespaces-into-a-pre-existing/m-p/151338#M20430</guid>
      <dc:creator>Enis</dc:creator>
      <dc:date>2016-02-23T03:37:16Z</dc:date>
    </item>
  </channel>
</rss>

