You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/06 23:12:28 UTC

[GitHub] [pulsar] premforgame opened a new issue #8469: Unable to create pulsar function with --window-length-duration-ms or --window-length-count

premforgame opened a new issue #8469:
URL: https://github.com/apache/pulsar/issues/8469


   **Describe the bug**
   
   There are two ways to develop a custom pulsar function. 1.) by implementing interface Function 2.) by implementing WindowFunction. 
   
   Custom pulsar function that is developed using interface Function has a null issue When we try to create function  with options --window-length-duration-ms or --window-length-count. 
   This issue observed in Pulsar version:2.6.1 and Pulsar version-all :2.6.1
   
   bin/pulsar-admin functions create \--jar test.jar --classname com.abcd.xyz.mnop.qrst.function.sample --inputs input --output test --name samplefunction --window-length-count 30000
   null
   
   Reason: null
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   1. Develop a custom pulsar function by implementing  interface Function
   ```
   public class sample implements Function<String, Void> {
   
       @Override   
       public Void process(String input, Context context) throws Exception {
           System.out.println("Test:"+input);
           return null;
       }
   }
   ```
   2. Generate the jar (sample.jar )for this custom pulsar function
   3. Deploy the generated jar (sample.jar) in pulsar container by docker cp sample.jar <pulsar container id>:/pulsar 
   4. login/run the container by docker exec -it <pulsar container id> /bin/bash
   5. Now execute the following command bin/pulsar-admin functions create \--jar sample.jar --classname com.abcd.xyz.mnop.qrst.function.sample --inputs input --output test --name samplefunction --window-length-count 300
   Following error occur
    
   ![image](https://user-images.githubusercontent.com/26475477/98422804-c36e8600-20b2-11eb-8a14-54585584e9c5.png)
   
   
   **Expected behavior**
   Pulsar function should be created with --window-length-duration-ms and --window-length-count options
   
   **Screenshots**
   NA
   
   **Desktop (please complete the following information):**
    - OS: Windows 10, Pulsar in Docker image. Docker version: 2.2.0.4 
   
   **Additional context**
   NA
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] premforgame edited a comment on issue #8469: Unable to create pulsar function with --window-length-duration-ms or --window-length-count

Posted by GitBox <gi...@apache.org>.
premforgame edited a comment on issue #8469:
URL: https://github.com/apache/pulsar/issues/8469#issuecomment-723685742


   > @premforgame Is the generated jar is a fat jar? And is there any more detailed error logs in the function worker or function? Through your screenshot, there is no detailed information. If you can get more error logs, this will help us to find the problem, Thanks.
   
   Yes, the generated jar is a fat jar. Unfortunately I'm unable to find any logs (i.e) usually in docker container once pulsar functions is created in /tmp/functions/<tenant-name>/<namespace-name><pulsar_function>.log will created. But in this case tmp has only these folder. 
   ![image](https://user-images.githubusercontent.com/26475477/98487824-55a99200-224b-11eb-9d6a-e90a992be22b.png)
   moreover even in pulsar/logs pulsar-standalone.log and pulsar.log are empty.
   
   ![image](https://user-images.githubusercontent.com/26475477/98487916-f8621080-224b-11eb-9752-ce770f4fa162.png)
   
   All I could see is these null exception while creating the function.
   ![image](https://user-images.githubusercontent.com/26475477/98488270-1df01980-224e-11eb-8a5d-b2afd9d76278.png)
   
   Let me know if there is any other log that I can look into. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] premforgame commented on issue #8469: Unable to create pulsar function with --window-length-duration-ms or --window-length-count

Posted by GitBox <gi...@apache.org>.
premforgame commented on issue #8469:
URL: https://github.com/apache/pulsar/issues/8469#issuecomment-723685742


   > @premforgame Is the generated jar is a fat jar? And is there any more detailed error logs in the function worker or function? Through your screenshot, there is no detailed information. If you can get more error logs, this will help us to find the problem, Thanks.
   
   Yes, the generated jar is a fat jar. Unfortunately I'm unable to find any logs (i.e) usually in docker container once pulsar functions is created in /tmp/functions/<tenant-name>/<namespace-name><pulsar_function>.log will created. But in this case tmp has only these folder. 
   ![image](https://user-images.githubusercontent.com/26475477/98487824-55a99200-224b-11eb-9d6a-e90a992be22b.png)
   moreover even in pulsar/logs pulsar-standalone.log and pulsar.log are empty.
   
   ![image](https://user-images.githubusercontent.com/26475477/98487916-f8621080-224b-11eb-9752-ce770f4fa162.png)
   
   Let me know if there is any other log that I can look into. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [pulsar] codelipenghui commented on issue #8469: Unable to create pulsar function with --window-length-duration-ms or --window-length-count

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #8469:
URL: https://github.com/apache/pulsar/issues/8469#issuecomment-723375198


   @premforgame Is the generated jar is a fat jar? And is there any more detailed error logs in the function worker or function?  Through your screenshot, there is no detailed information. If you can get more error logs, this will help us to find the problem, Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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