[ 
https://issues.apache.org/jira/browse/GEODE-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284359#comment-16284359
 ] 

ASF GitHub Bot commented on GEODE-3799:
---------------------------------------

dschneider-pivotal commented on a change in pull request #1109: GEODE-3799: 
Move backups towards a pluggable architecture
URL: https://github.com/apache/geode/pull/1109#discussion_r155890079
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDefinition.java
 ##########
 @@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+package org.apache.geode.internal.cache.backup;
+
+import java.nio.file.Path;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.geode.cache.DiskStore;
+
+class BackupDefinition {
 
 Review comment:
   Since BackupDefinition is passed to BackupDestination it seems like it would 
be better to pass an interface instead of a class. If someone implements their 
own BackupDestination I think they would only want the BackupDefinition 
interface to have gettor methods. They are not interested in creating a 
definition but in simply reading an existing definition passed to their 
implementation of the backupFiles method.
   
   Why is RestoreScript part of the BackupDefinition? From an implementor of 
backupFiles it seems like it would either want to know the "Path" that is the 
restore script. But it is unclear how the restore script will work for other 
destinations. Isn't all the meta info the restore script needs encoded already 
in the BackupDefinition itself (ie. all the info on different types of files).
   
   Why is the definition so complex with all the different types of files. For 
the purposes of BackupDestination.backupFiles isn't all it needs is a list of 
Path instances to backup?
   
   It is also unclear to me why this class uses "Path" instead of "File" for 
the files that are being backed up. Given either one you can create the other. 
Path is an interface and File is a class so I would vote for Path. Just 
wondering if other reasons exist for using it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Create plugin system for specifying where a backup is stored
> ------------------------------------------------------------
>
>                 Key: GEODE-3799
>                 URL: https://issues.apache.org/jira/browse/GEODE-3799
>             Project: Geode
>          Issue Type: Sub-task
>          Components: persistence
>            Reporter: Nick Reich
>            Assignee: Nick Reich
>
> The current logic merges the moving/copying of files with the determining of 
> what to backup. To make it possible to store a backup in cloud storage or 
> other locations, we need to separate these concerns, putting the variable, 
> location-based logic, into a plugin architecture.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to