| Modifier and Type | Constant Field | Value |
|---|---|---|
private static final java.lang.String |
GENERATED_FROM |
" entities {\n # user entity, let\'s make this really simple\n user {\n attributes {\n\n # some details of user - e.g. name, email, ...\n details { scheme: \"proto:cz.o2.proxima.example.Example.UserDetails\" }\n\n # model of preferences based on events\n preferences { scheme: \"proto:cz.o2.proxima.example.Example.UserPreferences\" }\n\n # selected events are stored to user\'s history\n \"event.*\" { scheme: \"proto:cz.o2.proxima.example.Example.BaseEvent\" }\n\n }\n }\n # entity describing a single good we want to sell\n product {\n # note: we have to split to separate attributes each attribute that we want to be able\n # to update *independently*\n attributes {\n\n # price, with some possible additional information, like VAT and other stuff\n price { scheme: \"proto:cz.o2.proxima.example.Example.Price\" }\n\n # some general details of the product\n details { scheme: \"proto:cz.o2.proxima.example.Example.ProductDetails\" }\n\n # list of associated categories\n \"category.*\" { scheme: \"proto:cz.o2.proxima.example.Example.ProductCategory\" }\n\n }\n }\n\n # the events which link users to goods\n event {\n attributes {\n\n # the event is atomic entity with just a single attribute\n data { scheme: \"proto:cz.o2.proxima.example.Example.BaseEvent\" }\n\n }\n }\n\n }\n\n attributeFamilies {\n\n # we need this to be able to read user attributes \'details\' and \'preferences\' by user\'s key\n user-random-access {\n entity: user\n attributes: [ \"details\", \"preferences\" ]\n storage: \"cassandra://\"${cassandra.seed}/${cassandra.user-table}\"?primary=user\"\n type: primary\n access: random-access\n }\n\n # store incoming events to user\'s history\n user-event-history-store {\n entity: event\n attributes: [ \"data\" ]\n storage: \"cassandra://\"${cassandra.seed}/${cassandra.user-event-table}/\n # this class defines how we transform incoming event to CQL\n cqlFactory: cz.o2.proxima.example.EventHistoryCqlFactory\n # this is filtering condition, we want to select only some events\n filter: cz.o2.proxima.example.EventHistoryFilter\n type: replica\n access: write-only\n }\n\n # this family defines read access to the stored event history\n user-event-history-read {\n entity: user\n attributes: [ \"event.*\" ]\n storage: \"cassandra://\"${cassandra.seed}/${cassandra.user-event-table}\"?primary=user&secondary=stamp&data=event&reversed=true\"\n # ignore this for now\n converter: cz.o2.proxima.storage.cassandra.DateToLongConverter\n type: replica\n # we will not explicitly modify this, it will be updated automatically by incoming events\n access: read-only\n }\n\n # random access to products\n product-random-acesss {\n entity: product\n attributes: [ \"*\" ]\n storage: \"cassandra://\"${cassandra.seed}/${cassandra.product-table}\n type: primary\n access: random-access\n }\n\n # event stream storage\n event-commit-log {\n entity: event\n attributes: [ \"*\" ]\n storage: \"kafka://\"${kafka.brokers}/${kafka.events-topic}\n # this is our commit log\n type: primary\n access: commit-log\n }\n\n # store events for batch analytics\n event-batch-storage {\n entity: event\n attributes: [ \"*\" ]\n storage: \"hdfs://\"${hdfs.authority}/${hdfs.event-path}\n type: replica\n access: batch-updates\n }\n\n }\n\n cassandra {\n seed = \"cassandra:9042\"\n user-table = \"user\"\n product-table = \"product\"\n user-event-table = \"user_event\"\n }\n\n kafka {\n brokers = \"kafka1:9092,kafka2:9092,kafka3:9092\"\n events-topic = \"events\"\n }\n\n hdfs {\n authority = \"hdfs-master\"\n event-path = \"/events\"\n }\n\n" |
Copyright © 2017–2022. All rights reserved.