jojochuang commented on code in PR #3426:
URL: https://github.com/apache/ozone/pull/3426#discussion_r879739705
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TableConfig.java:
##########
@@ -58,7 +63,7 @@ public String getName() {
*/
public ColumnFamilyDescriptor getDescriptor() {
return new ColumnFamilyDescriptor(StringUtils.string2Bytes(name),
- columnFamilyOptions);
+ new ColumnFamilyOptions(columnFamilyOptions));
Review Comment:
ColumnFamilyOptions has to be closed manually
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TableConfig.java:
##########
@@ -30,6 +30,11 @@
* Class that maintains Table Configuration.
*/
public class TableConfig {
+ static TableConfig newTableConfig(byte[] bytes) {
+ return new TableConfig(StringUtils.bytes2String(bytes),
+ DBStoreBuilder.HDDS_DEFAULT_DB_PROFILE.getColumnFamilyOptions());
+ }
Review Comment:
ColumnFamilyOptions needs to be closed manually. How about making
TableConfig Closeable and close the ColumnFamilyOptions object in the close()
method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]