package tutorial.storm.trident;

import backtype.storm.generated.DRPCExecutionException;
import backtype.storm.utils.DRPCClient;
import org.apache.thrift7.TException;

/**
 * @author Enno Shioji (eshioji@gmail.com)
 */
public class DrpcTestClient {
    public static void main(String[] args) throws TException, DRPCExecutionException {
        DRPCClient cl = new DRPCClient("localhost",3772, 3000);
        System.out.println(cl.execute("ping", "ted"));

    }
}

@@ -393,16 +393,202 @@
  3000);%0A
+        if (args.length != 2)%7B%0A            System.err.println(%22%3CfunctionName%3E %3Carguments%3E%22);%0A        %7Delse%7B%0A            String func = args%5B0%5D;%0A            String argument = args%5B1%5D;%0A    
         
@@ -621,24 +621,35 @@
 ute(
-%22ping%22, %22ted%22));
+func, argument));%0A        %7D
 %0A%0A  

Generalize the test DRPC client