[
https://issues.apache.org/jira/browse/AVRO-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15317360#comment-15317360
]
Doug Cutting commented on AVRO-1858:
------------------------------------
Switching to long has no performance impact and may be helpful for someone
someday.
I agree that tail is hard and should be skipped for now.
Adding a start would not be too difficult, and it could be optimized with
getBlockCount() and nextBlock(), but, you're right, that too should be a
separate issue for later. But, with it in mind, would you alter the
implementation of head? It might be better call the option 'count' or 'length'
instead of 'head', so that it makes better sense if/when 'start' is added, but
'head' is such a well-known name for this feature and is the most common use
case, so perhaps it's not worth it. I don't have a strong opinion either way.
> Update DataFileReadTool (tojson) to support a "head" concept
> ------------------------------------------------------------
>
> Key: AVRO-1858
> URL: https://issues.apache.org/jira/browse/AVRO-1858
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.8.1
> Reporter: Mike Hurley
>
> It would be nice if the tojson operator supported a "head" concept in order
> to get a sampling of records in an Avro file.
> Allow specifying a maximum record count to display. If no max is given in
> head mode, use a reasonable default (like 10).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)