pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] aahmed-se commented on a change in pull request #3168: Refactor api commands
Date Tue, 18 Dec 2018 22:43:53 GMT
aahmed-se commented on a change in pull request #3168: Refactor api commands
URL: https://github.com/apache/pulsar/pull/3168#discussion_r242733916
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
 ##########
 @@ -1147,16 +1075,17 @@ public Response triggerFunction(final String tenant,
         }
     }
 
-    public Response getFunctionState(final String tenant,
-                                     final String namespace,
-                                     final String functionName,
-                                     final String key) {
+    public FunctionState getFunctionState(final String tenant,
+                                          final String namespace,
+                                          final String functionName,
+                                          final String key) {
+
         if (!isWorkerServiceAvailable()) {
-            return getUnavailableResponse();
+            throwUnavailableException();
         }
 
         if (null == worker().getStateStoreAdminClient()) {
-            return getStateStoreUnvailableResponse();
+            getStateStoreUnvailableResponse();
 
 Review comment:
   We are throwing an exception why would there be a return value

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message