You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by babokim <gi...@git.apache.org> on 2014/06/12 17:31:07 UTC
[GitHub] tajo pull request: Tajo 873
GitHub user babokim opened a pull request:
https://github.com/apache/tajo/pull/37
Tajo 873
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/babokim/tajo TAJO-873
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/37.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #37
----
commit 13d3e631763be1e68e35d3436eccf37aac3263db
Author: 김형준 <ba...@babokim-macbook-pro.local>
Date: 2014-06-12T14:48:49Z
TAJO-873: Query status is still RUNNING after session expired.
commit ed469b60f742c156286ed93a7a39bdb49b359965
Author: 김형준 <ba...@babokim-macbook-pro.local>
Date: 2014-06-12T14:56:27Z
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14073117
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -702,15 +706,24 @@ public void run() {
try {
if (context.isPorgressChanged()) {
- masterStub.statusUpdate(null, getReport(), NullCallback.get());
+ masterStub.statusUpdate(errorControllers[0], getReport(), NullCallback.get());
} else {
- masterStub.ping(null, taskId.getProto(), NullCallback.get());
+ masterStub.ping(errorControllers[1], taskId.getProto(), NullCallback.get());
+ }
+ for (int i = 0; i < errorControllers.length; i++) {
+ if (errorControllers[i].failed()) {
+ String errorText = errorControllers[i].errorText();
+ throw new IOException(errorText);
+ }
}
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
- remainingRetries -=1;
+ if (t.getMessage() != null && t.getMessage().indexOf("java.nio.channels.ClosedChannelException") >= 0) {
--- End diff --
I agree that we need a better way to handle RPC exception. I think it is better to deal with handling RPC exception in the new issue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-52023152
@jinossy Thanks
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/tajo/pull/37
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-52024872
Thank you. I will upload the patch to jira.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-46674091
Hi Hyoungjun,
thanks for your contribution.
I left some comments. Please reflect them.
Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-48995483
It seems to gone stale. It requires rebase against the latest revision.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14017313
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -702,15 +706,24 @@ public void run() {
try {
if (context.isPorgressChanged()) {
- masterStub.statusUpdate(null, getReport(), NullCallback.get());
+ masterStub.statusUpdate(errorControllers[0], getReport(), NullCallback.get());
} else {
- masterStub.ping(null, taskId.getProto(), NullCallback.get());
+ masterStub.ping(errorControllers[1], taskId.getProto(), NullCallback.get());
+ }
+ for (int i = 0; i < errorControllers.length; i++) {
+ if (errorControllers[i].failed()) {
+ String errorText = errorControllers[i].errorText();
+ throw new IOException(errorText);
+ }
}
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
- remainingRetries -=1;
+ if (t.getMessage() != null && t.getMessage().indexOf("java.nio.channels.ClosedChannelException") >= 0) {
--- End diff --
It would be better to change 'if clause' to 'catch clause'. Here is an example.
```
...
} catch (ClosedChannelException e) {
remainingRetries = 0;
LOG.warn("Last retry, exiting ");
throw new RuntimeException(e);
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
remainingRetries -= 1;
} finally {
...
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14073124
--- Diff: tajo-core/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java ---
@@ -457,7 +458,9 @@ public Query getQuery() {
}
public void expiredSessionTimeout() {
--- End diff --
I'll remove.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14016754
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -690,6 +690,10 @@ Runnable createReporterThread() {
int remainingRetries = MAX_RETRIES;
@Override
public void run() {
+ RpcErrorController errorControllers[] = new RpcErrorController[2];
--- End diff --
Would you add some descriptions of each errorController?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-52017718
@babokim, could I take this issue?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14018047
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -702,15 +706,24 @@ public void run() {
try {
if (context.isPorgressChanged()) {
- masterStub.statusUpdate(null, getReport(), NullCallback.get());
+ masterStub.statusUpdate(errorControllers[0], getReport(), NullCallback.get());
} else {
- masterStub.ping(null, taskId.getProto(), NullCallback.get());
+ masterStub.ping(errorControllers[1], taskId.getProto(), NullCallback.get());
+ }
+ for (int i = 0; i < errorControllers.length; i++) {
+ if (errorControllers[i].failed()) {
+ String errorText = errorControllers[i].errorText();
+ throw new IOException(errorText);
+ }
}
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
- remainingRetries -=1;
+ if (t.getMessage() != null && t.getMessage().indexOf("java.nio.channels.ClosedChannelException") >= 0) {
--- End diff --
Sorry, I mmisunderstood that the throwable can be ClosedChannelException.
But, this code looks tricky.
Are there any better way to handle this exception?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the pull request:
https://github.com/apache/tajo/pull/37#issuecomment-51749054
I think RpcErrorController is unnecessary class. we’ve got the DefaultRpcController already
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14073137
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -690,6 +690,10 @@ Runnable createReporterThread() {
int remainingRetries = MAX_RETRIES;
@Override
public void run() {
+ RpcErrorController errorControllers[] = new RpcErrorController[2];
--- End diff --
I'll add a comment.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14073626
--- Diff: tajo-core/src/main/java/org/apache/tajo/worker/Task.java ---
@@ -702,15 +706,24 @@ public void run() {
try {
if (context.isPorgressChanged()) {
- masterStub.statusUpdate(null, getReport(), NullCallback.get());
+ masterStub.statusUpdate(errorControllers[0], getReport(), NullCallback.get());
} else {
- masterStub.ping(null, taskId.getProto(), NullCallback.get());
+ masterStub.ping(errorControllers[1], taskId.getProto(), NullCallback.get());
+ }
+ for (int i = 0; i < errorControllers.length; i++) {
+ if (errorControllers[i].failed()) {
+ String errorText = errorControllers[i].errorText();
+ throw new IOException(errorText);
+ }
}
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
- remainingRetries -=1;
+ if (t.getMessage() != null && t.getMessage().indexOf("java.nio.channels.ClosedChannelException") >= 0) {
--- End diff --
Thanks for your comment.
I agree with you.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: Tajo 873
Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/37#discussion_r14017142
--- Diff: tajo-core/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java ---
@@ -457,7 +458,9 @@ public Query getQuery() {
}
public void expiredSessionTimeout() {
--- End diff --
This function is not used anymore.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---