Index: sample/hadoop-0.16/tw/org/nchc/code/SnortBase.java
===================================================================
--- sample/hadoop-0.16/tw/org/nchc/code/SnortBase.java	(revision 45)
+++ sample/hadoop-0.16/tw/org/nchc/code/SnortBase.java	(revision 46)
@@ -50,5 +50,8 @@
 import java.io.FileWriter;
 import java.io.IOException;
+import java.text.ParseException;
+import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.Locale;
 
@@ -72,7 +75,8 @@
 import org.apache.hadoop.mapred.Reporter;
 
+
 class Log {
 
-	public Log(String data) throws Exception {
+	public Log(String data)  {
 
 		String[] arr = data.split(";");
@@ -84,8 +88,7 @@
 		this.class_type = arr[4];
 		this.priority = arr[5];
-		// this.timestamp = "2008" + arr[6] + arr[7] + arr[8] + arr[9] +
-		// arr[10];
-		this.timestamp = getTime(arr[7] + "/" + arr[6] + "/2008:" + arr[8]
+		this.timestamp = getTime(arr[7] + "/" + arr[6] + ":" + arr[8]
 				+ ":" + arr[9] + ":" + arr[10]);
+//		this.timestamp = now.getTime();
 		this.source = arr[11];
 		this.destination = arr[12];
@@ -98,5 +101,5 @@
 
 	}
-
+	Date now = new Date(); 
 	long timestamp;
 
@@ -107,8 +110,8 @@
 	String source, destination, type, ttl, tos, id, iplen, dgmlen;
 
-	long getTime(String str) throws Exception {
-		SimpleDateFormat sdf = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss",
+	long getTime(String str) {
+		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM:HH:mm:ss",
 				Locale.TAIWAN);
-		Long timestamp = sdf.parse(str).getTime();
+		Long timestamp = sdf.parse(str,new ParsePosition(0)).getTime();
 		return timestamp;
 	}
@@ -121,5 +124,5 @@
 	public static final String TABLE = "table.name";
 
-	static String tableName = "mySnort";
+	static String tableName = "SnortBase";
 
 	static HTable table = null;
@@ -140,7 +143,7 @@
 		public void map(WritableComparable key, Text value,
 				OutputCollector<Text, Writable> output, Reporter reporter)
-				throws IOException {
-
-			try {
+				throws IOException{
+
+//			try {
 
 				Log log = new Log(value.toString());
@@ -181,7 +184,7 @@
 				table.commit(lockId, log.timestamp);
 
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
+//			} catch (Exception e) {
+//				e.printStackTrace();
+//			}
 
 		}
@@ -200,5 +203,5 @@
 	}
 
-	public static void runMapReduce(String table, String inpath)
+	public static void runMapReduce(String tableName, String inpath)
 			throws IOException {
 		Path tempDir = new Path("/tmp/Mylog/");
@@ -207,5 +210,5 @@
 		JobConf jobConf = new JobConf(conf, SnortBase.class);
 		jobConf.setJobName("Snort Parse");
-		jobConf.set(TABLE, table);
+		jobConf.set(TABLE, tableName);
 		// 先省略 自動搜尋目錄的功能
 		/*
@@ -224,4 +227,5 @@
 		jobConf.setNumMapTasks(cluster.getMapTasks());
 		jobConf.setNumReduceTasks(0);
+		fs.delete(tempDir);
 		JobClient.runJob(jobConf);
 		fs.delete(tempDir);
@@ -248,5 +252,5 @@
 
 	public static void main(String[] args) throws IOException, Exception {
-		String table_name = "snort";
+
 		String path = "/user/waue/alert_meta";
 
@@ -256,7 +260,7 @@
 		 * SnortParser("/tmp/alert","/tmp/alert_SnortBase"); sp.parseToLine();
 		 */
-		creatTable(table_name);
-
-		runMapReduce(table_name, path);
+		creatTable(tableName);
+
+		runMapReduce(tableName, path);
 
 	}
