You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2021/08/19 16:27:00 UTC
[jira] [Assigned] (ORC-871) `orc-tools json-schema` fails at empty
json file with EOFException
[ https://issues.apache.org/jira/browse/ORC-871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun reassigned ORC-871:
---------------------------------
Assignee: Yiqun Zhang
> `orc-tools json-schema` fails at empty json file with EOFException
> ------------------------------------------------------------------
>
> Key: ORC-871
> URL: https://issues.apache.org/jira/browse/ORC-871
> Project: ORC
> Issue Type: Sub-task
> Components: Java, tools
> Affects Versions: 1.6.9
> Reporter: Dongjoon Hyun
> Assignee: Yiqun Zhang
> Priority: Minor
> Fix For: 1.7.0
>
>
> It would be better if we show some valid information about the empty file instead of throwing `EOFException`.
> {code}
> $ orc-tools version
> ORC 1.6.9
> $ touch empty.json
> $ orc-tools json-schema empty.json
> Reading file empty.json
> Exception in thread "main" com.google.gson.JsonIOException: java.io.EOFException: End of input at line 1 column 1
> at com.google.gson.JsonStreamParser.hasNext(JsonStreamParser.java:109)
> at org.apache.orc.tools.json.JsonSchemaFinder.addFile(JsonSchemaFinder.java:255)
> at org.apache.orc.tools.json.JsonSchemaFinder.addFile(JsonSchemaFinder.java:250)
> at org.apache.orc.tools.json.JsonSchemaFinder.main(JsonSchemaFinder.java:332)
> at org.apache.orc.tools.Driver.main(Driver.java:114)
> Caused by: java.io.EOFException: End of input at line 1 column 1
> at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1377)
> at com.google.gson.stream.JsonReader.consumeNonExecutePrefix(JsonReader.java:1514)
> at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:523)
> at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
> at com.google.gson.JsonStreamParser.hasNext(JsonStreamParser.java:105)
> ... 4 more
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)