1 LWES Journal File SerDe README
4 In order to read journal files from Hive, a SerDe (Serialize/Deserializer)
5 is needed, to map Hive columns to LWES attributes.
9 - JDK 1.6.x (http://java.sun.com/)
10 - Maven 2.2.x (http://apache.maven.org/)
19 Hive looks for extensions in a directory defined in the environment
20 variable HIVE_AUX_JARS_PATH.
21 If that variable is not defined, set it to a directory of your choice
22 Copy JournalSerDe-x.x.x.jar into that directory and launch hive
28 This is an example of table creation.
29 Just one event type is currently allowed per table.
30 The SerDe will automatically map a lwes attribute to the correspondent
31 hive column with the same name. Unfortunately, lwes attributes are case
32 sensitive while hive columns are not; you may also want a hive column
33 with a different name from the lwes attribute. In either case, you can
34 change the attribute/column mapping with serde properties as shown below:
35 the column sender_ip is mapped to the lwes attribute 'SenderIP'.
36 Classes for input/output are
37 INPUTFORMAT 'org.lwes.hadoop.io.JournalInputFormat'
38 OUTPUTFORMAT 'org.lwes.hadoop.io.JournalOutputFormat'
41 CREATE TABLE mrkt_auction_complete_hourly (
48 PARTITIONED BY(dt STRING)
49 ROW FORMAT SERDE 'org.lwes.hadoop.hive.EventSerDe'
50 WITH SERDEPROPERTIES (
51 'lwes.event_name'='Auction::Complete',
52 'sender_ip'='SenderIP',
53 'sender_port'='SenderPort',
54 'receipt_time'='ReceiptTime',
57 INPUTFORMAT 'org.lwes.hadoop.io.JournalInputFormat'
58 OUTPUTFORMAT 'org.lwes.hadoop.io.JournalOutputFormat'
62 Also, lwes does not support FLOAT nor DOUBLE but hive does.
63 You can have define those columns as float/double and the serde
64 will convert its values according to Float.parseFloat(String) and
65 Double.parseDouble(String).
67 I also built a tool to create table definitions from the ESF file
68 and will post it too to sourceforge.
73 Since LWES is basically a key/value format, it does not support nested
74 columns so arrays and hashes are for now not allowed in a hive table that