Class HadoopViews

  • All Implemented Interfaces:
    org.apache.hadoop.conf.Configurable, Views

    public class HadoopViews
    extends Object
    implements Views, org.apache.hadoop.conf.Configurable
    The Views implementation Based on FileIO.
    • Constructor Detail

      • HadoopViews

        public HadoopViews​(org.apache.hadoop.conf.Configuration conf)
    • Method Detail

      • load

        public View load​(String location)
        Loads the View object from a FileSystem path location.
        Specified by:
        load in interface Views
        Parameters:
        location - a path URI (e.g. hdfs:///warehouse/my_view/)
        Returns:
        view implementation
      • loadDefinition

        public ViewDefinition loadDefinition​(String location)
        Loads the view definition from a FileSystem path location.
        Specified by:
        loadDefinition in interface Views
        Parameters:
        location - view name or location
        Returns:
        SQL metadata of the view
      • create

        public void create​(String location,
                           ViewDefinition viewDefinition,
                           Map<String,​String> properties)
        Create a view using the FileSystem implementation, resolved from location.
        Specified by:
        create in interface Views
        Parameters:
        location - a path URI (e.g. hdfs:///warehouse/my_view)
        viewDefinition - contains the view schema, sql, session catalog/namespace etc
        properties - Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
      • replace

        public void replace​(String location,
                            ViewDefinition definition,
                            Map<String,​String> properties)
        Description copied from interface: Views
        Replaces a view.
        Specified by:
        replace in interface Views
        Parameters:
        location - view name or location
        definition - SQL metadata of the view
        properties - Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
      • drop

        public void drop​(String location)
        Description copied from interface: Views
        Drops a view.
        Specified by:
        drop in interface Views
        Parameters:
        location - view name or location
      • setConf

        public void setConf​(org.apache.hadoop.conf.Configuration conf)
        Specified by:
        setConf in interface org.apache.hadoop.conf.Configurable
      • getConf

        public org.apache.hadoop.conf.Configuration getConf()
        Specified by:
        getConf in interface org.apache.hadoop.conf.Configurable