You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by am...@apache.org on 2016/01/14 21:32:12 UTC
[18/26] incubator-asterixdb git commit: Feed Fixes and Cleanup
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedJoint.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedJoint.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedJoint.java
deleted file mode 100644
index 59d807a..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedJoint.java
+++ /dev/null
@@ -1,121 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.List;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.FeedJointKey;
-import org.apache.asterix.common.feeds.FeedConnectionRequest;
-import org.apache.asterix.common.feeds.api.IFeedLifecycleListener.ConnectionLocation;
-
-public interface IFeedJoint {
-
- public enum FeedJointType {
- /** Feed Joint is located at the intake stage of a primary feed **/
- INTAKE,
-
- /** Feed Joint is located at the compute stage of a primary/secondary feed **/
- COMPUTE
- }
-
- public enum State {
- /** Initial state of a feed joint post creation but prior to scheduling of corresponding Hyracks job. **/
- CREATED,
-
- /** State acquired post creation of Hyracks job and known physical locations of the joint **/
- INITIALIZED,
-
- /** State acquired post starting of Hyracks job at which point, data begins to flow through the joint **/
- ACTIVE
- }
-
- /**
- * @return the {@link State} associated with the FeedJoint
- */
- public State getState();
-
- /**
- * @return the {@link FeedJointType} associated with the FeedJoint
- */
- public FeedJointType getType();
-
- /**
- * @return the list of data receivers that are
- * receiving the data flowing through this FeedJoint
- */
- public List<FeedConnectionId> getReceivers();
-
- /**
- * @return the list of pending subscription request {@link FeedConnectionRequest} submitted for data flowing through the FeedJoint
- */
- public List<FeedConnectionRequest> getConnectionRequests();
-
- /**
- * @return the subscription location {@link ConnectionLocation} associated with the FeedJoint
- */
- public ConnectionLocation getConnectionLocation();
-
- /**
- * @return the unique {@link FeedJointKey} associated with the FeedJoint
- */
- public FeedJointKey getFeedJointKey();
-
- /**
- * Returns the feed subscriber {@link FeedSubscriber} corresponding to a given feed connection id.
- *
- * @param feedConnectionId
- * the unique id of a feed connection
- * @return an instance of feedConnectionId {@link FeedConnectionId}
- */
- public FeedConnectionId getReceiver(FeedConnectionId feedConnectionId);
-
- /**
- * @param active
- */
- public void setState(State active);
-
- /**
- * Remove the subscriber from the set of registered subscribers to the FeedJoint
- *
- * @param connectionId
- * the connectionId that needs to be removed
- */
- public void removeReceiver(FeedConnectionId connectionId);
-
- public FeedId getOwnerFeedId();
-
- /**
- * Add a feed connectionId to the set of registered subscribers
- *
- * @param connectionId
- */
- public void addReceiver(FeedConnectionId connectionId);
-
- /**
- * Add a feed subscription request {@link FeedConnectionRequest} for the FeedJoint
- *
- * @param request
- */
- public void addConnectionRequest(FeedConnectionRequest request);
-
- public FeedConnectionId getProvider();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleEventSubscriber.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleEventSubscriber.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleEventSubscriber.java
deleted file mode 100644
index 94af74b..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleEventSubscriber.java
+++ /dev/null
@@ -1,36 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-
-public interface IFeedLifecycleEventSubscriber {
-
- public enum FeedLifecycleEvent {
- FEED_INTAKE_STARTED,
- FEED_COLLECT_STARTED,
- FEED_INTAKE_FAILURE,
- FEED_COLLECT_FAILURE,
- FEED_ENDED
- }
-
- public void assertEvent(FeedLifecycleEvent event) throws AsterixException, InterruptedException;
-
- public void handleFeedEvent(FeedLifecycleEvent event);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleIntakeEventSubscriber.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleIntakeEventSubscriber.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleIntakeEventSubscriber.java
deleted file mode 100644
index bff2589..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleIntakeEventSubscriber.java
+++ /dev/null
@@ -1,28 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.feeds.FeedIntakeInfo;
-
-public interface IFeedLifecycleIntakeEventSubscriber extends IFeedLifecycleEventSubscriber {
-
- public void handleFeedEvent(FeedIntakeInfo iInfo, FeedLifecycleEvent event) throws AsterixException;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleListener.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleListener.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleListener.java
deleted file mode 100644
index 0ae5f56..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLifecycleListener.java
+++ /dev/null
@@ -1,56 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.List;
-
-import org.apache.asterix.common.api.IClusterEventsSubscriber;
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.FeedJointKey;
-import org.apache.hyracks.api.job.IJobLifecycleListener;
-
-public interface IFeedLifecycleListener extends IJobLifecycleListener, IClusterEventsSubscriber {
-
- public enum ConnectionLocation {
- SOURCE_FEED_INTAKE_STAGE,
- SOURCE_FEED_COMPUTE_STAGE
- }
-
- public IFeedJoint getAvailableFeedJoint(FeedJointKey feedJoinKey);
-
- public boolean isFeedJointAvailable(FeedJointKey feedJoinKey);
-
- public List<FeedConnectionId> getActiveFeedConnections(FeedId feedId);
-
- public List<String> getComputeLocations(FeedId feedId);
-
- public List<String> getIntakeLocations(FeedId feedId);
-
- public List<String> getStoreLocations(FeedConnectionId feedId);
-
- public void registerFeedEventSubscriber(FeedConnectionId connectionId, IFeedLifecycleEventSubscriber subscriber);
-
- public void deregisterFeedEventSubscriber(FeedConnectionId connectionId, IFeedLifecycleEventSubscriber subscriber);
-
- public List<String> getCollectLocations(FeedConnectionId feedConnectionId);
-
- boolean isFeedConnectionActive(FeedConnectionId connectionId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLoadManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLoadManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLoadManager.java
deleted file mode 100644
index 7baa229..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedLoadManager.java
+++ /dev/null
@@ -1,60 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.json.JSONException;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.feeds.FeedActivity;
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.NodeLoadReport;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.FeedRuntimeType;
-import org.apache.asterix.common.feeds.message.FeedCongestionMessage;
-import org.apache.asterix.common.feeds.message.FeedReportMessage;
-import org.apache.asterix.common.feeds.message.ScaleInReportMessage;
-import org.apache.asterix.common.feeds.message.ThrottlingEnabledFeedMessage;
-
-public interface IFeedLoadManager {
-
- public void submitNodeLoadReport(NodeLoadReport report);
-
- public void reportCongestion(FeedCongestionMessage message) throws JSONException, AsterixException;
-
- public void submitFeedRuntimeReport(FeedReportMessage message);
-
- public void submitScaleInPossibleReport(ScaleInReportMessage sm) throws AsterixException, Exception;
-
- public List<String> getNodes(int required);
-
- public void reportThrottlingEnabled(ThrottlingEnabledFeedMessage mesg) throws AsterixException, Exception;
-
- int getOutflowRate(FeedConnectionId connectionId, FeedRuntimeType runtimeType);
-
- void reportFeedActivity(FeedConnectionId connectionId, FeedActivity activity);
-
- void removeFeedActivity(FeedConnectionId connectionId);
-
- public FeedActivity getFeedActivity(FeedConnectionId connectionId);
-
- public Collection<FeedActivity> getFeedActivities();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedManager.java
deleted file mode 100644
index 768b11f..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedManager.java
+++ /dev/null
@@ -1,97 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.config.AsterixFeedProperties;
-import org.apache.asterix.common.feeds.api.IFeedConnectionManager;
-import org.apache.asterix.common.feeds.api.IFeedMemoryManager;
-import org.apache.asterix.common.feeds.api.IFeedMessageService;
-import org.apache.asterix.common.feeds.api.IFeedMetadataManager;
-import org.apache.asterix.common.feeds.api.IFeedMetricCollector;
-import org.apache.asterix.common.feeds.api.IFeedSubscriptionManager;
-
-/**
- * Provides access to services related to feed management within a node controller
- */
-public interface IFeedManager {
-
- /**
- * gets the nodeId associated with the host node controller
- *
- * @return the nodeId associated with the host node controller
- */
- public String getNodeId();
-
- /**
- * gets the handle to the singleton instance of subscription manager
- *
- * @return the singleton instance of subscription manager
- * @see IFeedSubscriptionManager
- */
- public IFeedSubscriptionManager getFeedSubscriptionManager();
-
- /**
- * gets the handle to the singleton instance of connection manager
- *
- * @return the singleton instance of connection manager
- * @see IFeedConnectionManager
- */
- public IFeedConnectionManager getFeedConnectionManager();
-
- /**
- * gets the handle to the singleton instance of memory manager
- *
- * @return the singleton instance of memory manager
- * @see IFeedMemoryManager
- */
- public IFeedMemoryManager getFeedMemoryManager();
-
- /**
- * gets the handle to the singleton instance of feed metadata manager
- *
- * @return the singleton instance of feed metadata manager
- * @see IFeedMetadataManager
- */
- public IFeedMetadataManager getFeedMetadataManager();
-
- /**
- * gets the handle to the singleton instance of feed metric collector
- *
- * @return the singleton instance of feed metric collector
- * @see IFeedMetricCollector
- */
- public IFeedMetricCollector getFeedMetricCollector();
-
- /**
- * gets the handle to the singleton instance of feed message service
- *
- * @return the singleton instance of feed message service
- * @see IFeedMessageService
- */
- public IFeedMessageService getFeedMessageService();
-
- /**
- * gets the asterix configuration
- *
- * @return asterix configuration
- * @see AsterixFeedProperties
- */
- public AsterixFeedProperties getAsterixFeedProperties();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryComponent.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryComponent.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryComponent.java
deleted file mode 100644
index 817b750..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryComponent.java
+++ /dev/null
@@ -1,58 +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 org.apache.asterix.common.feeds.api;
-
-/**
- * Represents an in-memory components required for storing frames that contain feed tuples.
- * The component's memory footprint is measured and regulated by the {@link IFeedMemoryManager}.
- * Any expansion in size is accounted and can be restricted by the {@link IFeedMemoryManager}
- **/
-public interface IFeedMemoryComponent {
-
- public enum Type {
-
- /** A pool of reusable frames **/
- POOL,
-
- /** An ordered list of frames **/
- COLLECTION
- }
-
- /** Gets the unique id associated with the memory component **/
- public int getComponentId();
-
- /** Gets the type associated with the component. **/
- public Type getType();
-
- /** Gets the current size (number of allocated frames) of the component. **/
- public int getTotalAllocation();
-
- /**
- * Expands this memory component by the speficied number of frames
- *
- * @param delta
- * the amount (measured in number of frames) by which this memory component
- * should be expanded
- */
- public void expand(int delta);
-
- /** Clears the allocated frames as a step to reclaim the memory **/
- public void reset();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryManager.java
deleted file mode 100644
index 4902606..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMemoryManager.java
+++ /dev/null
@@ -1,58 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.api.IFeedMemoryComponent.Type;
-
-/**
- * Provides management of memory allocated for handling feed data flow through the node controller
- */
-public interface IFeedMemoryManager {
-
- public static final int START_COLLECTION_SIZE = 20;
- public static final int START_POOL_SIZE = 10;
-
- /**
- * Gets a memory component allocated from the feed memory budget
- *
- * @param type
- * the kind of memory component that needs to be allocated
- * @return
- * @see Type
- */
- public IFeedMemoryComponent getMemoryComponent(Type type);
-
- /**
- * Expand a memory component by the default increment
- *
- * @param memoryComponent
- * @return true if the expansion succeeded
- * false if the requested expansion violates the configured budget
- */
- public boolean expandMemoryComponent(IFeedMemoryComponent memoryComponent);
-
- /**
- * Releases the given memory component to reclaim the memory allocated for the component
- *
- * @param memoryComponent
- * the memory component that is being reclaimed/released
- */
- public void releaseMemoryComponent(IFeedMemoryComponent memoryComponent);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessage.java
deleted file mode 100644
index 14b8e0a..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessage.java
+++ /dev/null
@@ -1,52 +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 org.apache.asterix.common.feeds.api;
-
-import java.io.Serializable;
-
-import org.apache.hyracks.api.dataflow.value.JSONSerializable;
-
-/**
- * A control message exchanged between {@Link IFeedManager} and {@Link CentralFeedManager} that requests for an action or reporting of an event
- */
-public interface IFeedMessage extends Serializable, JSONSerializable {
-
- public enum MessageType {
- END,
- XAQL,
- FEED_REPORT,
- NODE_REPORT,
- STORAGE_REPORT,
- CONGESTION,
- PREPARE_STALL,
- TERMINATE_FLOW,
- SCALE_IN_REQUEST,
- COMMIT_ACK,
- COMMIT_ACK_RESPONSE,
- THROTTLING_ENABLED
- }
-
- /**
- * Gets the type associated with this message
- *
- * @return MessageType type associated with this message
- */
- public MessageType getMessageType();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessageService.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessageService.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessageService.java
deleted file mode 100644
index 12f53be..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMessageService.java
+++ /dev/null
@@ -1,34 +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 org.apache.asterix.common.feeds.api;
-
-/**
- * Provides the functionality of sending a meesage ({@code IFeedMessage} to the {@code CentralFeedManager}
- */
-public interface IFeedMessageService extends IFeedService {
-
- /**
- * Sends a message ({@code IFeedMessage} to the {@code CentralFeedManager} running at the CC
- * The message is sent asynchronously.
- *
- * @param message
- * the message to be sent
- */
- public void sendMessage(IFeedMessage message);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetadataManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetadataManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetadataManager.java
deleted file mode 100644
index 127b97c..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetadataManager.java
+++ /dev/null
@@ -1,39 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.feeds.FeedConnectionId;
-
-public interface IFeedMetadataManager {
-
- /**
- * @param feedConnectionId
- * connection id corresponding to the feed connection
- * @param tuple
- * the erroneous tuple that raised an exception
- * @param message
- * the message corresponding to the exception being raised
- * @param feedManager
- * @throws AsterixException
- */
- public void logTuple(FeedConnectionId feedConnectionId, String tuple, String message, IFeedManager feedManager)
- throws AsterixException;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetricCollector.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetricCollector.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetricCollector.java
deleted file mode 100644
index b78d81e..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedMetricCollector.java
+++ /dev/null
@@ -1,50 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedRuntimeId;
-
-public interface IFeedMetricCollector {
-
- public enum ValueType {
- CPU_USAGE,
- INFLOW_RATE,
- OUTFLOW_RATE
- }
-
- public enum MetricType {
- AVG,
- RATE
- }
-
- public boolean sendReport(int senderId, int value);
-
- public int getMetric(int senderId);
-
- public int getMetric(FeedConnectionId connectionId, FeedRuntimeId runtimeId, ValueType valueType);
-
- int createReportSender(FeedConnectionId connectionId, FeedRuntimeId runtimeId, ValueType valueType,
- MetricType metricType);
-
- public void removeReportSender(int senderId);
-
- public void resetReportSender(int senderId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedOperatorOutputSideHandler.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedOperatorOutputSideHandler.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedOperatorOutputSideHandler.java
deleted file mode 100644
index 5dec7e3..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedOperatorOutputSideHandler.java
+++ /dev/null
@@ -1,36 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.hyracks.api.comm.IFrameWriter;
-
-public interface IFeedOperatorOutputSideHandler extends IFrameWriter {
-
- public enum Type {
- BASIC_FEED_OUTPUT_HANDLER,
- DISTRIBUTE_FEED_OUTPUT_HANDLER,
- COLLECT_TRANSFORM_FEED_OUTPUT_HANDLER
- }
-
- public FeedId getFeedId();
-
- public Type getType();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedProvider.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedProvider.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedProvider.java
deleted file mode 100644
index 7565004..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedProvider.java
+++ /dev/null
@@ -1,26 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedId;
-
-public interface IFeedProvider {
-
- public void subscribeFeed(FeedId sourceDeedId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedRuntime.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedRuntime.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedRuntime.java
deleted file mode 100644
index 4fcd631..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedRuntime.java
+++ /dev/null
@@ -1,62 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedRuntimeId;
-import org.apache.asterix.common.feeds.FeedRuntimeInputHandler;
-import org.apache.hyracks.api.comm.IFrameWriter;
-
-public interface IFeedRuntime {
-
- public enum FeedRuntimeType {
- INTAKE,
- COLLECT,
- COMPUTE_COLLECT,
- COMPUTE,
- STORE,
- OTHER,
- ETS,
- JOIN
- }
-
- public enum Mode {
- PROCESS,
- SPILL,
- PROCESS_SPILL,
- DISCARD,
- POST_SPILL_DISCARD,
- PROCESS_BACKLOG,
- STALL,
- FAIL,
- END
- }
-
- /**
- * @return the unique runtime id associated with the feedRuntime
- */
- public FeedRuntimeId getRuntimeId();
-
- /**
- * @return the frame writer associated with the feed runtime.
- */
- public IFrameWriter getFeedFrameWriter();
-
- public FeedRuntimeInputHandler getInputHandler();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedService.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedService.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedService.java
deleted file mode 100644
index ac51c95..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedService.java
+++ /dev/null
@@ -1,26 +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 org.apache.asterix.common.feeds.api;
-
-public interface IFeedService {
-
- public void start() throws Exception;
-
- public void stop();
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedSubscriptionManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedSubscriptionManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedSubscriptionManager.java
deleted file mode 100644
index 91ac4c4..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedSubscriptionManager.java
+++ /dev/null
@@ -1,41 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.SubscribableFeedRuntimeId;
-
-public interface IFeedSubscriptionManager {
-
- /**
- * @param subscribableRuntime
- */
- public void registerFeedSubscribableRuntime(ISubscribableRuntime subscribableRuntime);
-
- /**
- * @param subscribableRuntimeId
- */
- public void deregisterFeedSubscribableRuntime(SubscribableFeedRuntimeId subscribableRuntimeId);
-
- /**
- * @param subscribableRuntimeId
- * @return
- */
- public ISubscribableRuntime getSubscribableRuntime(SubscribableFeedRuntimeId subscribableRuntimeId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedTrackingManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedTrackingManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedTrackingManager.java
deleted file mode 100644
index 280c4d9..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedTrackingManager.java
+++ /dev/null
@@ -1,29 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedTupleCommitAckMessage;
-
-public interface IFeedTrackingManager {
-
- public void submitAckReport(FeedTupleCommitAckMessage ackMessage);
-
- public void disableAcking(FeedConnectionId connectionId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWork.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWork.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWork.java
deleted file mode 100644
index 06fcb76..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWork.java
+++ /dev/null
@@ -1,28 +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 org.apache.asterix.common.feeds.api;
-
-/**
- * Represents a feed management task. The task is executed asynchronously.
- */
-public interface IFeedWork {
-
- public Runnable getRunnable();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkEventListener.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkEventListener.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkEventListener.java
deleted file mode 100644
index 59b46d1..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkEventListener.java
+++ /dev/null
@@ -1,41 +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 org.apache.asterix.common.feeds.api;
-
-/**
- * Provides a callback mechanism that in invoked for events related to
- * the execution of a feed management task.
- */
-public interface IFeedWorkEventListener {
-
- /**
- * A call back that is invoked after successful completion of a feed
- * management task.
- */
- public void workCompleted(IFeedWork work);
-
- /**
- * A call back that is invokved after a failed execution of a feed
- * management task.
- *
- * @param e
- * exception encountered during execution of the task.
- */
- public void workFailed(IFeedWork work, Exception e);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkManager.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkManager.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkManager.java
deleted file mode 100644
index 31506ca..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFeedWorkManager.java
+++ /dev/null
@@ -1,25 +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 org.apache.asterix.common.feeds.api;
-
-public interface IFeedWorkManager {
-
- public void submitWork(IFeedWork work, IFeedWorkEventListener listener);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFrameEventCallback.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFrameEventCallback.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFrameEventCallback.java
deleted file mode 100644
index 13a0af0..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFrameEventCallback.java
+++ /dev/null
@@ -1,32 +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 org.apache.asterix.common.feeds.api;
-
-public interface IFrameEventCallback {
-
- public enum FrameEvent {
- FINISHED_PROCESSING,
- PENDING_WORK_THRESHOLD_REACHED,
- PENDING_WORK_DONE,
- NO_OP,
- FINISHED_PROCESSING_SPILLAGE
- }
-
- public void frameEvent(FrameEvent frameEvent);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePostProcessor.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePostProcessor.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePostProcessor.java
deleted file mode 100644
index ed74037..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePostProcessor.java
+++ /dev/null
@@ -1,28 +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 org.apache.asterix.common.feeds.api;
-
-import java.nio.ByteBuffer;
-
-import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
-
-public interface IFramePostProcessor {
-
- public void postProcessFrame(ByteBuffer frame, FrameTupleAccessor frameAccessor);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePreprocessor.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePreprocessor.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePreprocessor.java
deleted file mode 100644
index 59a6c97..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IFramePreprocessor.java
+++ /dev/null
@@ -1,26 +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 org.apache.asterix.common.feeds.api;
-
-import java.nio.ByteBuffer;
-
-public interface IFramePreprocessor {
-
- public void preProcess(ByteBuffer frame) throws Exception;
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IIntakeProgressTracker.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IIntakeProgressTracker.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IIntakeProgressTracker.java
deleted file mode 100644
index f2c9f63..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IIntakeProgressTracker.java
+++ /dev/null
@@ -1,29 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.Map;
-
-public interface IIntakeProgressTracker {
-
- public void configure(Map<String, String> configuration);
-
- public void notifyIngestedTupleTimestamp(long timestamp);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IMessageReceiver.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IMessageReceiver.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IMessageReceiver.java
deleted file mode 100644
index bc86e86..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/IMessageReceiver.java
+++ /dev/null
@@ -1,28 +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 org.apache.asterix.common.feeds.api;
-
-public interface IMessageReceiver<T> {
-
- public void sendMessage(T message);
-
- public void close(boolean processPending);
-
- public void start();
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscribableRuntime.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscribableRuntime.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscribableRuntime.java
deleted file mode 100644
index 14b89f7..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscribableRuntime.java
+++ /dev/null
@@ -1,61 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.List;
-
-import org.apache.asterix.common.feeds.CollectionRuntime;
-import org.apache.asterix.common.feeds.DistributeFeedFrameWriter;
-import org.apache.asterix.common.feeds.FeedPolicyAccessor;
-import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
-
-/**
- * Represent a feed runtime whose output can be routed along other parallel path(s).
- */
-public interface ISubscribableRuntime extends IFeedRuntime {
-
- /**
- * @param collectionRuntime
- * @throws Exception
- */
- public void subscribeFeed(FeedPolicyAccessor fpa, CollectionRuntime collectionRuntime) throws Exception;
-
- /**
- * @param collectionRuntime
- * @throws Exception
- */
- public void unsubscribeFeed(CollectionRuntime collectionRuntime) throws Exception;
-
- /**
- * @return
- * @throws Exception
- */
- public List<ISubscriberRuntime> getSubscribers();
-
- /**
- * @return
- */
- public DistributeFeedFrameWriter getFeedFrameWriter();
-
- /**
- * @return
- */
- public RecordDescriptor getRecordDescriptor();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriberRuntime.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriberRuntime.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriberRuntime.java
deleted file mode 100644
index 3b2157f..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriberRuntime.java
+++ /dev/null
@@ -1,30 +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 org.apache.asterix.common.feeds.api;
-
-import java.util.Map;
-
-import org.apache.asterix.common.feeds.FeedFrameCollector;
-
-public interface ISubscriberRuntime {
-
- public Map<String, String> getFeedPolicy();
-
- public FeedFrameCollector getFrameCollector();
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriptionProvider.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriptionProvider.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriptionProvider.java
deleted file mode 100644
index b9264b8..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ISubscriptionProvider.java
+++ /dev/null
@@ -1,29 +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 org.apache.asterix.common.feeds.api;
-
-import org.apache.asterix.common.feeds.FeedId;
-
-public interface ISubscriptionProvider {
-
- public void subscribeFeed(FeedId sourceFeedId, FeedId recipientFeedId);
-
- public void unsubscribeFeed(FeedId sourceFeedId, FeedId recipientFeedId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ITupleTrackingFeedAdapter.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ITupleTrackingFeedAdapter.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ITupleTrackingFeedAdapter.java
deleted file mode 100644
index 4067508..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/api/ITupleTrackingFeedAdapter.java
+++ /dev/null
@@ -1,24 +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 org.apache.asterix.common.feeds.api;
-
-public interface ITupleTrackingFeedAdapter extends IDataSourceAdapter {
-
- public void tuplePersistedTimeCallback(long timestamp);
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/EndFeedMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/EndFeedMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/EndFeedMessage.java
deleted file mode 100644
index 84db620..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/EndFeedMessage.java
+++ /dev/null
@@ -1,97 +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 org.apache.asterix.common.feeds.message;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedConstants;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.FeedRuntimeType;
-
-/**
- * A feed control message indicating the need to end the feed. This message is dispatched
- * to all locations that host an operator involved in the feed pipeline.
- */
-public class EndFeedMessage extends FeedMessage {
-
- private static final long serialVersionUID = 1L;
-
- private final FeedId sourceFeedId;
-
- private final FeedConnectionId connectionId;
-
- private final FeedRuntimeType sourceRuntimeType;
-
- private final boolean completeDisconnection;
-
- private final EndMessageType endMessageType;
-
- public enum EndMessageType {
- DISCONNECT_FEED,
- DISCONTINUE_SOURCE
- }
-
- public EndFeedMessage(FeedConnectionId connectionId, FeedRuntimeType sourceRuntimeType, FeedId sourceFeedId,
- boolean completeDisconnection, EndMessageType endMessageType) {
- super(MessageType.END);
- this.connectionId = connectionId;
- this.sourceRuntimeType = sourceRuntimeType;
- this.sourceFeedId = sourceFeedId;
- this.completeDisconnection = completeDisconnection;
- this.endMessageType = endMessageType;
- }
-
- @Override
- public String toString() {
- return MessageType.END.name() + " " + connectionId + " [" + sourceRuntimeType + "] ";
- }
-
- public FeedRuntimeType getSourceRuntimeType() {
- return sourceRuntimeType;
- }
-
- public FeedId getSourceFeedId() {
- return sourceFeedId;
- }
-
- public boolean isCompleteDisconnection() {
- return completeDisconnection;
- }
-
- public EndMessageType getEndMessageType() {
- return endMessageType;
- }
-
- @Override
- public JSONObject toJSON() throws JSONException {
- JSONObject obj = new JSONObject();
- obj.put(FeedConstants.MessageConstants.MESSAGE_TYPE, messageType.name());
- obj.put(FeedConstants.MessageConstants.DATAVERSE, connectionId.getFeedId().getDataverse());
- obj.put(FeedConstants.MessageConstants.FEED, connectionId.getFeedId().getFeedName());
- obj.put(FeedConstants.MessageConstants.DATASET, connectionId.getDatasetName());
- return obj;
- }
-
- public FeedConnectionId getFeedConnectionId() {
- return connectionId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedCongestionMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedCongestionMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedCongestionMessage.java
deleted file mode 100644
index c9e0fbd..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedCongestionMessage.java
+++ /dev/null
@@ -1,103 +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 org.apache.asterix.common.feeds.message;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedConstants;
-import org.apache.asterix.common.feeds.FeedConstants.MessageConstants;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.FeedRuntimeId;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.FeedRuntimeType;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.Mode;
-
-public class FeedCongestionMessage extends FeedMessage {
-
- private static final long serialVersionUID = 1L;
-
- private final FeedConnectionId connectionId;
- private final FeedRuntimeId runtimeId;
- private int inflowRate;
- private int outflowRate;
- private Mode mode;
-
- public FeedCongestionMessage(FeedConnectionId connectionId, FeedRuntimeId runtimeId, int inflowRate,
- int outflowRate, Mode mode) {
- super(MessageType.CONGESTION);
- this.connectionId = connectionId;
- this.runtimeId = runtimeId;
- this.inflowRate = inflowRate;
- this.outflowRate = outflowRate;
- this.mode = mode;
- }
-
- @Override
- public JSONObject toJSON() throws JSONException {
- JSONObject obj = new JSONObject();
- obj.put(FeedConstants.MessageConstants.MESSAGE_TYPE, messageType.name());
- obj.put(FeedConstants.MessageConstants.DATAVERSE, connectionId.getFeedId().getDataverse());
- obj.put(FeedConstants.MessageConstants.FEED, connectionId.getFeedId().getFeedName());
- obj.put(FeedConstants.MessageConstants.DATASET, connectionId.getDatasetName());
- obj.put(FeedConstants.MessageConstants.RUNTIME_TYPE, runtimeId.getFeedRuntimeType());
- obj.put(FeedConstants.MessageConstants.OPERAND_ID, runtimeId.getOperandId());
- obj.put(FeedConstants.MessageConstants.PARTITION, runtimeId.getPartition());
- obj.put(FeedConstants.MessageConstants.INFLOW_RATE, inflowRate);
- obj.put(FeedConstants.MessageConstants.OUTFLOW_RATE, outflowRate);
- obj.put(FeedConstants.MessageConstants.MODE, mode);
- return obj;
- }
-
- public FeedRuntimeId getRuntimeId() {
- return runtimeId;
- }
-
- public int getInflowRate() {
- return inflowRate;
- }
-
- public int getOutflowRate() {
- return outflowRate;
- }
-
- public static FeedCongestionMessage read(JSONObject obj) throws JSONException {
- FeedId feedId = new FeedId(obj.getString(FeedConstants.MessageConstants.DATAVERSE),
- obj.getString(FeedConstants.MessageConstants.FEED));
- FeedConnectionId connectionId = new FeedConnectionId(feedId,
- obj.getString(FeedConstants.MessageConstants.DATASET));
- FeedRuntimeId runtimeId = new FeedRuntimeId(FeedRuntimeType.valueOf(obj
- .getString(FeedConstants.MessageConstants.RUNTIME_TYPE)),
- obj.getInt(FeedConstants.MessageConstants.PARTITION),
- obj.getString(FeedConstants.MessageConstants.OPERAND_ID));
- Mode mode = Mode.valueOf(obj.getString(MessageConstants.MODE));
- return new FeedCongestionMessage(connectionId, runtimeId,
- obj.getInt(FeedConstants.MessageConstants.INFLOW_RATE),
- obj.getInt(FeedConstants.MessageConstants.OUTFLOW_RATE), mode);
- }
-
- public FeedConnectionId getConnectionId() {
- return connectionId;
- }
-
- public Mode getMode() {
- return mode;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedMessage.java
deleted file mode 100644
index 11b1839..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedMessage.java
+++ /dev/null
@@ -1,42 +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 org.apache.asterix.common.feeds.message;
-
-import org.apache.asterix.common.feeds.api.IFeedMessage;
-import org.apache.hyracks.api.dataflow.value.JSONSerializable;
-
-/**
- * A control message that can be sent to the runtime instance of a
- * feed's adapter.
- */
-public abstract class FeedMessage implements IFeedMessage, JSONSerializable {
-
- private static final long serialVersionUID = 1L;
-
- protected final MessageType messageType;
-
- public FeedMessage(MessageType messageType) {
- this.messageType = messageType;
- }
-
- public MessageType getMessageType() {
- return messageType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedReportMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedReportMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedReportMessage.java
deleted file mode 100644
index 1b14855..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/FeedReportMessage.java
+++ /dev/null
@@ -1,100 +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 org.apache.asterix.common.feeds.message;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedConstants;
-import org.apache.asterix.common.feeds.FeedConstants.MessageConstants;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.FeedRuntimeId;
-import org.apache.asterix.common.feeds.api.IFeedMetricCollector.ValueType;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.FeedRuntimeType;
-
-public class FeedReportMessage extends FeedMessage {
-
- private static final long serialVersionUID = 1L;
-
- private final FeedConnectionId connectionId;
- private final FeedRuntimeId runtimeId;
- private final ValueType valueType;
- private int value;
-
- public FeedReportMessage(FeedConnectionId connectionId, FeedRuntimeId runtimeId, ValueType valueType, int value) {
- super(MessageType.FEED_REPORT);
- this.connectionId = connectionId;
- this.runtimeId = runtimeId;
- this.valueType = valueType;
- this.value = value;
- }
-
- public void reset(int value) {
- this.value = value;
- }
-
- @Override
- public JSONObject toJSON() throws JSONException {
- JSONObject obj = new JSONObject();
- obj.put(FeedConstants.MessageConstants.MESSAGE_TYPE, messageType.name());
- obj.put(FeedConstants.MessageConstants.DATAVERSE, connectionId.getFeedId().getDataverse());
- obj.put(FeedConstants.MessageConstants.FEED, connectionId.getFeedId().getFeedName());
- obj.put(FeedConstants.MessageConstants.DATASET, connectionId.getDatasetName());
- obj.put(FeedConstants.MessageConstants.RUNTIME_TYPE, runtimeId.getFeedRuntimeType());
- obj.put(FeedConstants.MessageConstants.PARTITION, runtimeId.getPartition());
- obj.put(FeedConstants.MessageConstants.VALUE_TYPE, valueType);
- obj.put(FeedConstants.MessageConstants.VALUE, value);
- return obj;
- }
-
- public static FeedReportMessage read(JSONObject obj) throws JSONException {
- FeedId feedId = new FeedId(obj.getString(FeedConstants.MessageConstants.DATAVERSE),
- obj.getString(FeedConstants.MessageConstants.FEED));
- FeedConnectionId connectionId = new FeedConnectionId(feedId,
- obj.getString(FeedConstants.MessageConstants.DATASET));
- FeedRuntimeId runtimeId = new FeedRuntimeId(FeedRuntimeType.valueOf(obj
- .getString(FeedConstants.MessageConstants.RUNTIME_TYPE)),
- obj.getInt(FeedConstants.MessageConstants.PARTITION), FeedConstants.MessageConstants.NOT_APPLICABLE);
- ValueType type = ValueType.valueOf(obj.getString(MessageConstants.VALUE_TYPE));
- int value = Integer.parseInt(obj.getString(MessageConstants.VALUE));
- return new FeedReportMessage(connectionId, runtimeId, type, value);
- }
-
- public int getValue() {
- return value;
- }
-
- public void setValue(int value) {
- this.value = value;
- }
-
- public FeedConnectionId getConnectionId() {
- return connectionId;
- }
-
- public FeedRuntimeId getRuntimeId() {
- return runtimeId;
- }
-
- public ValueType getValueType() {
- return valueType;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/NodeReportMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/NodeReportMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/NodeReportMessage.java
deleted file mode 100644
index b45a966..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/NodeReportMessage.java
+++ /dev/null
@@ -1,69 +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 org.apache.asterix.common.feeds.message;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import org.apache.asterix.common.feeds.FeedConstants;
-import org.apache.asterix.common.feeds.api.IFeedMessage;
-
-public class NodeReportMessage extends FeedMessage {
-
- private static final long serialVersionUID = 1L;
-
- private double cpuLoad;
- private double usedHeap;
- private int nRuntimes;
-
- public NodeReportMessage(float cpuLoad, long usedHeap, int nRuntimes) {
- super(IFeedMessage.MessageType.NODE_REPORT);
- this.usedHeap = usedHeap;
- this.cpuLoad = cpuLoad;
- this.nRuntimes = nRuntimes;
- }
-
- public void reset(double cpuLoad, double usedHeap, int nRuntimes) {
- this.cpuLoad = cpuLoad;
- this.usedHeap = usedHeap;
- this.nRuntimes = nRuntimes;
- }
-
- @Override
- public JSONObject toJSON() throws JSONException {
- JSONObject obj = new JSONObject();
- obj.put(FeedConstants.MessageConstants.CPU_LOAD, cpuLoad);
- obj.put(FeedConstants.MessageConstants.HEAP_USAGE, usedHeap);
- obj.put(FeedConstants.MessageConstants.N_RUNTIMES, nRuntimes);
- return obj;
- }
-
- public double getCpuLoad() {
- return cpuLoad;
- }
-
- public double getUsedHeap() {
- return usedHeap;
- }
-
- public int getnRuntimes() {
- return nRuntimes;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e800e6d5/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/ScaleInReportMessage.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/ScaleInReportMessage.java b/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/ScaleInReportMessage.java
deleted file mode 100644
index 6204704..0000000
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/message/ScaleInReportMessage.java
+++ /dev/null
@@ -1,114 +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 org.apache.asterix.common.feeds.message;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import org.apache.asterix.common.feeds.FeedConnectionId;
-import org.apache.asterix.common.feeds.FeedConstants;
-import org.apache.asterix.common.feeds.FeedId;
-import org.apache.asterix.common.feeds.api.IFeedRuntime.FeedRuntimeType;
-
-/**
- * A feed control message indicating the need to scale in a stage of the feed ingestion pipeline.
- * Currently, scaling-in of the compute stage is supported.
- **/
-public class ScaleInReportMessage extends FeedMessage {
-
- private static final long serialVersionUID = 1L;
-
- private final FeedConnectionId connectionId;
-
- private final FeedRuntimeType runtimeType;
-
- private int currentCardinality;
-
- private int reducedCardinaliy;
-
- public ScaleInReportMessage(FeedConnectionId connectionId, FeedRuntimeType runtimeType, int currentCardinality,
- int reducedCardinaliy) {
- super(MessageType.SCALE_IN_REQUEST);
- this.connectionId = connectionId;
- this.runtimeType = runtimeType;
- this.currentCardinality = currentCardinality;
- this.reducedCardinaliy = reducedCardinaliy;
- }
-
- @Override
- public String toString() {
- return MessageType.SCALE_IN_REQUEST.name() + " " + connectionId + " [" + runtimeType + "] "
- + " currentCardinality " + currentCardinality + " reducedCardinality " + reducedCardinaliy;
- }
-
- public FeedRuntimeType getRuntimeType() {
- return runtimeType;
- }
-
- @Override
- public JSONObject toJSON() throws JSONException {
- JSONObject obj = new JSONObject();
- obj.put(FeedConstants.MessageConstants.MESSAGE_TYPE, messageType.name());
- obj.put(FeedConstants.MessageConstants.DATAVERSE, connectionId.getFeedId().getDataverse());
- obj.put(FeedConstants.MessageConstants.FEED, connectionId.getFeedId().getFeedName());
- obj.put(FeedConstants.MessageConstants.DATASET, connectionId.getDatasetName());
- obj.put(FeedConstants.MessageConstants.RUNTIME_TYPE, runtimeType);
- obj.put(FeedConstants.MessageConstants.CURRENT_CARDINALITY, currentCardinality);
- obj.put(FeedConstants.MessageConstants.REDUCED_CARDINALITY, reducedCardinaliy);
- return obj;
- }
-
- public FeedConnectionId getConnectionId() {
- return connectionId;
- }
-
- public static ScaleInReportMessage read(JSONObject obj) throws JSONException {
- FeedId feedId = new FeedId(obj.getString(FeedConstants.MessageConstants.DATAVERSE),
- obj.getString(FeedConstants.MessageConstants.FEED));
- FeedConnectionId connectionId = new FeedConnectionId(feedId,
- obj.getString(FeedConstants.MessageConstants.DATASET));
- FeedRuntimeType runtimeType = FeedRuntimeType.valueOf(obj
- .getString(FeedConstants.MessageConstants.RUNTIME_TYPE));
- return new ScaleInReportMessage(connectionId, runtimeType,
- obj.getInt(FeedConstants.MessageConstants.CURRENT_CARDINALITY),
- obj.getInt(FeedConstants.MessageConstants.REDUCED_CARDINALITY));
- }
-
- public void reset(int currentCardinality, int reducedCardinaliy) {
- this.currentCardinality = currentCardinality;
- this.reducedCardinaliy = reducedCardinaliy;
- }
-
- public int getCurrentCardinality() {
- return currentCardinality;
- }
-
- public void setCurrentCardinality(int currentCardinality) {
- this.currentCardinality = currentCardinality;
- }
-
- public int getReducedCardinaliy() {
- return reducedCardinaliy;
- }
-
- public void setReducedCardinaliy(int reducedCardinaliy) {
- this.reducedCardinaliy = reducedCardinaliy;
- }
-
-}