You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "Marcosrico (via GitHub)" <gi...@apache.org> on 2023/03/13 16:29:48 UTC

[GitHub] [helix] Marcosrico commented on a diff in pull request #2401: TTL Node Lattice Implementation

Marcosrico commented on code in PR #2401:
URL: https://github.com/apache/helix/pull/2401#discussion_r1134267056


##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java:
##########
@@ -90,12 +90,17 @@ public void create(String key, Object data, MetaClientInterface.EntryMode mode)
 
   @Override
   public void createWithTTL(String key, T data, long ttl) {
-    throw new UnsupportedOperationException("TTL nodes aren't yet supported.");
+    try{
+      _zkClient.createPersistentWithTTL(key, data, ttl);
+    } catch (ZkException e) {
+      throw translateZkExceptionToMetaclientException(e);
+    }
   }
 
+  //TODO: Implement logic for renewTTL once expiry time can be verified through testing.
   @Override
   public void renewTTLNode(String key) {
-    throw new UnsupportedOperationException("TTL nodes aren't yet supported.");
+    throw new NotImplementedException("Renew TTL node is not available yet.");

Review Comment:
   Sounds good, added the changes



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org