Skip to content
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

Problem with what is written in cassandra #116

Closed
2014siavash opened this issue Oct 9, 2017 · 2 comments
Closed

Problem with what is written in cassandra #116

2014siavash opened this issue Oct 9, 2017 · 2 comments
Labels
Milestone

Comments

@2014siavash
Copy link

2014siavash commented Oct 9, 2017

Hi,

I dont know it is an issue or not, but when I want to see what is written in the database, I saw that some variables are written in different columns or just not written in the database such as "bn", "bt" and so on (the null ones). I saw "bn" in the column "n", as you can see in the below. More precisely, in the column "n", we can see for example "some-base-name:voltage", but "some-base-name" is for column "bn" and column "n" should be just "voltage". There are also maybe some other substitutions ("bt" is written in "t" and so on).
Am I wrong?

I used your instruction at http://mainflux.readthedocs.io/en/latest/

thanks for your support.

------------------------------------------------------------------------
channel                              | id                                   | bn   | bs   | bt   | bu   | bv   | bver | l | n                      | protocol | publisher                                                                                                                                                                                    | s | t         | u | ut | v     | vb    | vd | vs
--------------------------------------+--------------------------------------+------+------+------+------+------+------+---+------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---+-----------+---+----+-------+-------+----+----
 743219d8-a8d5-11e7-bb35-0242ac110005 | 1868de00-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:voltage |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | V |  0 | 120.1 | False |    |   
 743219d8-a8d5-11e7-bb35-0242ac110005 | 187c8d10-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:current |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | A |  0 |   1.2 | False |    |   
 743219d8-a8d5-11e7-bb35-0242ac110005 | 187cb420-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:current |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | A |  0 |   1.3 | False |    |   
 743219d8-a8d5-11e7-bb35-0242ac110005 | c5d22d80-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:voltage |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | V |  0 | 120.1 | False |    |   
 743219d8-a8d5-11e7-bb35-0242ac110005 | c5d25490-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:current |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | A |  0 |   1.2 | False |    |   
 743219d8-a8d5-11e7-bb35-0242ac110005 | c5d25491-ac01-11e7-a1bf-f58bd8d3766a | null | null | null | null | null |    5 |   | some-base-name:current |     http | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDcxMDA5MDMsImlzcyI6Im1haW5mbHV4Iiwic3ViIjoiY2Y2YWRjMTMtYThkMi0xMWU3LWJiMWUtMDI0MmFjMTEwMDA1In0._z_SamNwgo2PMhKAAIyFqnSsWWliN_R2bfNas9SFzu4 | 0 | 1.276e+09 | A |  0 |   1.3 | False |    |
------------------------------------------------------------------------
@2014siavash 2014siavash changed the title Problem with what is writing in cassandra Problem with what is written in cassandra Oct 9, 2017
@mijicd
Copy link
Contributor

mijicd commented Oct 9, 2017

@2014siavash we'll check this out.

@drasko did some refactoring on the service, so he'll check out this bug as well.

@mijicd mijicd added the bug label Oct 9, 2017
@drasko
Copy link
Contributor

drasko commented Oct 9, 2017

@2014siavash you are correct, and all SenML sent to Mainflux is now normalized i.e. resolved before it is being written into Cassandra.

Please take a look at SenML spec, chapter 4.4 "Resolved Records": https://tools.ietf.org/html/draft-ietf-core-senml-10#page-8

We should completely remove base values from Cassandra tables, they are not needed anymore.

@mijicd mijicd added this to the 1.0.0-rc.1 milestone Dec 25, 2017
drasko added a commit that referenced this issue Jan 6, 2018
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
@mijicd mijicd closed this as completed in d413508 Jan 6, 2018
dborovcanin referenced this issue in dborovcanin/mainflux-old-fork May 9, 2018
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
manuio pushed a commit that referenced this issue Oct 12, 2020
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
mteodor pushed a commit to mteodor/mainflux that referenced this issue Jun 9, 2021
* Add selectable and hover to attribute editor

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Use subtopic as attrib name when name empty

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
arvindh123 pushed a commit to arvindh123/magistrala that referenced this issue Dec 17, 2023
* feat(invitations): Implement invitations outline

This commit adds the necessary data structures and methods for managing invitations to join a domain. It includes structs for invitations, pages of invitations, and pages of invitations with additional metadata. Additionally, error variables for missing and invalid relations are defined.
The commit also introduces methods for sending, viewing, listing, accepting, and deleting invitations. In addition, it includes functions for creating, retrieving, updating, and deleting invitations in a repository.
Furthermore, a function is added to check the validity of a relation, returning an error if it does not match specific values.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* docs(invitations): add godocs

* test: Add tests for MarshalJSON and CheckRelation

Add tests to ensure the MarshalJSON function of the InvitationPage struct correctly marshals the JSON representation. Also, add tests for the CheckRelation function to verify its behavior in different scenarios. The tests use a loop and the assert.Equal function to compare expected and actual errors.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(invitations): add withToken parameter to RetrieveAll method

This commit adds a new parameter "withToken" to the RetrieveAll method in the invitations package. This parameter allows the caller to specify whether they want to include the token in the returned invitation list.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* docs(invitations): Add Base README

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants