Zhangyx39 commented on a change in pull request #982: SAMZA-2153: Implement to 
Config for TableRetryPolicy
URL: https://github.com/apache/samza/pull/982#discussion_r277506066
 
 

 ##########
 File path: 
samza-api/src/main/java/org/apache/samza/table/retry/TableRetryPolicy.java
 ##########
 @@ -256,4 +266,30 @@ public BackoffType getBackoffType() {
   public RetryPredicate getRetryPredicate() {
     return retryPredicate;
   }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Map<String, String> toConfig(Config jobConfig, Config tableConfig) {
+    final Gson gson = new 
GsonBuilder().excludeFieldsWithModifiers(Modifier.TRANSIENT, 
Modifier.STATIC).create();
+    return Collections.singletonMap(JavaTableConfig.buildKey(tableId, 
this.getClass().getCanonicalName()),
 
 Review comment:
   But if we don't keep the ClassName, this key will be the same as the key we 
have been using to (de)serialize the TableRetryPolicy. And thus it will 
override the existing key. I suggest we use a short ClassName here without the 
namespace.

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


With regards,
Apache Git Services

Reply via email to