org.apache.hadoop.contrib.failmon
Class Anonymizer

java.lang.Object
  extended by org.apache.hadoop.contrib.failmon.Anonymizer

public class Anonymizer
extends Object

This class provides anonymization to SerializedRecord objects. It anonymizes all hostnames, ip addresses and file names/paths that appear in EventRecords gathered from the logs and other system utilities. Such values are hashed using a cryptographically safe one-way-hash algorithm (MD5).


Constructor Summary
Anonymizer()
           
 
Method Summary
static SerializedRecord anonymize(EventRecord er)
          Anonymize hostnames, ip addresses and file names/paths that appear in fields of an EventRecord, after it gets serialized into a SerializedRecord.
static SerializedRecord anonymize(SerializedRecord sr)
          Anonymize hostnames, ip addresses and file names/paths that appear in fields of a SerializedRecord.
static String getMD5Hash(String text)
          Create the MD5 digest of an input text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Anonymizer

public Anonymizer()
Method Detail

anonymize

public static SerializedRecord anonymize(SerializedRecord sr)
                                  throws Exception
Anonymize hostnames, ip addresses and file names/paths that appear in fields of a SerializedRecord.

Parameters:
sr - the input SerializedRecord
Returns:
the anonymized SerializedRecord
Throws:
Exception

anonymize

public static SerializedRecord anonymize(EventRecord er)
                                  throws Exception
Anonymize hostnames, ip addresses and file names/paths that appear in fields of an EventRecord, after it gets serialized into a SerializedRecord.

Parameters:
er - the input EventRecord
Returns:
the anonymized SerializedRecord
Throws:
Exception

getMD5Hash

public static String getMD5Hash(String text)
Create the MD5 digest of an input text.

Parameters:
text - the input text
Returns:
the hexadecimal representation of the MD5 digest


Copyright © 2009 The Apache Software Foundation