adoroszlai commented on code in PR #6580:
URL: https://github.com/apache/ozone/pull/6580#discussion_r1577255092
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/test/java/org/apache/ozone/rocksdiff/TestRocksDBCheckpointDiffer.java:
##########
@@ -714,25 +715,20 @@ private void readRocksDBInstance(String dbPathArg,
for (LiveFileMetaData m : liveFileMetaDataList) {
LOG.debug("SST File: {}. ", m.fileName());
LOG.debug("\tLevel: {}", m.level());
- LOG.debug("\tTable: {}", toStr(m.columnFamilyName()));
- LOG.debug("\tKey Range: {}", toStr(m.smallestKey())
- + " <-> " + toStr(m.largestKey()));
+ LOG.debug("\tTable: {}", bytes2String(m.columnFamilyName()));
+ LOG.debug("\tKey Range: {}", bytes2String(m.smallestKey()) + " <-> " +
bytes2String(m.largestKey()));
if (differ.debugEnabled(DEBUG_DAG_LIVE_NODES)) {
printMutableGraphFromAGivenNode(
- differ.getCompactionNodeMap(),
- m.fileName(), m.level(),
- differ.getForwardCompactionDAG());
+ differ.getCompactionNodeMap(), m.fileName(), m.level(),
differ.getForwardCompactionDAG());
Review Comment:
nit: please avoid unrelated formatting change
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/metadata/DatanodeStoreSchemaThreeImpl.java:
##########
@@ -182,9 +180,9 @@ public void compactionIfNeeded() throws Exception {
long endCId = Long.MIN_VALUE;
for (LiveFileMetaData file: innerEntry.getValue()) {
long firstCId = DatanodeSchemaThreeDBDefinition.getContainerId(
- FixedLengthStringCodec.bytes2String(file.smallestKey()));
+ StringUtils.bytes2String(file.smallestKey()));
long lastCId = DatanodeSchemaThreeDBDefinition.getContainerId(
- FixedLengthStringCodec.bytes2String(file.largestKey()));
+ StringUtils.bytes2String(file.largestKey()));
Review Comment:
I think `FixedLengthStringCodec` should be kept here, see test failure.
```
IllegalStateException: Failed to encode with ISO-8859-1: ...
at
org.apache.hadoop.hdds.utils.db.StringCodecBase.lambda$encode$0(StringCodecBase.java:101)
at
org.apache.hadoop.hdds.utils.db.StringCodecBase.string2Bytes(StringCodecBase.java:146)
at
org.apache.hadoop.hdds.utils.db.FixedLengthStringCodec.string2Bytes(FixedLengthStringCodec.java:48)
at
org.apache.hadoop.ozone.container.metadata.DatanodeSchemaThreeDBDefinition.getContainerId(DatanodeSchemaThreeDBDefinition.java:164)
at
org.apache.hadoop.ozone.container.metadata.DatanodeStoreSchemaThreeImpl.compactionIfNeeded(DatanodeStoreSchemaThreeImpl.java:182)
at
org.apache.hadoop.ozone.container.common.volume.HddsVolume.check(HddsVolume.java:285)
at
org.apache.hadoop.ozone.container.keyvalue.TestKeyValueContainer.testAutoCompactionSmallSstFile(TestKeyValueContainer.java:899)
```
https://github.com/apache/ozone/actions/runs/8809287315/job/24180227796?pr=6580#step:6:1179
--
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]