]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/java/src/main/java/org/rocksdb/TableProperties.java
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / TableProperties.java
index 8e0f477b8bbf651af0600226301e1b9c358f715f..096341a4c13bd443374325507a6aa63f61c34363 100644 (file)
@@ -29,6 +29,9 @@ public class TableProperties {
   private final long columnFamilyId;
   private final long creationTime;
   private final long oldestKeyTime;
+  private final long slowCompressionEstimatedDataSize;
+  private final long fastCompressionEstimatedDataSize;
+  private final long externalSstFileGlobalSeqnoOffset;
   private final byte[] columnFamilyName;
   private final String filterPolicyName;
   private final String comparatorName;
@@ -38,7 +41,6 @@ public class TableProperties {
   private final String compressionName;
   private final Map<String, String> userCollectedProperties;
   private final Map<String, String> readableProperties;
-  private final Map<String, Long> propertiesOffsets;
 
   /**
    * Access is package private as this will only be constructed from
@@ -50,11 +52,13 @@ public class TableProperties {
       final long rawValueSize, final long numDataBlocks, final long numEntries,
       final long numDeletions, final long numMergeOperands, final long numRangeDeletions,
       final long formatVersion, final long fixedKeyLen, final long columnFamilyId,
-      final long creationTime, final long oldestKeyTime, final byte[] columnFamilyName,
+      final long creationTime, final long oldestKeyTime,
+      final long slowCompressionEstimatedDataSize, final long fastCompressionEstimatedDataSize,
+      final long externalSstFileGlobalSeqnoOffset, final byte[] columnFamilyName,
       final String filterPolicyName, final String comparatorName, final String mergeOperatorName,
       final String prefixExtractorName, final String propertyCollectorsNames,
       final String compressionName, final Map<String, String> userCollectedProperties,
-      final Map<String, String> readableProperties, final Map<String, Long> propertiesOffsets) {
+      final Map<String, String> readableProperties) {
     this.dataSize = dataSize;
     this.indexSize = indexSize;
     this.indexPartitions = indexPartitions;
@@ -74,6 +78,9 @@ public class TableProperties {
     this.columnFamilyId = columnFamilyId;
     this.creationTime = creationTime;
     this.oldestKeyTime = oldestKeyTime;
+    this.slowCompressionEstimatedDataSize = slowCompressionEstimatedDataSize;
+    this.fastCompressionEstimatedDataSize = fastCompressionEstimatedDataSize;
+    this.externalSstFileGlobalSeqnoOffset = externalSstFileGlobalSeqnoOffset;
     this.columnFamilyName = columnFamilyName;
     this.filterPolicyName = filterPolicyName;
     this.comparatorName = comparatorName;
@@ -83,7 +90,6 @@ public class TableProperties {
     this.compressionName = compressionName;
     this.userCollectedProperties = userCollectedProperties;
     this.readableProperties = readableProperties;
-    this.propertiesOffsets = propertiesOffsets;
   }
 
   /**
@@ -266,6 +272,26 @@ public class TableProperties {
     return oldestKeyTime;
   }
 
+  /**
+   * Get the estimated size of data blocks compressed with a relatively slower
+   * compression algorithm.
+   *
+   * @return 0 means unknown, otherwise the timestamp.
+   */
+  public long getSlowCompressionEstimatedDataSize() {
+    return slowCompressionEstimatedDataSize;
+  }
+
+  /**
+   * Get the estimated size of data blocks compressed with a relatively faster
+   * compression algorithm.
+   *
+   * @return 0 means unknown, otherwise the timestamp.
+   */
+  public long getFastCompressionEstimatedDataSize() {
+    return fastCompressionEstimatedDataSize;
+  }
+
   /**
    * Get the name of the column family with which this
    * SST file is associated.
@@ -353,15 +379,6 @@ public class TableProperties {
     return readableProperties;
   }
 
-  /**
-   * The offset of the value of each property in the file.
-   *
-   * @return the offset of each property.
-   */
-  public Map<String, Long> getPropertiesOffsets() {
-    return propertiesOffsets;
-  }
-
   @Override
   public boolean equals(Object o) {
     if (this == o)
@@ -380,6 +397,9 @@ public class TableProperties {
         && formatVersion == that.formatVersion && fixedKeyLen == that.fixedKeyLen
         && columnFamilyId == that.columnFamilyId && creationTime == that.creationTime
         && oldestKeyTime == that.oldestKeyTime
+        && slowCompressionEstimatedDataSize == that.slowCompressionEstimatedDataSize
+        && fastCompressionEstimatedDataSize == that.fastCompressionEstimatedDataSize
+        && externalSstFileGlobalSeqnoOffset == that.externalSstFileGlobalSeqnoOffset
         && Arrays.equals(columnFamilyName, that.columnFamilyName)
         && Objects.equals(filterPolicyName, that.filterPolicyName)
         && Objects.equals(comparatorName, that.comparatorName)
@@ -388,8 +408,7 @@ public class TableProperties {
         && Objects.equals(propertyCollectorsNames, that.propertyCollectorsNames)
         && Objects.equals(compressionName, that.compressionName)
         && Objects.equals(userCollectedProperties, that.userCollectedProperties)
-        && Objects.equals(readableProperties, that.readableProperties)
-        && Objects.equals(propertiesOffsets, that.propertiesOffsets);
+        && Objects.equals(readableProperties, that.readableProperties);
   }
 
   @Override
@@ -397,9 +416,10 @@ public class TableProperties {
     int result = Objects.hash(dataSize, indexSize, indexPartitions, topLevelIndexSize,
         indexKeyIsUserKey, indexValueIsDeltaEncoded, filterSize, rawKeySize, rawValueSize,
         numDataBlocks, numEntries, numDeletions, numMergeOperands, numRangeDeletions, formatVersion,
-        fixedKeyLen, columnFamilyId, creationTime, oldestKeyTime, filterPolicyName, comparatorName,
-        mergeOperatorName, prefixExtractorName, propertyCollectorsNames, compressionName,
-        userCollectedProperties, readableProperties, propertiesOffsets);
+        fixedKeyLen, columnFamilyId, creationTime, oldestKeyTime, slowCompressionEstimatedDataSize,
+        fastCompressionEstimatedDataSize, externalSstFileGlobalSeqnoOffset, filterPolicyName,
+        comparatorName, mergeOperatorName, prefixExtractorName, propertyCollectorsNames,
+        compressionName, userCollectedProperties, readableProperties);
     result = 31 * result + Arrays.hashCode(columnFamilyName);
     return result;
   }