)]}'
{"java/src/main/java/monasca/api/app/validation/ValueMetaValidation.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"fce161ac13752c0f299bd2facc47105465146f85","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    try {"},{"line_number":100,"context_line":"      String valueMetaString \u003d objectMapper.writeValueAsString(valueMetas);"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"      if (valueMetaString.length() \u003e VALUE_META_VALUE_MAX_LENGTH) {"},{"line_number":103,"context_line":"        throw Exceptions.unprocessableEntity(\"valueMeta name value combinations %s must be %d characters or less\","},{"line_number":104,"context_line":"          valueMetaString, VALUE_META_VALUE_MAX_LENGTH);"},{"line_number":105,"context_line":"       }"}],"source_content_type":"text/x-java","patch_set":3,"id":"7a2fa921_99efed86","line":102,"updated":"2015-10-07 17:24:37.000000000","message":"So, the length of the string in Java is in characters, not bytes. Those are not the same thing. The actual number of bytes is dependent on the encoding and the actual characters used in that encoding.\n\nIn the Vertica schema we have a hard-coded limit on the number of bytes, which in the SQL is encoded as\n\n    value_meta VARCHAR(2048)\n\nYou are taking the length of the entire meta value map converted to a string, and comparing it against VALUE_META_VALUE_MAX_LENGTH, which happens to be 2048.\n\nYou need to actually take the string, valueMetaString, and get the length in bytes. I\u0027m not sure how Java Strings are converted to strings in Vertical. It is probably a utf8 encoding and would be done by the JDBC connector.","commit_id":"c10278ea4bb35b4ce1a0671713908deb5cf35bfe"}]}
