Changes between Version 2 and Version 3 of waue/2009/SEC_to_ICAS


Ignore:
Timestamp:
Aug 4, 2009, 5:43:44 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2009/SEC_to_ICAS

    v2 v3  
    181181
    182182{{{
     183#!java
    183184        public static class ICAS_M extends MapReduceBase implements
    184185                        Mapper<LongWritable, Text, Text, Text> {
     
    198199                        String source_ip = getip(str[11]);
    199200                        String dest_ip = getip(str[12]);
    200                         String fkey = dest_ip ;
     201                        String fkey = dest_ip + "<=" + str[3];
    201202
    202203                        String date = str[5] + "/" + str[6] + "/" + str[7] + "_" + str[8]
    203204                                        + ":" + str[9] + ":" + str[10];
    204205                        // source @ date @ sig @ class @ type
    205                         String fvalue = source_ip + "@" + date + "@" + str[3] +"@" +str[4]
     206                        String fvalue = source_ip + "@" + date + "@" +"@" +str[4]
    206207                              + "@"+ str[13];
    207208                        output.collect(new Text(fkey), new Text(fvalue));
     
    215216
    216217{{{
     218#!java
    217219        public static class ICAS_R extends TableReduce<Text, Text> {
    218220
     
    236238                        // values.next().getByte() can get value and transfer to byte form,
    237239                        while (values.hasNext()) {
    238                                 // source_ip + "@" + date + "@" + sig + "@" + class + "@" + type;
     240                                // source_ip + "@" + date + "@" + class + "@" + type;
    239241                                rawstr = new String(values.next().getBytes());
    240242                                str = rawstr.split("@");
     
    248250                        // map.setTimestamp(timestamp);
    249251                        map.put("infor:source_ip", Bytes.toBytes(source_ip));
    250                         map.put("infor:signature", Bytes.toBytes(signature));
    251252                        map.put("infor:date", Bytes.toBytes(date));
    252253                        map.put("infor:class", Bytes.toBytes(sig_class));