You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/02/01 11:41:06 UTC

[GitHub] avplatonov commented on a change in pull request #6001: IGNITE-11137: IgniteModelStorage improvements for IgniteModel and SQL functionality

avplatonov commented on a change in pull request #6001: IGNITE-11137: IgniteModelStorage improvements for IgniteModel and SQL functionality
URL: https://github.com/apache/ignite/pull/6001#discussion_r253018822
 
 

 ##########
 File path: modules/ml/src/main/java/org/apache/ignite/ml/inference/IgniteModelStorageUtil.java
 ##########
 @@ -112,7 +135,20 @@ private static void saveModelStorage(byte[] serializedMdl, UUID mdlId) {
 
         ModelStorage storage = new ModelStorageFactory().getModelStorage(ignite);
         storage.mkdirs(IGNITE_MDL_FOLDER);
-        storage.putFile(IGNITE_MDL_FOLDER + "/" + mdlId, serializedMdl);
+        storage.putFile(IGNITE_MDL_FOLDER + "/" + mdlId, serializedMdl, true);
+    }
+
+    /**
+     * Removes model with specified identifier from model storage.
+     *
+     * @param mdlId Model identifier.
+     */
+    private static void removeModelStorage(UUID mdlId) {
+        Ignite ignite = Ignition.ignite();
+
+        ModelStorage storage = new ModelStorageFactory().getModelStorage(ignite);
+        storage.mkdirs(IGNITE_MDL_FOLDER);
 
 Review comment:
   there is no need to "mkdirs" here
   you have added directories after first save

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


With regards,
Apache Git Services