arina-ielchiieva commented on a change in pull request #1345: DRILL-6494: Drill 
Plugins Handler
URL: https://github.com/apache/drill/pull/1345#discussion_r199800215
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/ActionOnFile.java
 ##########
 @@ -0,0 +1,68 @@
+package org.apache.drill.exec.store;
+
+import org.apache.drill.common.config.CommonConstants;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * The action on the {@link CommonConstants#STORAGE_PLUGINS_OVERRIDE_CONF} 
file being performed after it's use
+ */
+public enum ActionOnFile {
+
+  NONE {
+    @Override
+    void action(URL url) {
+      // nothing to do
+    }
+  },
+  RENAME {
+    @Override
+    void action(URL url) {
+      File pluginsOverrideFile = new File(url.getPath());
+      String oldName = CommonConstants.STORAGE_PLUGINS_OVERRIDE_CONF;
 
 Review comment:
   No need to use constant, file name can be taken from URL and thus 
`ActionOnFile` can be used for other files, not only for storage plugin 
override conf.

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


With regards,
Apache Git Services

Reply via email to