public Map toConfig()

in samza-kv-rocksdb/src/main/java/org/apache/samza/storage/kv/descriptors/RocksDbTableDescriptor.java [316:365]


  public Map<String, String> toConfig(Config jobConfig) {

    Map<String, String> tableConfig = new HashMap<>(super.toConfig(jobConfig));

    // Store factory configuration
    tableConfig.put(String.format(StorageConfig.FACTORY, tableId),
        RocksDbKeyValueStorageEngineFactory.class.getName());

    if (writeBatchSize != null) {
      addStoreConfig(WRITE_BATCH_SIZE, writeBatchSize.toString(), tableConfig);
    }
    if (objectCacheSize != null) {
      addStoreConfig(OBJECT_CACHE_SIZE, objectCacheSize.toString(), tableConfig);
    }
    if (cacheSize != null) {
      addStoreConfig(CONTAINER_CACHE_SIZE_BYTES, cacheSize.toString(), tableConfig);
    }
    if (writeBufferSize != null) {
      addStoreConfig(CONTAINER_WRITE_BUFFER_SIZE_BYTES, writeBufferSize.toString(), tableConfig);
    }
    if (compressionType != null) {
      addStoreConfig(ROCKSDB_COMPRESSION, compressionType, tableConfig);
    }
    if (blockSize != null) {
      addStoreConfig(ROCKSDB_BLOCK_SIZE_BYTES, blockSize.toString(), tableConfig);
    }
    if (ttl != null) {
      addStoreConfig(ROCKSDB_TTL_MS, ttl.toString(), tableConfig);
    }
    if (compactionStyle != null) {
      addStoreConfig(ROCKSDB_COMPACTION_STYLE, compactionStyle, tableConfig);
    }
    if (numWriteBuffers != null) {
      addStoreConfig(ROCKSDB_NUM_WRITE_BUFFERS, numWriteBuffers.toString(), tableConfig);
    }
    if (maxLogFileSize != null) {
      addStoreConfig(ROCKSDB_MAX_LOG_FILE_SIZE_BYTES, maxLogFileSize.toString(), tableConfig);
    }
    if (numLogFilesToKeep != null) {
      addStoreConfig(ROCKSDB_KEEP_LOG_FILE_NUM, numLogFilesToKeep.toString(), tableConfig);
    }
    if (maxOpenFiles != null) {
      addStoreConfig(ROCKSDB_MAX_OPEN_FILES, maxOpenFiles.toString(), tableConfig);
    }
    if (maxFileOpeningThreads != null) {
      addStoreConfig(ROCKSDB_MAX_FILE_OPENING_THREADS, maxFileOpeningThreads.toString(), tableConfig);
    }

    return Collections.unmodifiableMap(tableConfig);
  }