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

ArrayIndexOutOfBoundsException error in CsvToSenMLParse Line 100 #4

Open
Farhood0011 opened this issue Apr 20, 2018 · 3 comments
Open

Comments

@Farhood0011
Copy link

Hi,
There is a logical error in the code that cause ArrayIndexOutOfBoundsException error.
In the Line 100 of "CsvToSenMLParse" you are trying to set the basetime by doing:
finalSenML.put("bt", val[timestampField]);
where the val is a string array which only has a single element.
Because you do
m = (String) map.get("D");
String[] val = m.split(",");
The map that you pass to the "doTaskLogic" method from "CsvToSenMLParseBolt" only contains one pair of key and value!!
map.put(AbstractTask.DEFAULT_KEY, (String)input.getValueByField("OBSVAL"));

Could you please advice ?

@ChaturvediShilpa
Copy link
Contributor

Can you please let me know for which dataset you are facing this issue.

@Farhood0011
Copy link
Author

Farhood0011 commented Apr 22, 2018 via email

@ChaturvediShilpa
Copy link
Contributor

Hi ,

I think the issue is with the schema file being passed in the properties file. Please make sure the property PARSE.CSV_SCHEMA_WITH_ANNOTATEDFIELDS_FILEPATH is pointing to file taxi-schema_with_annotation.csv present under resources and value of property PARSE.CSV_SENML_USE_MSG_FIELD is set to -1.

Also take the latest once of this schema file in case your version is not having latest changes. The map has a single key but the value is a comma separated string and we are fetching the timestamp after doing a split by comma on that string.

Thanks,
Shilpa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants