[
https://issues.apache.org/jira/browse/TAJO-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481184#comment-14481184
]
ASF GitHub Bot commented on TAJO-1469:
--------------------------------------
Github user babokim commented on a diff in the pull request:
https://github.com/apache/tajo/pull/480#discussion_r27795231
--- Diff:
tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/SimpleExchange.java
---
@@ -0,0 +1,67 @@
+/**
+ * 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.tajo.rpc;
+
+import com.google.protobuf.RpcCallback;
+
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+public abstract class SimpleExchange<T> implements RpcCallback<T> {
--- End diff --
I think that SimpleExchange name is not proper this class. How about
"CancelableRpcCallback"?
> allocateQueryMaster can leak resources if it times-out (3sec, hardcoded)
> ------------------------------------------------------------------------
>
> Key: TAJO-1469
> URL: https://issues.apache.org/jira/browse/TAJO-1469
> Project: Tajo
> Issue Type: Bug
> Reporter: Navis
> Assignee: Navis
>
> {code}
> WorkerResourceAllocationResponse response = null;
> try {
> response = callFuture.get(3, TimeUnit.SECONDS);
> } catch (Throwable t) {
> LOG.error(t, t);
> return null;
> }
> {code}
> If it times-out (or interrupted), allocated resources cannot be retrieved
> forever.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)