You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Gary Helmling (JIRA)" <ji...@apache.org> on 2011/09/16 23:56:09 UTC

[jira] [Created] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Provide a means for coprocessors to create tables for internal use
------------------------------------------------------------------

                 Key: HBASE-4424
                 URL: https://issues.apache.org/jira/browse/HBASE-4424
             Project: HBase
          Issue Type: Improvement
          Components: coprocessors
            Reporter: Gary Helmling


When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.

So the simplest approach was to expose createTable() in MasterServices:
{code}
  /**
   * Create a table using the given table definition.
   * @param desc The table definition
   * @param splitKeys Starting row keys for the initial table regions.  If null
   *     a single region is created.
   * @param sync If true, waits for all initial regions to be assigned before
   *     returning
   */
  public void createTable(HTableDescriptor desc, byte [][] splitKeys)
      throws IOException;
{code}

Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.

The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Gary Helmling (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Helmling resolved HBASE-4424.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.92.0
         Assignee: Gary Helmling
     Hadoop Flags: [Reviewed]

Committed to trunk.  Thanks for review, Ted and Andy.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>            Assignee: Gary Helmling
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4424.patch
>
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Gary Helmling (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Helmling updated HBASE-4424:
---------------------------------

    Attachment: HBASE-4424.patch

Patch adding createTable() to MasterServices.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>         Attachments: HBASE-4424.patch
>
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106871#comment-13106871 ] 

Andrew Purtell commented on HBASE-4424:
---------------------------------------

+1 on patch.

Follow up work could be to add a method getTableManager() or similar, with TableManager an internal version of the HBaseAdmin API.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>         Attachments: HBASE-4424.patch
>
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106849#comment-13106849 ] 

Andrew Purtell commented on HBASE-4424:
---------------------------------------

+1

bq. The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment

This has some appeal, but is more than we need to do now. Perhaps a follow up.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106868#comment-13106868 ] 

Ted Yu commented on HBASE-4424:
-------------------------------

+1 on patch.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>         Attachments: HBASE-4424.patch
>
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107028#comment-13107028 ] 

Hudson commented on HBASE-4424:
-------------------------------

Integrated in HBase-TRUNK #2225 (See [https://builds.apache.org/job/HBase-TRUNK/2225/])
    HBASE-4424  Provide coprocessors access to createTable() via MasterServices

garyh : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java


> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>            Assignee: Gary Helmling
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4424.patch
>
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4424) Provide a means for coprocessors to create tables for internal use

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106846#comment-13106846 ] 

Ted Yu commented on HBASE-4424:
-------------------------------

There is already checkTableModifiable() in MasterServices.
Adding one more table related method shouldn't hurt.

> Provide a means for coprocessors to create tables for internal use
> ------------------------------------------------------------------
>
>                 Key: HBASE-4424
>                 URL: https://issues.apache.org/jira/browse/HBASE-4424
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Gary Helmling
>
> When developing access controls as a coprocessor, we needed to create an internal "_acl_" table for persisting the permission grants.  We could have done this in the coprocessor through HBaseAdmin, but it seems silly to go through an RPC loop when we're already implementing a MasterObserver running on HMaster.
> So the simplest approach was to expose createTable() in MasterServices:
> {code}
>   /**
>    * Create a table using the given table definition.
>    * @param desc The table definition
>    * @param splitKeys Starting row keys for the initial table regions.  If null
>    *     a single region is created.
>    * @param sync If true, waits for all initial regions to be assigned before
>    *     returning
>    */
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>       throws IOException;
> {code}
> Other coprocessor implementations will likely have similar needs, so I propose we add this to MasterServices.
> The alternative would be to expose some sort of HBaseAdmin like interface via MasterCoprocessorEnvironment, similar to what we do for HTable, but this would be a fair bit more work, and I still think we'll need a way to provide this capability in the short term.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira