You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by kalliopi kalantzaki <kk...@yahoo.gr.INVALID> on 2016/12/16 14:30:54 UTC

DRPC http request

Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...
 

Re: Σχετ: Σχετ: DRPC http request

Posted by Bobby Evans <ev...@yahoo-inc.com.INVALID>.
Without looking at your setup I really don't know. - Bobby 

    On Saturday, December 17, 2016 3:46 AM, "tsantalos-spamia@yahoo.gr.INVALID" <ts...@yahoo.gr.INVALID> wrote:
 

 Thank you for your help. It seems that the problem is somewhere else as i have tried all possible urls.  In fact, if i simply run the ManualDRCP strom example and then hit the url, nothing works... I suppose i should make some other configurations....??  


    Στις 10:56 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 "exclamation" is the function, not "exclaim" the url should be http://localhost:3774/drpc/exclamation/aaa "exclaim" is the name of your topology, not the name of the function. - Bobby 

    On Friday, December 16, 2016 2:52 PM, "tsantalos-spamia@yahoo.gr.INVALID" <ts...@yahoo.gr.INVALID> wrote:
 

 Ok, for the following typical storm example, how am I supposed to send a request over http ?? I see that via calling drpc.execute("exclamation", "aaa") you send the request aaa. The corresponding url over http?? The  http://localhost:3774/drpc/exclaim/aaa  does not work        
             TopologyBuilder builder = new TopologyBuilder();
            
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();

            DRPCSpout spout = new DRPCSpout("exclamation", drpc);
            builder.setSpout("drpc", spout);
            builder.setBolt("exclaim", new ExclamationBolt(), 3).shuffleGrouping("drpc");
            builder.setBolt("return", new ReturnResults(), 3).shuffleGrouping("exclaim");

            Config conf = new Config();
            cluster.submitTopology("exclaim", conf, builder.createTopology()) ;
            System.out.println(drpc.execute("exclamation", "aaa"));
Thank you in advance. 
 

    Στις 6:58 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 By default the http port for DRPC is 3774.  DRPC also requires a function and a payload.  Your topology that is using DRPC should have been configured with a function to use.  I don't know what that function is but you should know because you have launched your own topology.  If you have configured and launched a DRPC server on localhost and the function your are using is test, and you want to send a payload of payload to the topology, then you could do something like
curl http://localhost:3774/drpc/test/payload
If your payload is too large/complex to include in a URL, then you can POST your payload to http://localhost:3774/drpc/test
 - Bobby 

    On Friday, December 16, 2016 9:48 AM, kalliopi kalantzaki <kk...@yahoo.gr.INVALID> wrote:
 

 Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...
 

  

  

  

  

   

Σχετ: Σχετ: DRPC http request

Posted by ts...@yahoo.gr.INVALID.
Thank you for your help. It seems that the problem is somewhere else as i have tried all possible urls.  In fact, if i simply run the ManualDRCP strom example and then hit the url, nothing works... I suppose i should make some other configurations....??  


    Στις 10:56 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 "exclamation" is the function, not "exclaim" the url should be http://localhost:3774/drpc/exclamation/aaa "exclaim" is the name of your topology, not the name of the function. - Bobby 

    On Friday, December 16, 2016 2:52 PM, "tsantalos-spamia@yahoo.gr.INVALID" <ts...@yahoo.gr.INVALID> wrote:
 

 Ok, for the following typical storm example, how am I supposed to send a request over http ?? I see that via calling drpc.execute("exclamation", "aaa") you send the request aaa. The corresponding url over http?? The  http://localhost:3774/drpc/exclaim/aaa  does not work        
             TopologyBuilder builder = new TopologyBuilder();
            
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();

            DRPCSpout spout = new DRPCSpout("exclamation", drpc);
            builder.setSpout("drpc", spout);
            builder.setBolt("exclaim", new ExclamationBolt(), 3).shuffleGrouping("drpc");
            builder.setBolt("return", new ReturnResults(), 3).shuffleGrouping("exclaim");

            Config conf = new Config();
            cluster.submitTopology("exclaim", conf, builder.createTopology()) ;
            System.out.println(drpc.execute("exclamation", "aaa"));
Thank you in advance. 
 

    Στις 6:58 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 By default the http port for DRPC is 3774.  DRPC also requires a function and a payload.  Your topology that is using DRPC should have been configured with a function to use.  I don't know what that function is but you should know because you have launched your own topology.  If you have configured and launched a DRPC server on localhost and the function your are using is test, and you want to send a payload of payload to the topology, then you could do something like
curl http://localhost:3774/drpc/test/payload
If your payload is too large/complex to include in a URL, then you can POST your payload to http://localhost:3774/drpc/test
 - Bobby 

    On Friday, December 16, 2016 9:48 AM, kalliopi kalantzaki <kk...@yahoo.gr.INVALID> wrote:
 

 Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...
 

  

  

  

   

Re: Σχετ: DRPC http request

Posted by Bobby Evans <ev...@yahoo-inc.com.INVALID>.
"exclamation" is the function, not "exclaim" the url should be http://localhost:3774/drpc/exclamation/aaa "exclaim" is the name of your topology, not the name of the function. - Bobby 

    On Friday, December 16, 2016 2:52 PM, "tsantalos-spamia@yahoo.gr.INVALID" <ts...@yahoo.gr.INVALID> wrote:
 

 Ok, for the following typical storm example, how am I supposed to send a request over http ?? I see that via calling drpc.execute("exclamation", "aaa") you send the request aaa. The corresponding url over http?? The  http://localhost:3774/drpc/exclaim/aaa  does not work        
             TopologyBuilder builder = new TopologyBuilder();
            
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();

            DRPCSpout spout = new DRPCSpout("exclamation", drpc);
            builder.setSpout("drpc", spout);
            builder.setBolt("exclaim", new ExclamationBolt(), 3).shuffleGrouping("drpc");
            builder.setBolt("return", new ReturnResults(), 3).shuffleGrouping("exclaim");

            Config conf = new Config();
            cluster.submitTopology("exclaim", conf, builder.createTopology()) ;
            System.out.println(drpc.execute("exclamation", "aaa"));
Thank you in advance. 
 

    Στις 6:58 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 By default the http port for DRPC is 3774.  DRPC also requires a function and a payload.  Your topology that is using DRPC should have been configured with a function to use.  I don't know what that function is but you should know because you have launched your own topology.  If you have configured and launched a DRPC server on localhost and the function your are using is test, and you want to send a payload of payload to the topology, then you could do something like
curl http://localhost:3774/drpc/test/payload
If your payload is too large/complex to include in a URL, then you can POST your payload to http://localhost:3774/drpc/test
 - Bobby 

    On Friday, December 16, 2016 9:48 AM, kalliopi kalantzaki <kk...@yahoo.gr.INVALID> wrote:
 

 Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...
 

  

  

   

Σχετ: DRPC http request

Posted by ts...@yahoo.gr.INVALID.
Ok, for the following typical storm example, how am I supposed to send a request over http ?? I see that via calling drpc.execute("exclamation", "aaa") you send the request aaa. The corresponding url over http?? The  http://localhost:3774/drpc/exclaim/aaa  does not work        
             TopologyBuilder builder = new TopologyBuilder();
            
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();

            DRPCSpout spout = new DRPCSpout("exclamation", drpc);
            builder.setSpout("drpc", spout);
            builder.setBolt("exclaim", new ExclamationBolt(), 3).shuffleGrouping("drpc");
            builder.setBolt("return", new ReturnResults(), 3).shuffleGrouping("exclaim");

            Config conf = new Config();
            cluster.submitTopology("exclaim", conf, builder.createTopology()) ;
            System.out.println(drpc.execute("exclamation", "aaa"));
Thank you in advance. 
 

    Στις 6:58 μ.μ. Παρασκευή, 16 Δεκεμβρίου 2016, ο/η Bobby Evans <ev...@yahoo-inc.com.INVALID> έγραψε:
 

 By default the http port for DRPC is 3774.  DRPC also requires a function and a payload.  Your topology that is using DRPC should have been configured with a function to use.  I don't know what that function is but you should know because you have launched your own topology.  If you have configured and launched a DRPC server on localhost and the function your are using is test, and you want to send a payload of payload to the topology, then you could do something like
curl http://localhost:3774/drpc/test/payload
If your payload is too large/complex to include in a URL, then you can POST your payload to http://localhost:3774/drpc/test
 - Bobby 

    On Friday, December 16, 2016 9:48 AM, kalliopi kalantzaki <kk...@yahoo.gr.INVALID> wrote:
 

 Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...
 

  

   

Re: DRPC http request

Posted by Bobby Evans <ev...@yahoo-inc.com.INVALID>.
By default the http port for DRPC is 3774.  DRPC also requires a function and a payload.  Your topology that is using DRPC should have been configured with a function to use.  I don't know what that function is but you should know because you have launched your own topology.  If you have configured and launched a DRPC server on localhost and the function your are using is test, and you want to send a payload of payload to the topology, then you could do something like
curl http://localhost:3774/drpc/test/payload
If your payload is too large/complex to include in a URL, then you can POST your payload to http://localhost:3774/drpc/test
 - Bobby 

    On Friday, December 16, 2016 9:48 AM, kalliopi kalantzaki <kk...@yahoo.gr.INVALID> wrote:
 

 Hello, 

I am confused probably by something  quite trivial for most drpc users. I have implemented an initial Drpc storm project. My questions are:    
1) If a third party wants to post an http request to my drcp application, how is this possible? I have found that this is made according to http://drpc_server:drpc_http_port/drpc/app/request_to_post. 
However, this does not work... I have configured my drpc server as localhost, according to default configurations on storm. 

2) If this is possible in storm, how can i get this value (the request_to_post value) in my application? I haven't found any documentation on that...