[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16684496#comment-16684496
 ] 

Wail Alkowaileet commented on ASTERIXDB-2480:
---------------------------------------------

The issue is that the GenericRecord<T>#size() always returns -1 (not the actual 
size). I can add a check in the parser to take the whole char[] if 
record.size() returns -1.
But it does not sound right to me. Maybe using CharArrayRecord is more suitable 
in HttpServerRecordReader?

Thoughts?

> JSON Parser failed at NPE
> -------------------------
>
>                 Key: ASTERIXDB-2480
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2480
>             Project: Apache AsterixDB
>          Issue Type: Bug
>    Affects Versions: 0.9.4
>            Reporter: Xikui Wang
>            Assignee: Wail Alkowaileet
>            Priority: Major
>
> {code}
> drop dataverse lapd if exists;
> create dataverse lapd;
> use lapd;
> create type WorrisomeNotificationType as {
>       dataverseName: string,
>       channelName: string
> };
> create feed WorrisomeTweetsFeed with {
>   "adapter-name" : "http_adapter",
>   "addresses" : "127.0.0.1:10011",
>   "address-type" : "IP",
>   "type-name" : "WorrisomeNotificationType",
>   "format" : "json"
> };
> create dataset WorrisomeNotifications(WorrisomeNotificationType) primary key 
> dataverseName;
> connect feed WorrisomeTweetsFeed to dataset WorrisomeNotifications;
> start feed WorrisomeTweetsFeed;
> {code}
> feed following json data, a NPE will be thrown.
> { "dataverseName":"dhs", "channelName":"WorrisomeTweetsNearMonumentsChannel", 
> "channelExecutionTime":"2018-11-12T18:43:48.508Z"}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to