You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2016/08/13 00:16:40 UTC

hive git commit: HIVE-14506 : TestQueryLifeTimeHook fail (Hari Sankar Subramanyiam via Chao Sun)

Repository: hive
Updated Branches:
  refs/heads/master 1f7e10c03 -> 1b0bbb89a


HIVE-14506 : TestQueryLifeTimeHook fail (Hari Sankar Subramanyiam via Chao Sun)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/1b0bbb89
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/1b0bbb89
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/1b0bbb89

Branch: refs/heads/master
Commit: 1b0bbb89a41a2374e06c41f82c779ea28cba7afc
Parents: 1f7e10c
Author: Ashutosh Chauhan <ha...@apache.org>
Authored: Fri Aug 12 17:15:39 2016 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Fri Aug 12 17:15:39 2016 -0700

----------------------------------------------------------------------
 .../hive/ql/hooks/QueryLifeTimeHookTest.java    | 44 ++++++++++++++++++++
 .../hive/ql/hooks/TestQueryLifeTimeHook.java    | 43 -------------------
 .../clientpositive/query_lifetime_hook.q        |  2 +-
 3 files changed, 45 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1b0bbb89/ql/src/test/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookTest.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookTest.java b/ql/src/test/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookTest.java
new file mode 100644
index 0000000..8ec5075
--- /dev/null
+++ b/ql/src/test/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookTest.java
@@ -0,0 +1,44 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.hadoop.hive.ql.hooks;
+
+import org.apache.hadoop.hive.ql.session.SessionState;
+import org.junit.Ignore;
+@Ignore
+public class QueryLifeTimeHookTest implements QueryLifeTimeHook {
+  @Override
+  public void beforeCompile(QueryLifeTimeHookContext ctx) {
+    SessionState.getConsole().getOutStream().println("beforeCompile: " + ctx.getCommand());
+  }
+
+  @Override
+  public void afterCompile(QueryLifeTimeHookContext ctx, boolean hasError) {
+    SessionState.getConsole().getOutStream().println("afterCompile: " + ctx.getCommand());
+  }
+
+  @Override
+  public void beforeExecution(QueryLifeTimeHookContext ctx) {
+    SessionState.getConsole().getOutStream().println("beforeExecution: " + ctx.getCommand());
+  }
+
+  @Override
+  public void afterExecution(QueryLifeTimeHookContext ctx, boolean hasError) {
+    SessionState.getConsole().getOutStream().println("afterExecution: " + ctx.getCommand());
+  }
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/1b0bbb89/ql/src/test/org/apache/hadoop/hive/ql/hooks/TestQueryLifeTimeHook.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/hooks/TestQueryLifeTimeHook.java b/ql/src/test/org/apache/hadoop/hive/ql/hooks/TestQueryLifeTimeHook.java
deleted file mode 100644
index 1f6239c..0000000
--- a/ql/src/test/org/apache/hadoop/hive/ql/hooks/TestQueryLifeTimeHook.java
+++ /dev/null
@@ -1,43 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.hadoop.hive.ql.hooks;
-
-import org.apache.hadoop.hive.ql.session.SessionState;
-
-public class TestQueryLifeTimeHook implements QueryLifeTimeHook {
-  @Override
-  public void beforeCompile(QueryLifeTimeHookContext ctx) {
-    SessionState.getConsole().getOutStream().println("beforeCompile: " + ctx.getCommand());
-  }
-
-  @Override
-  public void afterCompile(QueryLifeTimeHookContext ctx, boolean hasError) {
-    SessionState.getConsole().getOutStream().println("afterCompile: " + ctx.getCommand());
-  }
-
-  @Override
-  public void beforeExecution(QueryLifeTimeHookContext ctx) {
-    SessionState.getConsole().getOutStream().println("beforeExecution: " + ctx.getCommand());
-  }
-
-  @Override
-  public void afterExecution(QueryLifeTimeHookContext ctx, boolean hasError) {
-    SessionState.getConsole().getOutStream().println("afterExecution: " + ctx.getCommand());
-  }
-}

http://git-wip-us.apache.org/repos/asf/hive/blob/1b0bbb89/ql/src/test/queries/clientpositive/query_lifetime_hook.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/query_lifetime_hook.q b/ql/src/test/queries/clientpositive/query_lifetime_hook.q
index 8fda055..6793faa 100644
--- a/ql/src/test/queries/clientpositive/query_lifetime_hook.q
+++ b/ql/src/test/queries/clientpositive/query_lifetime_hook.q
@@ -1,3 +1,3 @@
-SET hive.query.lifetime.hooks=org.apache.hadoop.hive.ql.hooks.TestQueryLifeTimeHook;
+SET hive.query.lifetime.hooks=org.apache.hadoop.hive.ql.hooks.QueryLifeTimeHookTest;
 
 SELECT * FROM src LIMIT 1;