Class BaseMetastoreTableOperations

    • Field Detail

      • ICEBERG_TABLE_TYPE_VALUE

        public static final java.lang.String ICEBERG_TABLE_TYPE_VALUE
        See Also:
        Constant Field Values
      • METADATA_LOCATION_PROP

        public static final java.lang.String METADATA_LOCATION_PROP
        See Also:
        Constant Field Values
      • PREVIOUS_METADATA_LOCATION_PROP

        public static final java.lang.String PREVIOUS_METADATA_LOCATION_PROP
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseMetastoreTableOperations

        protected BaseMetastoreTableOperations()
    • Method Detail

      • currentMetadataLocation

        public java.lang.String currentMetadataLocation()
      • currentVersion

        public int currentVersion()
      • doRefresh

        protected void doRefresh()
      • commit

        public void commit​(TableMetadata base,
                           TableMetadata metadata)
        Description copied from interface: TableOperations
        Replace the base table metadata with a new version.

        This method should implement and document atomicity guarantees.

        Implementations must check that the base metadata is current to avoid overwriting updates. Once the atomic commit operation succeeds, implementations must not perform any operations that may fail because failure in this method cannot be distinguished from commit failure.

        Specified by:
        commit in interface TableOperations
        Parameters:
        base - table metadata on which changes were based
        metadata - new table metadata with updates
      • requestRefresh

        protected void requestRefresh()
      • writeNewMetadata

        protected java.lang.String writeNewMetadata​(TableMetadata metadata,
                                                    int newVersion)
      • refreshFromMetadataLocation

        protected void refreshFromMetadataLocation​(java.lang.String newLocation)
      • refreshFromMetadataLocation

        protected void refreshFromMetadataLocation​(java.lang.String newLocation,
                                                   int numRetries)
      • refreshFromMetadataLocation

        protected void refreshFromMetadataLocation​(java.lang.String newLocation,
                                                   java.util.function.Predicate<java.lang.Exception> shouldRetry,
                                                   int numRetries)
      • metadataFileLocation

        public java.lang.String metadataFileLocation​(java.lang.String filename)
        Description copied from interface: TableOperations
        Given the name of a metadata file, obtain the full path of that file using an appropriate base location of the implementation's choosing.

        The file may not exist yet, in which case the path should be returned as if it were to be created by e.g. FileIO.newOutputFile(String).

        Specified by:
        metadataFileLocation in interface TableOperations