String pathOfIpAddressFile = args[0];
String inputPathSeqFile = args[1];
String ipAddress = getListOfIpAddresses(pathOfIpAddressFile);
MemcachedClient myMCC = new MemcachedClient(AddrUtil.getAddresses(ipAddress));
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
SequenceFile.Reader reader = new SequenceFile.Reader(fs, new Path(inputPathSeqFile),
new Configuration());
Text text = new Text();
FloatWritable f = new FloatWritable();
long startTime = System.currentTimeMillis();
int cnt = 0;
while (reader.next(text, f)) {
if ( cnt % 1000 == 0 )
System.out.print(".");
// System.out.println(text + " " + f);
Object obj = myMCC.get(text.toString());
if (obj == null)
throw new RuntimeException("Error getting from memcache: key=" + text);
cnt++;
}
reader.close();