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 + *

+ * 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.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()); + } +} 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 - *

- * 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.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()); - } -} 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;