You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by sa...@apache.org on 2019/05/18 01:04:11 UTC

[pulsar] branch master updated: In Java we replace all "-" with "_" for state table namespace. (#4301)

This is an automated email from the ASF dual-hosted git repository.

sanjeevrk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 831476b  In Java we replace all "-" with "_" for state table namespace. (#4301)
831476b is described below

commit 831476b9bcf62af3d56c5245e83611b2842bfaca
Author: Sanjeev Kulkarni <sa...@gmail.com>
AuthorDate: Fri May 17 18:04:04 2019 -0700

    In Java we replace all "-" with "_" for state table namespace. (#4301)
    
    We need to do the same for python functions
---
 pulsar-functions/instance/src/main/python/python_instance.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsar-functions/instance/src/main/python/python_instance.py b/pulsar-functions/instance/src/main/python/python_instance.py
index 86f8644..d6ff4fb 100644
--- a/pulsar-functions/instance/src/main/python/python_instance.py
+++ b/pulsar-functions/instance/src/main/python/python_instance.py
@@ -328,6 +328,7 @@ class PythonInstance(object):
   def setup_state(self):
     table_ns = "%s_%s" % (str(self.instance_config.function_details.tenant),
                           str(self.instance_config.function_details.namespace))
+    table_ns = table_ns.replace("-", "_")
     table_name = str(self.instance_config.function_details.name)
     return state_context.create_state_context(self.state_storage_serviceurl, table_ns, table_name)