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

Eugene Koifman commented on HIVE-19137:
---------------------------------------

Go ahead and take it if you want.  The issue is not during writing - if you use 
API to read the footer of the orc file, the info is there.  The issue is that 
orcfiledump only prints text data and I made this field binary for some reason. 
 You can look at OrcRecordUpdater.KeyIndexBuilder for example and UTF8 encode 
version info in the same fashion - this should make it visible in orcfiledump

> orcfiledump doesn't print hive.acid.version value
> -------------------------------------------------
>
>                 Key: HIVE-19137
>                 URL: https://issues.apache.org/jira/browse/HIVE-19137
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 3.0.0
>            Reporter: Eugene Koifman
>            Assignee: Eugene Koifman
>            Priority: Major
>
> HIVE-18659 added hive.acid.version in the file footer.  
> orcfiledump prints something like 
> {noformat}
> User Metadata:
>   hive.acid.key.index=1,536870912,1;
>   hive.acid.stats=2,0,0
>   hive.acid.version=
> {noformat}
> probably because
> {noformat}
>     public static void setAcidVersionInDataFile(Writer writer) {
>       //so that we know which version wrote the file
>       ByteBuffer bf = ByteBuffer.allocate(4).putInt(ORC_ACID_VERSION);
>       bf.rewind(); //don't ask - some ByteBuffer weridness. w/o this, empty 
> buffer is written
>       writer.addUserMetadata(ACID_VERSION_KEY, bf);
>     }
> {noformat}
> use 
> {{UTF8.encode())}} instead



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

Reply via email to