Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.M2
    • Component/s: HBase
    • Labels:
      None

      Description

      HBase is an open source implementation of the BigTable - Google's column store. It's an Apache project and is the integral part of the hadoop family of projects.
      (http://hadoop.apache.org/hbase/)

      Hbase is gaining popularity very fast. Like we have DataSources, Connection Pools and Templates for other persistence technologies, we have written similar classes for Hbase.
      HBaseConfigurationFactoryBean
      HBaseCallback
      HBaseTemplate

      (I am attaching the files with this issue. I can create patch if required.)

      Here is how one would configure HBase data access beans in their applicationContext-hbase.xml

          <bean id="hbaseTemplate" class="com.gumgum.hbase.HBaseTemplate">
              <constructor-arg ref="hTablePool"/>
          </bean>
      
          <bean id="hbaseConfiguration" class="com.gumgum.hbase.HBaseConfigurationFactoryBean">
              <property name="hbaseMaster" value="${hbase.master}"/>
          </bean>
      
          <bean id="hTablePool" class="org.apache.hadoop.hbase.client.HTablePool">
              <constructor-arg ref="hbaseConfiguration"/>
              <constructor-arg value="${hbase.htable.pool.size}"/>
          </bean>
      

      It will be nice if you could include these classes in Spring-DA so that all the spring community using hbase will be benefited.

      These classes are based on Hbase 0.20 which is about to release soon.

      1. HBaseCallback.java
        0.6 kB
        Vaibhav Puranik
      2. HBaseConfigurationFactoryBean.java
        2 kB
        Vaibhav Puranik
      3. HBaseConfigurationFactoryBean.java
        2 kB
        Vaibhav Puranik
      4. HBaseConfigurationFactoryBean.java
        1 kB
        Vaibhav Puranik
      5. HBaseTemplate.java
        2 kB
        Vaibhav Puranik
      6. HBaseTemplate.java
        2 kB
        Vaibhav Puranik
      7. HBaseTemplate.java
        1 kB
        Vaibhav Puranik
      8. RowCallback.java
        0.6 kB
        Vaibhav Puranik
      9. TableCallback.java
        0.6 kB
        Vaibhav Puranik
      10. TableCallback.java
        0.6 kB
        Vaibhav Puranik

        Activity

        Hide
        Costin Leau added a comment -

        Guys, support for HBase has been added to Spring for Hadoop project - initially on a branch which has been merged into main some days ago [1]. It covers the areas mentioned in this issue and more.
        Do take a look, take it for a spin and let us know what missing - feedback and contributions welcome.

        Cheers,

        [1] https://github.com/SpringSource/spring-hadoop/tree/master/src/main/java/org/springframework/data/hadoop/hbase

        Show
        Costin Leau added a comment - Guys, support for HBase has been added to Spring for Hadoop project - initially on a branch which has been merged into main some days ago [1] . It covers the areas mentioned in this issue and more. Do take a look, take it for a spin and let us know what missing - feedback and contributions welcome. Cheers, [1] https://github.com/SpringSource/spring-hadoop/tree/master/src/main/java/org/springframework/data/hadoop/hbase
        Hide
        Costin Leau added a comment -

        Everyone, I've moved the issue under Spring for Apache Hadoop project.

        Show
        Costin Leau added a comment - Everyone, I've moved the issue under Spring for Apache Hadoop project.
        Hide
        Mark Pollack added a comment -

        Few comments on the code as it now sits in spring-hadoop

        1. Change the name to use HBaseTemplate and not with lowercase 'b'. This agrees with API naming of HBase itself in http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/package-summary.html
        2. Add an interface, HBaseOperations, as with other templates to support easier mocking
        3. Naming of methods, 'execute' methods should take a callback, but in there are a few in this class that take ResultsExtractor. I think a series of method naming conventions such as findWithRowMapper or findWithResultsExtractor would make the API easier to navigate I think.

        Show
        Mark Pollack added a comment - Few comments on the code as it now sits in spring-hadoop 1. Change the name to use HBaseTemplate and not with lowercase 'b'. This agrees with API naming of HBase itself in http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/package-summary.html 2. Add an interface, HBaseOperations, as with other templates to support easier mocking 3. Naming of methods, 'execute' methods should take a callback, but in there are a few in this class that take ResultsExtractor. I think a series of method naming conventions such as findWithRowMapper or findWithResultsExtractor would make the API easier to navigate I think.
        Hide
        Deejay added a comment -

        Are there any plans to write a supporting blog post explaining how to use this?

        Show
        Deejay added a comment - Are there any plans to write a supporting blog post explaining how to use this?
        Hide
        Costin Leau added a comment -

        Support available in M2. Docs available at
        http://static.springsource.org/spring-hadoop/docs/snapshot/reference/html/hbase.html (note this is the current shapshot of the upcoming 1.0 M2).

        Show
        Costin Leau added a comment - Support available in M2. Docs available at http://static.springsource.org/spring-hadoop/docs/snapshot/reference/html/hbase.html (note this is the current shapshot of the upcoming 1.0 M2).

          People

          • Assignee:
            Costin Leau
            Reporter:
            Vaibhav Puranik
          • Votes:
            13 Vote for this issue
            Watchers:
            16 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: