Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between serde2.objectinspector and typeinfo packages

Tags:

hadoop

hive

What's the difference between these two packages:

  • org.apache.hadoop.hive.serde2.objectinspector
  • org.apache.hadoop.hive.serde2.typeinfo

Is one a newer API? Are they both current, but somehow different? They seem pretty similar to me :/

like image 258
Jaka Jančar Avatar asked Aug 10 '26 09:08

Jaka Jančar


1 Answers

  1. since the two package both under the specifier serde2, i think both of them are in currently use
  2. TypeInfo stores information of a type, and each type with exactly one object to represent it. so, TypeInfo is just a read-only information deal with the object's type(category, type name, etc)
  3. Hive has multiple in-memory data format for a given type (e.g. Integer: Integer, IntWritable and LazyInteger). data are stored in object and format/operations stored in object inspector. so a data object and objectinspector represents a data unit, feels like you can deserialize the object use the information provided by objectinspector.
like image 110
yjshen Avatar answered Aug 14 '26 14:08

yjshen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!