Class HadoopViews

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

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

      Constructors 
      Constructor Description
      HadoopViews​(org.apache.hadoop.conf.Configuration conf)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create​(java.lang.String location, ViewDefinition viewDefinition, java.util.Map<java.lang.String,​java.lang.String> properties)
      Create a view using the FileSystem implementation, resolved from location.
      void drop​(java.lang.String location)
      Drops a view.
      org.apache.hadoop.conf.Configuration getConf()  
      View load​(java.lang.String location)
      Loads the View object from a FileSystem path location.
      ViewDefinition loadDefinition​(java.lang.String location)
      Loads the view definition from a FileSystem path location.
      void replace​(java.lang.String location, ViewDefinition definition, java.util.Map<java.lang.String,​java.lang.String> properties)
      Replaces a view.
      void setConf​(org.apache.hadoop.conf.Configuration conf)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.iceberg.view.Views

        rename
    • Constructor Detail

      • HadoopViews

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

      • load

        public View load​(java.lang.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​(java.lang.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​(java.lang.String location,
                           ViewDefinition viewDefinition,
                           java.util.Map<java.lang.String,​java.lang.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​(java.lang.String location,
                            ViewDefinition definition,
                            java.util.Map<java.lang.String,​java.lang.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​(java.lang.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