You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by cw...@apache.org on 2012/09/04 10:00:37 UTC

svn commit: r1380478 - in /hive/trunk: builtins/build.xml builtins/ivy.xml pdk/scripts/build-plugin.xml pdk/test-plugin/test/conf/ pdk/test-plugin/test/conf/log4j.properties

Author: cws
Date: Tue Sep  4 08:00:36 2012
New Revision: 1380478

URL: http://svn.apache.org/viewvc?rev=1380478&view=rev
Log:
HIVE-3413. Fix pdk.PluginTest on hadoop23 (Zhenxiao Luo via cws)

Added:
    hive/trunk/pdk/test-plugin/test/conf/
    hive/trunk/pdk/test-plugin/test/conf/log4j.properties   (with props)
Modified:
    hive/trunk/builtins/build.xml
    hive/trunk/builtins/ivy.xml
    hive/trunk/pdk/scripts/build-plugin.xml

Modified: hive/trunk/builtins/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/builtins/build.xml?rev=1380478&r1=1380477&r2=1380478&view=diff
==============================================================================
--- hive/trunk/builtins/build.xml (original)
+++ hive/trunk/builtins/build.xml Tue Sep  4 08:00:36 2012
@@ -43,7 +43,7 @@
                  artifactspattern="${build.dir}/${ivy.publish.pattern}"/>
   </target>
 
-  <target name="test" unless="testcase" depends="init, setup, ivy-retrieve">
+  <target name="test" unless="testcase" depends="init, setup, ivy-retrieve, ivy-retrieve-test">
     <echo message="Project: ${ant.project.name}"/>
     <ant antfile="build-plugin.xml" target="test" inheritAll="false">
       <property name="hive.install.dir" value="${build.dir.hive}/dist"/>

Modified: hive/trunk/builtins/ivy.xml
URL: http://svn.apache.org/viewvc/hive/trunk/builtins/ivy.xml?rev=1380478&r1=1380477&r2=1380478&view=diff
==============================================================================
--- hive/trunk/builtins/ivy.xml (original)
+++ hive/trunk/builtins/ivy.xml Tue Sep  4 08:00:36 2012
@@ -31,6 +31,14 @@
                 conf="compile->default" />
     <dependency org="org.apache.hive" name="hive-pdk" rev="${version}"
                 conf="compile->default" transitive="false" />
+
+    <!-- Test Dependencies -->
+    <dependency org="org.apache.hadoop" name="hadoop-minicluster"
+                rev="${hadoop.version.ant-internal}" conf="hadoop23.test->default">
+      <artifact name="hadoop-minicluster" ext="jar" />
+      <exclude org="commons-daemon" module="commons-daemon"/><!--bad POM-->
+      <exclude org="org.apache.commons" module="commons-daemon"/><!--bad POM-->
+    </dependency>
   </dependencies>
 
 </ivy-module>

Modified: hive/trunk/pdk/scripts/build-plugin.xml
URL: http://svn.apache.org/viewvc/hive/trunk/pdk/scripts/build-plugin.xml?rev=1380478&r1=1380477&r2=1380478&view=diff
==============================================================================
--- hive/trunk/pdk/scripts/build-plugin.xml (original)
+++ hive/trunk/pdk/scripts/build-plugin.xml Tue Sep  4 08:00:36 2012
@@ -25,6 +25,7 @@
   <property name="build.classes" location="${build.dir}/classes"/>
   <property name="build.metadata" location="${build.dir}/metadata"/>
   <property name="install.dir" location="${pdk.script.dir}/../.."/>
+  <property name="pdk.test.conf.dir" location="${pdk.script.dir}/../test-plugin/test/conf"/>
   <property name="function.sql.prefix" value=""/>
   <property name="plugin.jar.basename" 
             value="${plugin.libname}-${plugin.version}.jar"/>
@@ -133,6 +134,7 @@
       <sysproperty key="hive.metastore.warehouse.dir" value="${build.dir}/warehouse"/>
       <env key="HIVE_HADOOP_TEST_CLASSPATH" value="${hive.hadoop.mock.classpath}"/>
       <env key="HADOOP_HOME" value="${hadoop.home}"/>
+      <env key="HADOOP_CONF_DIR" value="${pdk.test.conf.dir}"/>
       <env key="HIVE_CONF_DIR" value="${install.dir}/conf"/>
       <env key="HIVE_HOME" value="${install.dir}"/>
       <env key="HIVE_PLUGIN_ROOT_DIR" value="${plugin.dir}"/>

Added: hive/trunk/pdk/test-plugin/test/conf/log4j.properties
URL: http://svn.apache.org/viewvc/hive/trunk/pdk/test-plugin/test/conf/log4j.properties?rev=1380478&view=auto
==============================================================================
--- hive/trunk/pdk/test-plugin/test/conf/log4j.properties (added)
+++ hive/trunk/pdk/test-plugin/test/conf/log4j.properties Tue Sep  4 08:00:36 2012
@@ -0,0 +1,82 @@
+# 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.
+
+# This file is to configure hadoop log4j
+# Define some default values that can be overridden by system properties
+hive.root.logger=DEBUG,DRFA
+hive.log.dir=/tmp/
+hive.log.file=hive.log
+
+# Define the root logger to the system property "hadoop.root.logger".
+log4j.rootLogger=${hive.root.logger}, EventCounter
+
+# Logging Threshold
+log4j.threshhold=WARN
+
+# Null Appender
+log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender
+
+#
+# Daily Rolling File Appender
+#
+
+log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DRFA.File=${hive.log.dir}/${hive.log.file}
+
+# Rollver at midnight
+log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
+
+# 30-day backup
+#log4j.appender.DRFA.MaxBackupIndex=30
+log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
+# Debugging Pattern format
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+
+
+#
+# console
+# Add "console" to rootlogger above if you want to use this
+#
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
+
+#custom logging levels
+#log4j.logger.xxx=DEBUG
+
+#
+# Event Counter Appender
+# Sends counts of logging messages at different severity levels to Hadoop Metrics.
+#
+log4j.appender.EventCounter=org.apache.hadoop.metrics.jvm.EventCounter
+
+
+log4j.category.DataNucleus=ERROR,DRFA
+log4j.category.Datastore=ERROR,DRFA
+log4j.category.Datastore.Schema=ERROR,DRFA
+log4j.category.JPOX.Datastore=ERROR,DRFA
+log4j.category.JPOX.Plugin=ERROR,DRFA
+log4j.category.JPOX.MetaData=ERROR,DRFA
+log4j.category.JPOX.Query=ERROR,DRFA
+log4j.category.JPOX.General=ERROR,DRFA
+log4j.category.JPOX.Enhancer=ERROR,DRFA
+log4j.logger.org.apache.hadoop.conf.Configuration=ERROR,DRFA
+

Propchange: hive/trunk/pdk/test-plugin/test/conf/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native