Maxwell-Guo commented on code in PR #4540:
URL: https://github.com/apache/cassandra/pull/4540#discussion_r2720212438
##########
src/java/org/apache/cassandra/tools/nodetool/stats/CompactionHistoryHolder.java:
##########
@@ -90,6 +90,7 @@ private HashMap<String, Object> getAllAsMap(boolean
humanReadable)
compaction.put("bytes_out",
FileUtils.stringifyFileSize(this.bytesOut, humanReadable));
compaction.put("rows_merged", this.rowMerged);
compaction.put("compaction_properties", this.compactionProperties);
+
Review Comment:
nit: delete newly added empty line
##########
test/unit/org/apache/cassandra/tools/nodetool/CompactionHistoryTest.java:
##########
@@ -102,35 +102,59 @@ public void testCompactionProperties() throws Throwable
ImmutableList.Builder<String> builder = ImmutableList.builder();
List<String> cmds =
builder.addAll(cmd).add(keyspace()).add(currentTable()).build();
- compactionHistoryResultVerify(keyspace(), currentTable(),
ImmutableMap.of(COMPACTION_TYPE_PROPERTY, compactionType), cmds);
- String cql = "select
keyspace_name,columnfamily_name,compaction_properties from system." +
SystemKeyspace.COMPACTION_HISTORY +
+ Map<String, String> baseProperties = ImmutableMap.of("strategy",
"SizeTieredCompactionStrategy");
+ Map<String, String> expectedProperties = new HashMap<>(baseProperties);
+ expectedProperties.put("compaction_type", compactionType);
+
+ compactionHistoryResultVerify(keyspace(), currentTable(),
expectedProperties, compactionType, cmds);
+
+ String cql = "select
keyspace_name,columnfamily_name,compaction_properties from system." +
SystemKeyspace.COMPACTION_HISTORY +
" where keyspace_name = '" + keyspace() + "' AND
columnfamily_name = '" + currentTable() + "' ALLOW FILTERING";
+
Review Comment:
delete newly added empty line.
##########
src/java/org/apache/cassandra/db/compaction/CompactionHistoryTabularData.java:
##########
@@ -86,6 +87,7 @@ public static TabularData from(UntypedResultSet resultSet)
throws OpenDataExcept
long bytesOut = row.getLong(ITEM_NAMES[5]);
Map<Integer, Long> rowMerged = row.getMap(ITEM_NAMES[6],
Int32Type.instance, LongType.instance);
Map<String, String> compactionProperties =
row.getMap(ITEM_NAMES[7], UTF8Type.instance, UTF8Type.instance);
+
Review Comment:
nit: delete new added empty line.
--
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]