Closed ddupg closed 15 hours ago
Entires in Properties
get converted into a string like key=value;key=value;...
by a call to Options#getOptionStringFromProps
.
As Options#setTablePropertiesCollectorFactory
expects a Java Object, I don't think you will be able to set that via a string.
@adamretter Thank you for your reply.
I found this PR that supports customizing the TablePropertiesCollectorFactory
with a string, and I saw an option called "table_properties_collectors" here, but I'm not sure how it can be applied to convert Properties
into Options
in Java.
Can you help me with this?
@ddupg I think what you are looking at is the CreateFromString
interface that was added not long ago by @mrambacher to the C++ API. We don't yet support that in RocksJava, as it wasn't really clear to me initially how we could support that. We could re-examine if it might be possible to support this (or an equivalent) in RocksJava if that is helpful? However, it will take some time to achieve that.
@adamretter Thank you for your detailed response. Given this situation, I will attempt alternative methods. Looking forward to the day when this feature is available in RocksJava.
My project is developed using Java and uses
org.rocksdb.ColumnFamilyOptions#getColumnFamilyOptionsFromProps
to set options for CFs, following this document[1], I want to settable_properties_collector_factories
toNewCompactOnDeletionCollectorFactory
.I have tried various ways but none have worked.
Then I see this in the LOG, and the parameters are all default values of 0
So my question is, does table_properties_collector_factories support being set using Properties or option string? If it does, how should I write the code?
[1] https://github.com/.../Implement-Queue-Service-Using...
Expected behavior
Use Properties to set table_properties_collector_factories of ColumnFamilyOptions in Java. Expected see LOG
Actual behavior
See this in LOG
Steps to reproduce the behavior