for (int i=0; i < Integer.parseInt(args[1]); i++) {
//String argstr[] = {"\'" + dg.getDocument() + "\'"};
//System.out.println(dg.getDocument() + "\n\n");
String doc = dg.getDocument();
IndexerReturnCode result = indexerStub.index(doc);
while (result == IndexerReturnCode.RETRY_QUEUE_FULL) {
System.out.println("queue full " + new Date());
try {
Thread.sleep(1000);
}