You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Robert Grandl <rg...@yahoo.com.INVALID> on 2016/12/05 17:06:39 UTC

Print actual key / value details in Hive

Hi guys,
I am trying to trace the key / value details processed by each Operator or at least each stage in Hive. 

However, I have a hard time to do that, as key / values are serialized. 

Is there any way I can see the original key / value details?
Thanks in advance,Robert


Re: Print actual key / value details in Hive

Posted by Robert Grandl <rg...@yahoo.com.INVALID>.
Hi,
Can someone give me any advice on this? I have a hard time understanding how to properly get it. I observe that in ReduceSinkOperator.java, keys and values are available as HiveKey and BytesWritable, but I don't know how to extract the actual content. For key, I can use a StructObjectInspector and iterate over every getStructFieldsDataAsList(obj) element. Is this the right way to do it? However, for the value I have no clue how to get it. 

Thanks,Robert 

    On Monday, December 5, 2016 11:07 AM, Robert Grandl <rg...@yahoo.com> wrote:
 

 Hi guys,
I am trying to trace the key / value details processed by each Operator or at least each stage in Hive. 

However, I have a hard time to do that, as key / values are serialized. 

Is there any way I can see the original key / value details?
Thanks in advance,Robert



   

Re: Print actual key / value details in Hive

Posted by Robert Grandl <rg...@yahoo.com>.
Hi,
Can someone give me any advice on this? I have a hard time understanding how to properly get it. I observe that in ReduceSinkOperator.java, keys and values are available as HiveKey and BytesWritable, but I don't know how to extract the actual content. For key, I can use a StructObjectInspector and iterate over every getStructFieldsDataAsList(obj) element. Is this the right way to do it? However, for the value I have no clue how to get it. 

Thanks,Robert 

    On Monday, December 5, 2016 11:07 AM, Robert Grandl <rg...@yahoo.com> wrote:
 

 Hi guys,
I am trying to trace the key / value details processed by each Operator or at least each stage in Hive. 

However, I have a hard time to do that, as key / values are serialized. 

Is there any way I can see the original key / value details?
Thanks in advance,Robert