fantapsody opened a new issue #9753:
URL: https://github.com/apache/pulsar/issues/9753


   **Is your enhancement request related to a problem? Please describe.**
   When specifying resources in either function worker configuration 
(min/max/...) or function APIs (creation), the specified value must be an 
explicit number, just as the [official 
example](http://pulsar.apache.org/docs/en/functions-deploy/) shows:
   ```bash
   $ bin/pulsar-admin functions create \
     --jar target/my-functions.jar \
     --classname org.example.functions.MyFunction \
     --cpu 8 \
     --ram 8589934592 \
     --disk 10737418240
   ```
   Especially for the storage which could be a large number, it's tedious and 
error-prone to specify these values as decimals explicitly. 
   
   **Describe the solution you'd like**
   Maybe pulsar could take the example of the pattern of [how Kubernetes define 
the value of 
resources](https://github.com/kubernetes/apimachinery/blob/17b79e78ed4ac42a54a132a541fea663fbbd80cd/pkg/api/resource/quantity.go#L264):
   - 12Mi: 12 * (2 ^ 20)
   - 12M: 12 * (10 ^ 6)
   - 1000m: 1 cpu
   
   **Describe alternatives you've considered**
   Maybe the storage quantity should be prioritized.
   
   **Additional context**
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to