dcapwell commented on code in PR #3877:
URL: https://github.com/apache/cassandra/pull/3877#discussion_r1945370859
##########
src/java/org/apache/cassandra/db/virtual/AccordVirtualTables.java:
##########
@@ -21,28 +21,104 @@
import java.util.Collections;
import java.util.List;
+import accord.api.ConfigurationService;
+import accord.topology.TopologyManager;
+import accord.utils.async.AsyncResult;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.cql3.statements.schema.CreateTableStatement;
+import org.apache.cassandra.db.marshal.LongType;
+import org.apache.cassandra.dht.LocalPartitioner;
import org.apache.cassandra.schema.TableMetadata;
+import org.apache.cassandra.service.accord.AccordService;
public class AccordVirtualTables
{
- private AccordVirtualTables() {}
+ private static final String SUCCESS = "success";
+
+ private AccordVirtualTables()
+ {
+ }
public static Collection<VirtualTable> getAll(String keyspace)
{
if (!DatabaseDescriptor.getAccordTransactionsEnabled())
return Collections.emptyList();
- return List.of(
+ return List.of(new EpochTable(keyspace)
);
}
- private static TableMetadata parse(String keyspace, String comment, String
query)
+ private static TableMetadata.Builder parse(String keyspace, String query)
{
return CreateTableStatement.parse(query, keyspace)
- .comment(comment)
- .kind(TableMetadata.Kind.VIRTUAL)
- .build();
+ .kind(TableMetadata.Kind.VIRTUAL);
+ }
+
+ public static class EpochTable extends AbstractVirtualTable
+ {
+ public EpochTable(String keyspace)
+ {
+ super(parse(keyspace, "CREATE TABLE accord_epoch (\n" +
Review Comment:
Feedback from slack
> maybe should also list closed/retired status?
> i guess alternatively we could have a separate row in the vtable for each
table
> might be nice to have addRanges/removeRanges too?
--
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]