-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update doc about mongo and sth indexes by DM #2318
Changes from 1 commit
89b51be
1c9f22f
698d5be
49a579c
fb337ff
99ac83f
e2f8151
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ Content: | |
* [Database and table names](#section1.3.2) | ||
* [Row-like storing](#section1.3.3) | ||
* [Column-like storing](#section1.3.4) | ||
* [MongoDB Indexes](#section1.4) | ||
* [Administration guide](#section2) | ||
* [Configuration](#section2.1) | ||
* [Use cases](#section2.2) | ||
|
@@ -286,6 +287,25 @@ If `data_model=dm-by-entity` and `attr_persistence=column` then `NGSIMongoSink` | |
|
||
[Top](#top) | ||
|
||
### <a name="section1.4"></a>MongoDB Indexes | ||
|
||
Since version 3.0.0 of cygnus index named `cyg_agg_opt` is created in this way but depending on datamodel: | ||
|
||
| datamodel | keys | | ||
| :--------------- | :------------------------------------------------- | | ||
| DMBYSERVICEPATH | entityId, entityType, attrName, resolution, origin | | ||
| DMBYENTITY | attrName, resolution, origin | | ||
| DMBYATTRIBUTE | resolution, origin | | ||
|
||
Since version 3.0.0 of cygnus an index named `cyg_raw_opt` is created in this way but depending on datamodel: | ||
|
||
| datamodel | keys | | ||
| :-------------- | :--------------------------------------------------------------- | | ||
| DMBYSERVICEPATH | recvTime, entityId, entityType, attrName, attrType, attrValue | | ||
| DMBYENTITY | recvTime, attrName, attrType, attrValue | | ||
| DMBYATTRIBUTE | recvTime, attrType, attrValue | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should use the names that are used in configuration by users (i.e In addition, what about the other DMs (from https://github.com/telefonicaid/fiware-cygnus/blob/master/doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_postgresql_sink.md#section1.2 it seems we have 11 DMs, but this table only includes 3)? If they don't involve indexes maybe we should add a sentence like this:
(Same applies to the modification done in PR telefonicaid/fiware-sth-comet#624. Maybe a follow up PR in that repo should be done) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done in 49a579c
IMHO other datamodels does not apply to these sinks and can not be configured with they. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What does it happen if the user try to user one of such DM with these sinks? Cygnus reports error and refuse to start? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A configuration error should be reported by sink. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thus, I'd suggest to add the following note just after the table in documentaiton:
completing the missing "..." |
||
|
||
|
||
## <a name="section2"></a>Administration guide | ||
### <a name="section2.1"></a>Configuration | ||
`NGSIMongoSink` is configured through the following parameters: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should both indexed (cyg_agg_opt and cyg_raw_opt) be mentioned in both sinks (ngsi_mongo_sink.md and ngsi_sth_sink.md)?
As far as I remember (although I may be wrong) each index is used by one sink but I don't remember if it is this way
or
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fgalan you are right!. MongoSink creates Raw table and STHSInk creates Aggregate table.
Fixed in 1c9f22f and 698d5be