You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/04/21 16:19:01 UTC

[GitHub] [ignite-python-thin-client] ivandasch opened a new pull request #35: IGNITE-14595 Implement ExpiryPolicy support.

ivandasch opened a new pull request #35:
URL: https://github.com/apache/ignite-python-thin-client/pull/35


   


-- 
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] [ignite-python-thin-client] asfgit closed pull request #35: IGNITE-14595 Implement ExpiryPolicy support.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #35:
URL: https://github.com/apache/ignite-python-thin-client/pull/35


   


-- 
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] [ignite-python-thin-client] isapego commented on a change in pull request #35: IGNITE-14595 Implement ExpiryPolicy support.

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #35:
URL: https://github.com/apache/ignite-python-thin-client/pull/35#discussion_r618615084



##########
File path: examples/expiry_policy.py
##########
@@ -0,0 +1,110 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+import asyncio
+import time
+
+from pyignite import Client, AioClient
+from pyignite.datatypes import ExpiryPolicy
+from pyignite.datatypes.prop_codes import PROP_NAME, PROP_EXPIRY_POLICY
+
+
+def main():
+    print("Running sync ExpiryPolicy example.")
+
+    client = Client()
+    with client.connect('127.0.0.1', 10800):
+        if not client.protocol_context.is_expiry_policy_supported():

Review comment:
       I'm not sure this should be a public API. At least for other thin clients it is not.

##########
File path: examples/expiry_policy.py
##########
@@ -0,0 +1,110 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+import asyncio
+import time
+
+from pyignite import Client, AioClient
+from pyignite.datatypes import ExpiryPolicy
+from pyignite.datatypes.prop_codes import PROP_NAME, PROP_EXPIRY_POLICY
+
+
+def main():
+    print("Running sync ExpiryPolicy example.")
+
+    client = Client()
+    with client.connect('127.0.0.1', 10800):
+        if not client.protocol_context.is_expiry_policy_supported():
+            print("'ExpiryPolicy' is not supported by cluster.")

Review comment:
       Should we not stop the example after this print?

##########
File path: examples/failover.py
##########
@@ -26,31 +26,30 @@
 ]
 
 
-def main():

Review comment:
       Why remove main?




-- 
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] [ignite-python-thin-client] ivandasch commented on a change in pull request #35: IGNITE-14595 Implement ExpiryPolicy support.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #35:
URL: https://github.com/apache/ignite-python-thin-client/pull/35#discussion_r618663012



##########
File path: examples/failover.py
##########
@@ -26,31 +26,30 @@
 ]
 
 
-def main():

Review comment:
       This was accidential mistake from previous commits, I just fixed it.




-- 
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] [ignite-python-thin-client] ivandasch commented on a change in pull request #35: IGNITE-14595 Implement ExpiryPolicy support.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #35:
URL: https://github.com/apache/ignite-python-thin-client/pull/35#discussion_r618662556



##########
File path: examples/expiry_policy.py
##########
@@ -0,0 +1,110 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+import asyncio
+import time
+
+from pyignite import Client, AioClient
+from pyignite.datatypes import ExpiryPolicy
+from pyignite.datatypes.prop_codes import PROP_NAME, PROP_EXPIRY_POLICY
+
+
+def main():
+    print("Running sync ExpiryPolicy example.")
+
+    client = Client()
+    with client.connect('127.0.0.1', 10800):
+        if not client.protocol_context.is_expiry_policy_supported():

Review comment:
       Yep, changed to catch Exception

##########
File path: examples/expiry_policy.py
##########
@@ -0,0 +1,110 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+import asyncio
+import time
+
+from pyignite import Client, AioClient
+from pyignite.datatypes import ExpiryPolicy
+from pyignite.datatypes.prop_codes import PROP_NAME, PROP_EXPIRY_POLICY
+
+
+def main():
+    print("Running sync ExpiryPolicy example.")
+
+    client = Client()
+    with client.connect('127.0.0.1', 10800):
+        if not client.protocol_context.is_expiry_policy_supported():
+            print("'ExpiryPolicy' is not supported by cluster.")

Review comment:
       Yep, fixed




-- 
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