Class BaseRewriteManifestsSparkAction

    • Constructor Detail

      • BaseRewriteManifestsSparkAction

        public BaseRewriteManifestsSparkAction​(org.apache.spark.sql.SparkSession spark,
                                               Table table)
    • Method Detail

      • specId

        public RewriteManifests specId​(int specId)
        Description copied from interface: RewriteManifests
        Rewrites manifests for a given spec id.

        If not set, defaults to the table's default spec ID.

        Specified by:
        specId in interface RewriteManifests
        Parameters:
        specId - a spec id
        Returns:
        this for method chaining
      • rewriteIf

        public RewriteManifests rewriteIf​(java.util.function.Predicate<ManifestFile> newPredicate)
        Description copied from interface: RewriteManifests
        Rewrites only manifests that match the given predicate.

        If not set, all manifests will be rewritten.

        Specified by:
        rewriteIf in interface RewriteManifests
        Parameters:
        newPredicate - a predicate
        Returns:
        this for method chaining
      • stagingLocation

        public RewriteManifests stagingLocation​(java.lang.String newStagingLocation)
        Description copied from interface: RewriteManifests
        Passes a location where the staged manifests should be written.

        If not set, defaults to the table's metadata location.

        Specified by:
        stagingLocation in interface RewriteManifests
        Parameters:
        newStagingLocation - a staging location
        Returns:
        this for method chaining
      • snapshotProperty

        public ThisT snapshotProperty​(java.lang.String property,
                                      java.lang.String value)
        Description copied from interface: SnapshotUpdate
        Sets a summary property in the snapshot produced by this action.
        Specified by:
        snapshotProperty in interface SnapshotUpdate<ThisT,​R>
        Parameters:
        property - a snapshot property name
        value - a snapshot property value
        Returns:
        this for method chaining
      • spark

        protected org.apache.spark.sql.SparkSession spark()
      • sparkContext

        protected org.apache.spark.api.java.JavaSparkContext sparkContext()
      • option

        public ThisT option​(java.lang.String name,
                            java.lang.String value)
        Description copied from interface: Action
        Configures this action with an extra option.

        Certain actions allow users to control internal details of their execution via options.

        Specified by:
        option in interface Action<ThisT,​R>
        Parameters:
        name - an option name
        value - an option value
        Returns:
        this for method chaining
      • options

        public ThisT options​(java.util.Map<java.lang.String,​java.lang.String> newOptions)
        Description copied from interface: Action
        Configures this action with extra options.

        Certain actions allow users to control internal details of their execution via options.

        Specified by:
        options in interface Action<ThisT,​R>
        Parameters:
        newOptions - a map of extra options
        Returns:
        this for method chaining
      • options

        protected java.util.Map<java.lang.String,​java.lang.String> options()
      • withJobGroupInfo

        protected <T> T withJobGroupInfo​(JobGroupInfo info,
                                         java.util.function.Supplier<T> supplier)
      • newJobGroupInfo

        protected JobGroupInfo newJobGroupInfo​(java.lang.String groupId,
                                               java.lang.String desc)
      • buildValidDataFileDF

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> buildValidDataFileDF​(Table table)
      • buildManifestFileDF

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> buildManifestFileDF​(Table table)
      • buildManifestListDF

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> buildManifestListDF​(Table table)
      • buildOtherMetadataFileDF

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> buildOtherMetadataFileDF​(Table table)
      • buildValidMetadataFileDF

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> buildValidMetadataFileDF​(Table table)
      • loadMetadataTable

        protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> loadMetadataTable​(Table table,
                                                                                           MetadataTableType type)