Class HBaseDataContext

  • All Implemented Interfaces:
    org.apache.metamodel.convert.HasReadTypeConverters, org.apache.metamodel.DataContext, org.apache.metamodel.UpdateableDataContext

    @Evolving
    public class HBaseDataContext
    extends org.apache.metamodel.QueryPostprocessDataContext
    implements org.apache.metamodel.UpdateableDataContext
    MetaModel adaptor for Apache HBase.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String FIELD_ID  
      • Fields inherited from class org.apache.metamodel.QueryPostprocessDataContext

        INFORMATION_SCHEMA_NAME, SYSTEM_PROPERTY_CREATE_DEFAULT_TABLE_ALIAS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Number executeCountQuery​(org.apache.metamodel.schema.Table table, List<org.apache.metamodel.query.FilterItem> whereItems, boolean functionApproximationAllowed)  
      protected org.apache.metamodel.data.Row executePrimaryKeyLookupQuery​(org.apache.metamodel.schema.Table table, List<org.apache.metamodel.query.SelectItem> selectItems, org.apache.metamodel.schema.Column primaryKeyColumn, Object keyValue)  
      org.apache.metamodel.UpdateSummary executeUpdate​(org.apache.metamodel.UpdateScript update)  
      org.apache.hadoop.hbase.client.Admin getAdmin()
      Gets the Admin used by this DataContext
      HBaseConfiguration getConfiguration()
      Gets the HBaseConfiguration that is used in this datacontext.
      org.apache.hadoop.hbase.client.Connection getConnection()  
      protected org.apache.hadoop.hbase.client.Table getHTable​(String name)  
      protected org.apache.metamodel.schema.Schema getMainSchema()  
      protected String getMainSchemaName()  
      protected org.apache.metamodel.data.DataSet materializeMainSchemaTable​(org.apache.metamodel.schema.Table table, List<org.apache.metamodel.schema.Column> columns, int maxRows)  
      • Methods inherited from class org.apache.metamodel.QueryPostprocessDataContext

        addConverter, executeQuery, getDefaultSchemaName, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTableSelect, materializeTable
      • Methods inherited from class org.apache.metamodel.AbstractDataContext

        compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemas
      • Methods inherited from interface org.apache.metamodel.DataContext

        compileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemas
    • Constructor Detail

      • HBaseDataContext

        public HBaseDataContext​(HBaseConfiguration configuration,
                                org.apache.hadoop.hbase.client.Connection connection)
        Creates a HBaseDataContext.
        Parameters:
        configuration -
        connection -
    • Method Detail

      • getAdmin

        public org.apache.hadoop.hbase.client.Admin getAdmin()
        Gets the Admin used by this DataContext
        Returns:
      • getConnection

        public org.apache.hadoop.hbase.client.Connection getConnection()
      • getMainSchema

        protected org.apache.metamodel.schema.Schema getMainSchema()
                                                            throws org.apache.metamodel.MetaModelException
        Specified by:
        getMainSchema in class org.apache.metamodel.QueryPostprocessDataContext
        Throws:
        org.apache.metamodel.MetaModelException
      • getMainSchemaName

        protected String getMainSchemaName()
                                    throws org.apache.metamodel.MetaModelException
        Specified by:
        getMainSchemaName in class org.apache.metamodel.QueryPostprocessDataContext
        Throws:
        org.apache.metamodel.MetaModelException
      • executeCountQuery

        protected Number executeCountQuery​(org.apache.metamodel.schema.Table table,
                                           List<org.apache.metamodel.query.FilterItem> whereItems,
                                           boolean functionApproximationAllowed)
        Overrides:
        executeCountQuery in class org.apache.metamodel.QueryPostprocessDataContext
      • getHTable

        protected org.apache.hadoop.hbase.client.Table getHTable​(String name)
      • executePrimaryKeyLookupQuery

        protected org.apache.metamodel.data.Row executePrimaryKeyLookupQuery​(org.apache.metamodel.schema.Table table,
                                                                             List<org.apache.metamodel.query.SelectItem> selectItems,
                                                                             org.apache.metamodel.schema.Column primaryKeyColumn,
                                                                             Object keyValue)
        Overrides:
        executePrimaryKeyLookupQuery in class org.apache.metamodel.QueryPostprocessDataContext
      • materializeMainSchemaTable

        protected org.apache.metamodel.data.DataSet materializeMainSchemaTable​(org.apache.metamodel.schema.Table table,
                                                                               List<org.apache.metamodel.schema.Column> columns,
                                                                               int maxRows)
        Specified by:
        materializeMainSchemaTable in class org.apache.metamodel.QueryPostprocessDataContext
      • executeUpdate

        public org.apache.metamodel.UpdateSummary executeUpdate​(org.apache.metamodel.UpdateScript update)
        Specified by:
        executeUpdate in interface org.apache.metamodel.UpdateableDataContext