telefonicaid/fiware-connectors — pull request #84 by frbattid (2014-06-18 08:08:22+00:00)
Title: Multitenancy support (HDFS and MySQL)

This PR finishes the implementation of the issue https://github.com/telefonicaid/fiware-connectors/issues/36

100% tests passed
Manually tested

Multitenancy support in HDFS is achieved by implementing the following HDFS folder schema:

hdfs:///user///-/-.txt

where:

* `clientUsername` is the client username (e.g. valencia, repsol). Whitin the current version, this is the value of the `cosmos_default_username` parameter; in future releases it will be the real client username.
* `organization`refers to the `fiware-service` header.
* `-` is the usual entity descriptor. In this case, a folder is created and then a file within it; the purpose is to support the creation of per entity Hive tables, and thus a specific folder is required per each entity.

Multitenancy support in MySQL is achieved by implementing the following databse schema:

mysql:////-

where:

* `organization` refers to the `fiware-service` header, and it is a database.
* `-` is the usual entity descriptor, and it is a table within the above database.