-
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
Cygnus: Check special characters for filenames #9
Comments
I think to remember that we had some similar issue with other special character in the past, such ":", that gets replaced by _. Probably it is just a matter of including "/" to the list of special characters to check and replace by _. |
You are right, the characters ':' and '-' are currently replaced by '_'. I would extend the list to any non alphanumeric character, I think using regular expressions this is quite easy: s = s.replaceAll("[^a-zA-Z0-9]", "_"); |
As being discussed by Skype, this is a very different thing than serializing the entity and attribute type and id/name. In this case, we must ensure the serialized characters don't break the Json parsing. |
Solved in PR telefonicaid/fiware-connectors#44 |
Moved from telefonicaid/fiware-livedemoapp#15:
As experienced with FINESCE people, if an entity or attribute name or type contains the "/" character then the persisted file for this entity-attribute pair will contain the "/" character. When creating thar file, WebHDFS/HttpFS understands a subdirectory must be created and then a file.
E.g. entity=mycar, entity_tpe=car, attribute_name=speed, attribute_type=km/h will be persisted as mycar-car-speed-km/h.txt, which in the end is the following directory /user/myuser/mystorage/mycar-car-speed-km containing a h.txt file.
Special characters usage must be checked before creating the file name.
The text was updated successfully, but these errors were encountered: