*** empty log message ***
authorhkhang <hkhang>
Mon, 9 Nov 2009 23:46:28 +0000 (23:46 +0000)
committerhkhang <hkhang>
Mon, 9 Nov 2009 23:46:28 +0000 (23:46 +0000)
Robust/src/Benchmarks/Spider/recovery/QueryTask.java
Robust/src/Benchmarks/Spider/recovery/Spider.java

index d8b9a12147bde8f266080e16a511776694b7db64..8064a62471dd43f88e66ae544f2c4afc98dc35f1 100644 (file)
@@ -177,7 +177,6 @@ public class QueryTask extends Task {
                                return null;
                        }
                }
-//             System.out.println("Title = [" + title + "]");
 
                return title;
        }
@@ -226,67 +225,6 @@ public class QueryTask extends Task {
                } while(numchars > 0);
   }
 
-/*
-       public static void readResponse(LocalQuery lq, Socket sock) {
-       //    state 0 - nothing
-       //    state 1 - \r
-       //    state 2 - \r\n
-       //    state 3 - \r\n\r
-       //    state 4 - \r\n\r\n
-    int state=0;
-    while(true) {
-      if (state<4) {
-        if (state==0) {
-          byte[] b=new byte[1];
-          int numchars=sock.read(b);
-          if ((numchars==1)) {
-            if (b[0]=='\r') {
-              state++;
-            }
-          } else
-                                               return;
-        } else if (state==1) {
-          byte[] b=new byte[1];
-          int numchars=sock.read(b);
-          if (numchars==1) {
-            if (b[0]=='\n')
-              state++;
-            else
-              state=0;
-          } else return;
-        } else if (state==2) {
-          byte[] b=new byte[1];
-          int numchars=sock.read(b);
-          if (numchars==1) {
-            if (b[0]=='\r')
-              state++;
-            else
-              state=0;
-          } else return;
-        } else if (state==3) {
-          byte[] b=new byte[1];
-          int numchars=sock.read(b);
-          if (numchars==1) {
-            if (b[0]=='\n')
-              state++;
-            else
-              state=0;
-          } else return;
-        }
-      } else {
-                               byte[] buffer=new byte[1024];
-        int numchars=sock.read(buffer);
-        if (numchars==0)
-          return;
-        else {
-          String curr=(new String(buffer)).subString(0,numchars);
-//                                     System.out.println("numchars = "+numchars);
-                                       lq.response.append(curr);
-        }
-      }
-    }
-  }
-*/
        public void processList() {
                LinkedList ll;
                GlobalString token = null;
@@ -315,7 +253,6 @@ public class QueryTask extends Task {
                        }
                        q.push(workingURL);     
                        results.put(token, q);
-//                     System.out.println("Key : ["+token.toLocalString()+"],["+q.size()+"]");
                }
        }
 
index 11f37189b8b459c1b7a843f864ff26565b0833f4..49b25d89cde7f252c2578816df2c2680f0eacbd0 100644 (file)
@@ -9,17 +9,10 @@ public class Spider {
 
                NUM_THREADS = Integer.parseInt(args[0]);
 
-//             if (args.length == 3) {
-//                     maxDepth = Integer.parseInt(args[2]);
-//             }
-
                GlobalString firstmachine;
                GlobalString firstpage;
 
                int mid[] = new int[NUM_THREADS];
-//             mid[0] = (128<<24)|(195<<16)|(180<<8)|21;        
-//             mid[1] = (128<<24)|(195<<16)|(180<<8)|24;        
-//             mid[2] = (128<<24)|(195<<16)|(180<<8)|26;        
                mid[0] = (128<<24)|(195<<16)|(136<<8)|162;
                mid[1] = (128<<24)|(195<<16)|(136<<8)|163;
                mid[2] = (128<<24)|(195<<16)|(136<<8)|164;