tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [5/6] git commit: TAJO-981: Help command (\?) in tsql takes too long time. (YeonSu Han via jaehwa)
Date Wed, 01 Oct 2014 15:38:28 GMT
TAJO-981: Help command (\?) in tsql takes too long time. (YeonSu Han via jaehwa)

Closes #174


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/0356a525
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/0356a525
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/0356a525

Branch: refs/heads/block_iteration
Commit: 0356a5257cd2426d783642e27478eaae95ddfe7d
Parents: bccac70
Author: Jaehwa Jung <blrunner@apache.org>
Authored: Wed Oct 1 16:44:48 2014 +0900
Committer: Jaehwa Jung <blrunner@apache.org>
Committed: Wed Oct 1 16:48:45 2014 +0900

----------------------------------------------------------------------
 CHANGES                                         |  2 ++
 .../java/org/apache/tajo/cli/HelpCommand.java   | 30 +++-----------------
 2 files changed, 6 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/0356a525/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 67972e5..daabed0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -155,6 +155,8 @@ Release 0.9.0 - unreleased
 
   BUG FIXES
 
+    TAJO-981: Help command (\?) in tsql takes too long time. (YeonSu Han via jaehwa)
+
     TAJO-962: Column reference used in LIMIT clause incurs NPE.
 
     TAJO-1074: Query calculates wrong progress before subquery init. (jinho)

http://git-wip-us.apache.org/repos/asf/tajo/blob/0356a525/tajo-client/src/main/java/org/apache/tajo/cli/HelpCommand.java
----------------------------------------------------------------------
diff --git a/tajo-client/src/main/java/org/apache/tajo/cli/HelpCommand.java b/tajo-client/src/main/java/org/apache/tajo/cli/HelpCommand.java
index 52f13b0..d4ade37 100644
--- a/tajo-client/src/main/java/org/apache/tajo/cli/HelpCommand.java
+++ b/tajo-client/src/main/java/org/apache/tajo/cli/HelpCommand.java
@@ -18,14 +18,9 @@
 
 package org.apache.tajo.cli;
 
-import org.apache.tajo.util.VersionInfo;
-
-import java.io.IOException;
 import java.io.PrintWriter;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.ProtocolException;
-import java.net.URL;
+
+import org.apache.tajo.util.VersionInfo;
 
 public class HelpCommand extends TajoShellCommand {
   private String targetDocVersion = "";
@@ -115,28 +110,11 @@ public class HelpCommand extends TajoShellCommand {
     } else {
       tajoVersion = tajoFullVersion;
     }
-
+    
     if(tajoVersion.equalsIgnoreCase("")) {
       docVersion = docDefaultVersion;
     } else {
-      try {
-        URL u = new URL("http://tajo.apache.org/docs/"+ tajoVersion + "/");
-        HttpURLConnection huc =  (HttpURLConnection) u.openConnection();
-        huc.setConnectTimeout(1000);
-        huc.setReadTimeout(1000);
-        huc.setRequestMethod("HEAD");
-        if(huc.getResponseCode() == HttpURLConnection.HTTP_OK) {
-          docVersion = tajoVersion;
-        } else {
-          docVersion = docDefaultVersion;
-        }
-      } catch (MalformedURLException e0) {
-        docVersion = docDefaultVersion;
-      } catch (ProtocolException e1) {
-        docVersion = docDefaultVersion;
-      } catch (IOException e2) {
-        docVersion = docDefaultVersion;
-      }
+    	docVersion = tajoVersion;
     }
 
     return docVersion;


Mime
View raw message