apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject incubator-apex-malhar git commit: APEXMALHAR-2051 #comment removed redundant StorageAgent interface
Date Tue, 12 Apr 2016 18:39:07 GMT
Repository: incubator-apex-malhar
Updated Branches:
  refs/heads/master c4052f8c6 -> fac986b04


APEXMALHAR-2051 #comment removed redundant StorageAgent interface


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/commit/fac986b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/tree/fac986b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/diff/fac986b0

Branch: refs/heads/master
Commit: fac986b043d1bbdeb69b95ddb24f22b1ec9ab56e
Parents: c4052f8
Author: Ashish <ashish@ampool.io>
Authored: Tue Apr 12 23:43:13 2016 +0530
Committer: Ashish <ashish@ampool.io>
Committed: Tue Apr 12 23:43:13 2016 +0530

----------------------------------------------------------------------
 .../lib/util/AbstractKeyValueStorageAgent.java  |  4 +-
 .../com/datatorrent/lib/util/StorageAgent.java  | 98 --------------------
 2 files changed, 2 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/fac986b0/library/src/main/java/com/datatorrent/lib/util/AbstractKeyValueStorageAgent.java
----------------------------------------------------------------------
diff --git a/library/src/main/java/com/datatorrent/lib/util/AbstractKeyValueStorageAgent.java
b/library/src/main/java/com/datatorrent/lib/util/AbstractKeyValueStorageAgent.java
index 520877b..b474535 100644
--- a/library/src/main/java/com/datatorrent/lib/util/AbstractKeyValueStorageAgent.java
+++ b/library/src/main/java/com/datatorrent/lib/util/AbstractKeyValueStorageAgent.java
@@ -22,12 +22,12 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.List;
 
+import com.datatorrent.api.StorageAgent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.datatorrent.api.Attribute.AttributeMap;
 import com.datatorrent.api.Context.DAGContext;
-import com.datatorrent.lib.util.StorageAgent.ApplicationAwareStorageAgent;
 
 /**
  * Abstract implementation of {@link ApplicationAwareStorageAgent} which can be
@@ -40,7 +40,7 @@ import com.datatorrent.lib.util.StorageAgent.ApplicationAwareStorageAgent;
  *          Store implementation
  */
 public abstract class AbstractKeyValueStorageAgent<S extends StorageAgentKeyValueStore>
-    implements ApplicationAwareStorageAgent, Serializable
+    implements StorageAgent.ApplicationAwareStorageAgent, Serializable
 {
 
   protected S store;

http://git-wip-us.apache.org/repos/asf/incubator-apex-malhar/blob/fac986b0/library/src/main/java/com/datatorrent/lib/util/StorageAgent.java
----------------------------------------------------------------------
diff --git a/library/src/main/java/com/datatorrent/lib/util/StorageAgent.java b/library/src/main/java/com/datatorrent/lib/util/StorageAgent.java
deleted file mode 100644
index 7e2ce67..0000000
--- a/library/src/main/java/com/datatorrent/lib/util/StorageAgent.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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 com.datatorrent.lib.util;
-
-import java.io.IOException;
-
-import com.datatorrent.api.Attribute.AttributeMap;
-
-/**
- * Interface to define writing/reading checkpoint state of any operator.
- *
- * @since 0.9.4
- */
-public interface StorageAgent
-{
-  /**
-   * Save the object so that the same object can be loaded later using the given combination
of
-   * operatorId and windowId.
-   *
-   * Typically the storage agent would serialize the state of the object during the save
state.
-   * The serialized state can be accessed from anywhere on the cluster to recreate the object
-   * through the load callback.
-   *
-   * @param object - The operator whose state needs to be saved.
-   * @param operatorId - Identifier of the operator.
-   * @param windowId - Identifier for the specific state of the operator.
-   * @throws IOException
-   */
-  public void save(Object object, int operatorId, long windowId) throws IOException;
-
-  /**
-   * Get the input stream from which can be used to retrieve the stored objects back.
-   *
-   * @param operatorId Id for which the object was previously saved
-   * @param windowId WindowId for which the object was previously saved
-   * @return object (or a copy of it) which was saved earlier using the save call.
-   * @throws IOException
-   */
-  public Object load(int operatorId, long windowId) throws IOException;
-
-  /**
-   * Delete the artifacts related to store call of the operatorId and the windowId.
-   *
-   * Through this call, the agent is informed that the object saved against the operatorId
-   * and the windowId together will not be needed again.
-   *
-   * @param operatorId
-   * @param windowId
-   * @throws IOException
-   */
-  public void delete(int operatorId, long windowId) throws IOException;
-
-  /**
-   * Return an array windowId for which the object was saved but not deleted.
-   *
-   * The set is essentially difference between two sets. The first set contains
-   * all the windowIds passed using the successful save calls. The second set contains all
-   * the windowIds passed using the successful delete calls.
-   *
-   * @param operatorId - The operator for which the state was saved.
-   * @return Collection of windowIds for available states that can be retrieved through load.
-   * @throws IOException
-   */
-  public long[] getWindowIds(int operatorId) throws IOException;
-
-  /**
-   * Interface to pass application attributes to storage agent
-   * 
-   *
-   */
-  public interface ApplicationAwareStorageAgent extends StorageAgent
-  {
-   
-    /**
-     * Passes attributes of application to storage agent
-     * 
-     * @param map attributes of application
-     */
-    public void setApplicationAttributes(AttributeMap map);
-  }
-
-}


Mime
View raw message