summaryrefslogtreecommitdiff
path: root/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-09-21 12:04:15 +0200
committerGitHub <noreply@github.com>2021-09-21 12:04:15 +0200
commit322d91db03a7d74a00ec623ce624f979c0b77c03 (patch)
tree73201888564accde4cfa107f4ffdb15e9f93d45c /opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt
parent453c25c4b453fa0af26bebbd8863abfb79218119 (diff)
parent68ef3700ed2f69bcf0118bb69eda71e6b1f4d54f (diff)
merge: Add support for trace writing
This pull request extends the trace API to support writing new traces. - Unify columns of different tables - Support column lookup via index - Use index lookup in trace loader - Add property for describing partition keys - Simplify TraceFormat SPI interface - Add support for writing traces **Breaking API Changes** - `TraceFormat` SPI interface has been redesigned.
Diffstat (limited to 'opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt')
-rw-r--r--opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt14
1 files changed, 8 insertions, 6 deletions
diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt
index 6aca2051..b0181cbc 100644
--- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt
+++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/Table.kt
@@ -32,14 +32,14 @@ public interface Table {
public val name: String
/**
- * A flag to indicate that the table is synthetic (derived from another table).
+ * The list of columns supported in this table.
*/
- public val isSynthetic: Boolean
+ public val columns: List<TableColumn<*>>
/**
- * The list of columns supported in this table.
+ * The columns by which the table is partitioned.
*/
- public val columns: List<TableColumn<*>>
+ public val partitionKeys: List<TableColumn<*>>
/**
* Open a [TableReader] for this table.
@@ -47,7 +47,9 @@ public interface Table {
public fun newReader(): TableReader
/**
- * Open a [TableReader] for [partition] of the table.
+ * Open a [TableWriter] for this table.
+ *
+ * @throws UnsupportedOperationException if writing is not supported by the table.
*/
- public fun newReader(partition: String): TableReader
+ public fun newWriter(): TableWriter
}