summaryrefslogtreecommitdiff
path: root/resources/experiments
diff options
context:
space:
mode:
Diffstat (limited to 'resources/experiments')
-rw-r--r--resources/experiments/config.json7
-rw-r--r--resources/experiments/schema.proto11
-rw-r--r--resources/experiments/sink-jdbc.properties46
3 files changed, 63 insertions, 1 deletions
diff --git a/resources/experiments/config.json b/resources/experiments/config.json
index a40d3a66..9527923d 100644
--- a/resources/experiments/config.json
+++ b/resources/experiments/config.json
@@ -3,5 +3,10 @@
"port": "8080",
"backlog": 20,
"address": "127.0.0.1",
- "databasePath" : "resources/data/database"
+ "postgresql" : "5432",
+ "username" : "matt",
+ "password" : "admin",
+ "database" : "opendc",
+ "topic" : "postgres-topic",
+ "kafka" : "9092"
}
diff --git a/resources/experiments/schema.proto b/resources/experiments/schema.proto
new file mode 100644
index 00000000..2a308edd
--- /dev/null
+++ b/resources/experiments/schema.proto
@@ -0,0 +1,11 @@
+syntax = "proto2";
+
+package proto;
+
+option java_package = "org.opendc.common";
+option java_outer_classname = "ProtobufMetrics";
+
+message ProtoExport {
+ required int32 id = 1;
+ required int32 tasksactive = 2;
+} \ No newline at end of file
diff --git a/resources/experiments/sink-jdbc.properties b/resources/experiments/sink-jdbc.properties
new file mode 100644
index 00000000..4a78b2ed
--- /dev/null
+++ b/resources/experiments/sink-jdbc.properties
@@ -0,0 +1,46 @@
+#
+# Copyright 2018 Confluent Inc.
+#
+# Licensed under the Confluent Community License (the "License"); you may not use
+# this file except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.confluent.io/confluent-community-license
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+#
+
+# A simple example that copies from a topic to a Postgres database.
+# The first few settings are required for all connectors:
+# a name, the connector class to run, and the maximum number of tasks to create:
+name=postgresql-sink
+connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
+tasks.max=1
+
+key.converter=org.apache.kafka.connect.storage.StringConverter
+value.converter=io.confluent.connect.protobuf.ProtobufConverter
+value.converter.schema.registry.url=http://localhost:8081
+
+# The topics to consume from - required for sink connectors like this one
+topics=postgres-topic
+
+# Configuration specific to the JDBC sink connector.
+# We want to connect to a Postgres database stored in the file test.db and auto-create tables.
+connection.url=jdbc:postgresql://127.0.0.1:5432/opendc
+
+connection.user=matt
+connection.password=admin
+auto.create=true
+
+# Define when identifiers should be quoted in DDL and DML statements.
+# The default is 'always' to maintain backward compatibility with prior versions.
+# Set this to 'never' to avoid quoting fully-qualified or simple table and column names.
+#quote.sql.identifiers=always
+
+# Here are some values that enable JSON formatted files to be ingested by Postgresql
+
+insert.mode=insert
+