David’s Thesis Blog


Yahoo Search API
August 21, 2008, 2:43 pm
Filed under: Uncategorized

Still in early stages but I have managed to implement Yahoo websearch with the tester.

C:\PerfTester>dir/w
 Volume in drive C is alpha
 Volume Serial Number is 4CD2-9295

 Directory of C:\PerfTester

[.]           [..]          [build]       build.xml     [doc]
setenv.bat    [src]         test.prop     Tester.java
               4 File(s)          7,031 bytes
               5 Dir(s)  141,264,662,528 bytes free

C:\PerfTester>ant test
Buildfile: build.xml

test:
     [java] test config fileName = C:\PerfTester\test.prop
     [java] Tester.init(C:\PerfTester\test.prop) called
     [java] — listing properties —
     [java] testName=Hello
     [java] testWarmup=5
     [java] testCooldown=5
     [java] testClassName=HelloTester
     [java] testThreadNmuber=10
     [java] testRuntime=10000
     [java] Tester.run() called
     [java] testThreadNmuber = 10
     [java] To instance a test driver
     [java] Exception in thread “Thread-6” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: java.lang.ClassNotFoundException: com.yahoo.search.Search
Client
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

     [java]     … 4 more
     [java] Exception in thread “Thread-1” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-9” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-7” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-3” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-8” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-2” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java] Thread-0 : exited
     [java]     at HelloTester.run(HelloTester.java:36)
     [java] Thread-1 : exited
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java] Thread-2 : exited
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Thread-3 : exited
     [java] Exception in thread “Thread-0” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread “Thread-5” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java]     at HelloTester.run(HelloTester.java:36)
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java] Thread-4 : exited
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Thread-5 : exited
     [java] Exception in thread “Thread-4” java.lang.NoClassDefFoundError: com/y
ahoo/search/SearchClient
     [java] Thread-6 : exited
     [java]     at HelloTester.run(HelloTester.java:36)
     [java] Thread-7 : exited
     [java]     at com.shiping.test.TestDriver.Test(Unknown Source)
     [java] Thread-8 : exited
     [java]     at com.shiping.test.TestDriver.run(Unknown Source)
     [java] Thread-9 : exited
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java]
     [java] Tester.report() called
     [java] testName = Hello
     [java] minValue = 999999999
     [java] aveValue = 0
     [java] maxValue = 0

BUILD SUCCESSFUL
Total time: 0 seconds
C:\PerfTester>ant test
Buildfile: build.xml

test:
     [java] test config fileName = C:\PerfTester\test.prop
     [java] Tester.init(C:\PerfTester\test.prop) called
     [java] — listing properties —
     [java] testName=Hello
     [java] testWarmup=5
     [java] testCooldown=5
     [java] testClassName=HelloTester
     [java] testThreadNmuber=10
     [java] testRuntime=10000
     [java] Tester.run() called
     [java] testThreadNmuber = 10
     [java] To instance a test driver
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Found 904000000 hits for java! Displaying the first 10.
     [java] Thread-0 : exited
     [java] Thread-1 : exited
     [java] Thread-2 : exited
     [java] Thread-3 : exited
     [java] Thread-4 : exited
     [java] Thread-5 : exited
     [java] Thread-6 : exited
     [java] Thread-7 : exited
     [java] Thread-8 : exited
     [java] Thread-9 : exited
     [java]
     [java] Tester.report() called
     [java] testName = Hello
     [java] minValue = 732
     [java] aveValue = 1193
     [java] maxValue = 2026
     [java] 740 2
     [java] 840 2
     [java] 860 2
     [java] 880 5
     [java] 900 6
     [java] 920 7
     [java] 940 9
     [java] 960 5
     [java] 980 2
     [java] 1000        9
     [java] 1020        1
     [java] 1080        2
     [java] 1120        1
     [java] 1180        2
     [java] 1500        1
     [java] 1640        3
     [java] 1660        5
     [java] 1680        1
     [java] 1700        1
     [java] 1720        1
     [java] 1740        1
     [java] 1760        1
     [java] 1800        1
     [java] 1860        3
     [java] 1880        1
     [java] 1920        2
     [java] 1940        2
     [java] 2040        2

BUILD SUCCESSFUL
Total time: 14 seconds
C:\PerfTester>

As you can see there was some intial problems building it but that was quickly resolved and at the moment it calls YahooWeb search for results of the search term “java”.

Advertisements

Leave a Comment so far
Leave a comment



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: