Class FragmentInfo


  • public class FragmentInfo
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String dump()
      Gets the URI of the fragment to vacuum with the given index.
      java.lang.String getArraySchemaName​(long fragmentID)
      Get the fragment info schema name.
      long getCellNum​(long fragmentID)
      In the case of sparse fragments, this is the number of non-empty cells in the fragment.
      boolean getDense​(long fragmentID)
      Returns true if the fragment with the given index is dense.
      long getFragmentNum()
      Returns the number of fragments.
      long getFragmentSize​(long fragmentID)
      Returns the size of the fragment with the given index.
      java.lang.String getFragmentURI​(long fragmentID)
      Returns the URI of the fragment with the given index.
      long[] getMBRFromIndex​(long fragmentID, long dimensionID, long mid)
      Retrieves the MBR from a given fragment for a given dimension index.
      long[] getMBRFromName​(long fragmentID, java.lang.String dimName, long mid)
      Retrieves the MBR from a given fragment for a given dimension index.
      long getMBRNum​(long fragmentID)
      Retrieves the number of MBRs from the fragment.
      Pair<java.lang.String,​java.lang.String> getMBRVarFromIndex​(long fragmentID, long dimId, long mid)
      Returns the MBR of the fragment with the given index on the given dimension index.
      Pair<java.lang.String,​java.lang.String> getMBRVarFromName​(long fragmentID, java.lang.String dimName, long mid)
      Returns the MBR of the fragment with the given index on the given dimension name.
      Pair<java.lang.Long,​java.lang.Long> getMBRVarSizeFromIndex​(long fragmentID, long dimId, long mid)
      Returns the MBR of the fragment with the given index on the given dimension index.
      Pair<java.lang.Long,​java.lang.Long> getMBRVarSizeFromName​(long fragmentID, java.lang.String dimName, long mid)
      Returns the MBR of the fragment with the given index on the given dimension name.
      Pair getNonEmptyDomainFromIndex​(long fragmentID, long dimensionID)
      Retrieves the non-empty domain from a given fragment for a given dimension name.
      Pair getNonEmptyDomainFromName​(long fragmentID, java.lang.String dimensionName)
      Retrieves the non-empty domain from a given fragment for a given dimension name.
      Pair getNonEmptyDomainVarFromIndex​(long fragmentID, long dimensionID)
      Retrieves the non-empty domain from a fragment for a given dimension index.
      Pair getNonEmptyDomainVarFromName​(long fragmentID, java.lang.String dimensionName)
      Retrieves the non-empty domain from a fragment for a given dimension name.
      Pair<java.lang.Long,​java.lang.Long> getNonEmptyDomainVarSizeFromIndex​(long fragmentID, long dimensionID)
      Retrieves the non-empty domain range sizes from a fragment for a given dimension index.
      Pair<java.lang.Long,​java.lang.Long> getNonEmptyDomainVarSizeFromName​(long fragmentID, java.lang.String dimensionName)
      Retrieves the non-empty domain range sizes from a fragment for a given dimension name.
      boolean getSparse​(long fragmentID)
      Returns true if the fragment with the given index is sparse.
      Pair<java.lang.Long,​java.lang.Long> getTimestampRange​(long fragmentID)
      Returns the timestamp range of the fragment with the given index.
      long getToVacuumNum()
      Gets the number of fragments to vacuum.
      java.lang.String getToVacuumUri​(long fragmentID)
      Gets the URI of the fragment to vacuum with the given index.
      long getUnconsolidatedMetadataNum()
      Gets the number of fragments with unconsolidated metadata.
      long getVersion​(long fragmentID)
      Retrieves the format version of a fragment.
      boolean hasConsolidatedMetadata​(long fragmentID)
      Checks if a fragment has consolidated metadata.
      void setConfig​(Config config)
      Set the fragment info config.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setConfig

        public void setConfig​(Config config)
                       throws TileDBError
        Set the fragment info config. Useful for passing timestamp ranges and encryption key via the config before loading the fragment info.
        Parameters:
        config - the TileDB config
        Throws:
        TileDBError
      • getNonEmptyDomainVarSizeFromIndex

        public Pair<java.lang.Long,​java.lang.Long> getNonEmptyDomainVarSizeFromIndex​(long fragmentID,
                                                                                           long dimensionID)
                                                                                    throws TileDBError
        Retrieves the non-empty domain range sizes from a fragment for a given dimension index. Applicable to var-sized dimensions.
        Parameters:
        fragmentID - The fragment ID
        dimensionID - The dimension name
        Returns:
        The non-empty domain range sizes from a fragment for a given dimension index.
        Throws:
        TileDBError
      • getNonEmptyDomainVarSizeFromName

        public Pair<java.lang.Long,​java.lang.Long> getNonEmptyDomainVarSizeFromName​(long fragmentID,
                                                                                          java.lang.String dimensionName)
                                                                                   throws TileDBError
        Retrieves the non-empty domain range sizes from a fragment for a given dimension name. Applicable to var-sized dimensions.
        Parameters:
        fragmentID - The fragment ID
        dimensionName - The dimension name
        Returns:
        The non-empty domain range sizes from a fragment for a given dimension name
        Throws:
        TileDBError
      • getFragmentNum

        public long getFragmentNum()
                            throws TileDBError
        Returns the number of fragments.
        Returns:
        The number of fragments
        Throws:
        TileDBError
      • getFragmentURI

        public java.lang.String getFragmentURI​(long fragmentID)
                                        throws TileDBError
        Returns the URI of the fragment with the given index.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        The fragment URI
        Throws:
        TileDBError
      • getFragmentSize

        public long getFragmentSize​(long fragmentID)
                             throws TileDBError
        Returns the size of the fragment with the given index.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        The fragment size
        Throws:
        TileDBError
      • getDense

        public boolean getDense​(long fragmentID)
                         throws TileDBError
        Returns true if the fragment with the given index is dense.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        True, if the fragment is dense, false otherwise
        Throws:
        TileDBError
      • getSparse

        public boolean getSparse​(long fragmentID)
                          throws TileDBError
        Returns true if the fragment with the given index is sparse.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        True if the fragment is sparse, false otherwise
        Throws:
        TileDBError
      • getTimestampRange

        public Pair<java.lang.Long,​java.lang.Long> getTimestampRange​(long fragmentID)
                                                                    throws TileDBError
        Returns the timestamp range of the fragment with the given index.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        A Pair including the timestamp range
        Throws:
        TileDBError
      • getNonEmptyDomainFromIndex

        public Pair getNonEmptyDomainFromIndex​(long fragmentID,
                                               long dimensionID)
                                        throws TileDBError
        Retrieves the non-empty domain from a given fragment for a given dimension name.
        Parameters:
        fragmentID - The fragment ID
        dimensionID - The dimension name
        Returns:
        The non-empty domain of the given fragment and dimension ID
        Throws:
        TileDBError
      • getNonEmptyDomainFromName

        public Pair getNonEmptyDomainFromName​(long fragmentID,
                                              java.lang.String dimensionName)
                                       throws TileDBError
        Retrieves the non-empty domain from a given fragment for a given dimension name.
        Parameters:
        fragmentID - The fragment ID
        dimensionName - The dimension name
        Returns:
        The non-empty domain of the given fragment ID and dimension name
        Throws:
        TileDBError
      • getNonEmptyDomainVarFromIndex

        public Pair getNonEmptyDomainVarFromIndex​(long fragmentID,
                                                  long dimensionID)
                                           throws TileDBError
        Retrieves the non-empty domain from a fragment for a given dimension index. Applicable to var-sized dimensions.
        Parameters:
        fragmentID - The fragment ID
        dimensionID - The dimension ID
        Returns:
        The non-empty domain given the fragment and dimension IDs
        Throws:
        TileDBError
      • getNonEmptyDomainVarFromName

        public Pair getNonEmptyDomainVarFromName​(long fragmentID,
                                                 java.lang.String dimensionName)
                                          throws TileDBError
        Retrieves the non-empty domain from a fragment for a given dimension name. Applicable to var-sized dimensions.
        Parameters:
        fragmentID - The fragment ID
        dimensionName - The dimension name
        Returns:
        The non-empty domain given the fragment ID and dimension name
        Throws:
        TileDBError
      • getCellNum

        public long getCellNum​(long fragmentID)
                        throws TileDBError
        In the case of sparse fragments, this is the number of non-empty cells in the fragment.

        In the case of dense fragments, TileDB may add fill values to populate partially populated tiles. Those fill values are counted in the returned number of cells. In other words, the cell number is derived from the number of *integral* tiles written in the file.

        Parameters:
        fragmentID - The fragment ID
        Returns:
        The number of cells
        Throws:
        TileDBError
      • getVersion

        public long getVersion​(long fragmentID)
                        throws TileDBError
        Retrieves the format version of a fragment.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        The version
        Throws:
        TileDBError
      • hasConsolidatedMetadata

        public boolean hasConsolidatedMetadata​(long fragmentID)
                                        throws TileDBError
        Checks if a fragment has consolidated metadata.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        Throws:
        TileDBError
      • getUnconsolidatedMetadataNum

        public long getUnconsolidatedMetadataNum()
                                          throws TileDBError
        Gets the number of fragments with unconsolidated metadata.
        Returns:
        The number of fragments with unconsolidated metadata
        Throws:
        TileDBError
      • getToVacuumNum

        public long getToVacuumNum()
                            throws TileDBError
        Gets the number of fragments to vacuum.
        Returns:
        The number of fragments to vacuum
        Throws:
        TileDBError
      • getToVacuumUri

        public java.lang.String getToVacuumUri​(long fragmentID)
                                        throws TileDBError
        Gets the URI of the fragment to vacuum with the given index.
        Parameters:
        fragmentID - The fragment ID
        Returns:
        The URI of the fragment to vacuum with the given index
        Throws:
        TileDBError
      • dump

        public java.lang.String dump()
                              throws TileDBError
        Gets the URI of the fragment to vacuum with the given index.
        Returns:
        The URI of the fragment to vacuum with the given index
        Throws:
        TileDBError
      • getMBRNum

        public long getMBRNum​(long fragmentID)
                       throws TileDBError
        Retrieves the number of MBRs from the fragment.

        In the case of sparse fragments, this is the number of physical tiles.

        Dense fragments do not contain MBRs.

        Parameters:
        fragmentID - The index of the fragment of interest.
        Returns:
        The number of MBRs.
        Throws:
        TileDBError
      • getMBRFromIndex

        public long[] getMBRFromIndex​(long fragmentID,
                                      long dimensionID,
                                      long mid)
                               throws TileDBError
        Retrieves the MBR from a given fragment for a given dimension index.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimensionID - The dimension index, following the order as it was defined in the domain of the array schema.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getMBRFromName

        public long[] getMBRFromName​(long fragmentID,
                                     java.lang.String dimName,
                                     long mid)
                              throws TileDBError
        Retrieves the MBR from a given fragment for a given dimension index.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimName - The dimension name.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getMBRVarSizeFromIndex

        public Pair<java.lang.Long,​java.lang.Long> getMBRVarSizeFromIndex​(long fragmentID,
                                                                                long dimId,
                                                                                long mid)
                                                                         throws TileDBError
        Returns the MBR of the fragment with the given index on the given dimension index. Applicable to string dimensions.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimId - The dimension index, following the order as it was defined in the domain of the array schema.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getMBRVarSizeFromName

        public Pair<java.lang.Long,​java.lang.Long> getMBRVarSizeFromName​(long fragmentID,
                                                                               java.lang.String dimName,
                                                                               long mid)
                                                                        throws TileDBError
        Returns the MBR of the fragment with the given index on the given dimension name. Applicable to string dimensions.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimName - The dimension name.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getMBRVarFromIndex

        public Pair<java.lang.String,​java.lang.String> getMBRVarFromIndex​(long fragmentID,
                                                                                long dimId,
                                                                                long mid)
                                                                         throws TileDBError
        Returns the MBR of the fragment with the given index on the given dimension index. Applicable to string dimensions.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimId - The dimension index, following the order as it was defined in the domain of the array schema.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getMBRVarFromName

        public Pair<java.lang.String,​java.lang.String> getMBRVarFromName​(long fragmentID,
                                                                               java.lang.String dimName,
                                                                               long mid)
                                                                        throws TileDBError
        Returns the MBR of the fragment with the given index on the given dimension name. Applicable to string dimensions.
        Parameters:
        fragmentID - The index of the fragment of interest.
        mid - The mbr of the fragment of interest.
        dimName - The dimension name.
        Returns:
        The MBR.
        Throws:
        TileDBError
      • getArraySchemaName

        public java.lang.String getArraySchemaName​(long fragmentID)
                                            throws TileDBError
        Get the fragment info schema name.
        Parameters:
        fragmentID - The fragment info object.
        Returns:
        The schema name.
        Throws:
        TileDBError