igalshilman commented on a change in pull request #182:
URL: https://github.com/apache/flink-statefun/pull/182#discussion_r533338407
##########
File path: statefun-examples/statefun-async-python-example/statefun/module.yaml
##########
@@ -12,20 +12,23 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-version: "1.0"
+version: "3.0"
module:
meta:
type: remote
spec:
- functions:
- - function:
+ endpoints:
+ - endpoint:
meta:
kind: http
- type: example/greeter
spec:
- endpoint: http://python-worker:8000/statefun
+ typename:
+ namespace: example
+ function: greeter
Review comment:
As discussed offline, this needs to match the current term `type`.
##########
File path:
statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/StatefulFunctionsUniverse.java
##########
@@ -85,7 +87,14 @@ public StatefulFunctionsUniverse(MessageFactoryKey
messageFactoryKey) {
public void bindFunctionProvider(FunctionType functionType,
StatefulFunctionProvider provider) {
Objects.requireNonNull(functionType);
Objects.requireNonNull(provider);
- putAndThrowIfPresent(functions, functionType, provider);
+ putAndThrowIfPresent(specificFunctionProviders, functionType, provider);
+ }
+
+ @Override
+ public void bindFunctionProvider(String namespace, StatefulFunctionProvider
provider) {
Review comment:
@tzulitai, what do you feel about adding a
`FunctionTypeNamespaceSelector` type to the SDk,
and make that method:
`bindFunctionProvider(FunctionTypeNamespaceSelector typeSelector,
StatefulFunctionProvider provider)` ?
This will communicate the intention a bit better, and make it more
extensible for overloading in the future (for example add a
`FunctionTypeNamespacePrefixSelector`)
----------------------------------------------------------------
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]