mynameborat commented on a change in pull request #955: SAMZA-2131: [Scala 
cleanup] Convert FileSystemCheckpointManagerConfig.scala and SystemConfig.scala 
to Java
URL: https://github.com/apache/samza/pull/955#discussion_r268788137
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/config/FileSystemCheckpointManagerConfig.java
 ##########
 @@ -16,16 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.samza.config;
 
-package org.apache.samza.config
+import java.util.Optional;
 
-object FileSystemCheckpointManagerConfig {
-  // file system checkpoint manager config constants
-  val CHECKPOINT_MANAGER_ROOT = "task.checkpoint.path" // system name to use 
when sending offset checkpoints
 
-  implicit def Config2FSCP(config: Config) = new 
FileSystemCheckpointManagerConfig(config)
-}
+public class FileSystemCheckpointManagerConfig extends MapConfig {
+  /**
+   * Path on local file system where checkpoints should be stored.
+   */
+  private static final String CHECKPOINT_MANAGER_ROOT = "task.checkpoint.path";
 
 Review comment:
   I see your point. here is my opinion on this pattern
   1. I am not sure if the string in the test is going to be considered as yet 
another place where the config is used and get simply renamed as opposed to 
insisting its importance to remind backward compatibility.
   2. I also feel this new pattern targets only this config and we still need 
to apply this across our configs.
   
   For these reasons, I'd prefer to reuse the variable.
   
   In general, I agree maintaining backwards compatibility of configurations 
and treating them as public API isn't quite intuitive. One option to make it 
more explicit and intuitive is to move configurations to samza-api module. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to