Maxwell-Guo commented on code in PR #2047:
URL: https://github.com/apache/cassandra/pull/2047#discussion_r1067920717
##########
src/java/org/apache/cassandra/db/compaction/CompactionHistoryTabularData.java:
##########
@@ -24,16 +24,17 @@
import org.apache.cassandra.cql3.UntypedResultSet;
import org.apache.cassandra.db.marshal.Int32Type;
import org.apache.cassandra.db.marshal.LongType;
+import org.apache.cassandra.db.marshal.UTF8Type;
import org.apache.cassandra.utils.FBUtilities;
public class CompactionHistoryTabularData
{
private static final String[] ITEM_NAMES = new String[]{ "id",
"keyspace_name", "columnfamily_name", "compacted_at",
- "bytes_in",
"bytes_out", "rows_merged", "compaction_type" };
+ "bytes_in",
"bytes_out", "rows_merged", "compaction_properties" };
Review Comment:
1. I just put all the properties together in a map as you said. The reason
why I do not including all keys defined in CompactionHstoryProperty is that the
keys may be so much , and for nodetool compactionhistory 's output it may be
not easy to see.
2. Besides, in the future if some one add new properties , he may mdofiy
more than one place to suceesfully add a property, define the key and default
value in CompactionHistoryProperty, and add property key here for ITEM_NAMES
and ITEM_DESCS, and the ITEM_TYPES should be added with new property type.
And the out put result should also be modified to get the value from the
map.
But if use this compaction_properties , none of the modification described
in part 2 is needed. And the out put result is just like rows_merged column
,which is also a map type , and the output is also looks better
--
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]