[
https://issues.apache.org/jira/browse/APEXMALHAR-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15087171#comment-15087171
]
ASF GitHub Bot commented on APEXMALHAR-1963:
--------------------------------------------
Github user chinmaykolhatkar commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/157#discussion_r49059185
--- Diff:
library/src/main/java/com/datatorrent/lib/async/AbstractAsyncProcessor.java ---
@@ -0,0 +1,357 @@
+/**
+ * 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.async;
+
+import java.util.Iterator;
+import java.util.Queue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Lists;
+
+import com.datatorrent.api.Context;
+import com.datatorrent.api.DefaultInputPort;
+import com.datatorrent.api.Operator.IdleTimeHandler;
+import com.datatorrent.api.annotation.InputPortFieldAnnotation;
+import com.datatorrent.common.util.BaseOperator;
+
+/**
+ * This base operator having a single input and tuple coming from input
port are enqueued for processing asynchronously
+ * by Thread Executors.
+ *
+ * User can configure number of of threads that are required for
processing. Defaulting to single thread which is
+ * different than operator thread.
+ * The user will also configure the timeout for the operations to happen.
+ *
+ * <b>Workflow is as follows:</b>
+ * <ol>
+ * <li>Tuple of type INPUT is received on input port.</li>
+ * <li>Tuple gets enqueued into Executors by calling
<i>enqueueTupleForProcessing</i>.
+ * Once can override <i>processTuple</i> method in which case, its
users responsibility to enqueue tuple for
--- End diff --
Done
> Add abstract operator for Async Processing
> ------------------------------------------
>
> Key: APEXMALHAR-1963
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-1963
> Project: Apache Apex Malhar
> Issue Type: New Feature
> Affects Versions: 3.3.0
> Reporter: Chinmay Kolhatkar
> Assignee: Chinmay Kolhatkar
>
> Create an abstract operator which does following:
> 1) Asynchronously processes the tuples
> 2) Have parallel executions
> 3) Make sure the outbound tuples are ordered similar to inbound tuples if
> configured.
> 4) Have processing timeout.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)