Author: virag
Date: Wed Feb 13 01:29:31 2013
New Revision: 1445453

URL: http://svn.apache.org/r1445453
Log:
OOZIE-1197 Create a hcat sharelib which can be included in pig, hive and java 
actions (mona,rohini via virag)

Added:
    oozie/branches/hcat-intre/sharelib/hcatalog/
    oozie/branches/hcat-intre/sharelib/hcatalog/pom.xml
Modified:
    
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
    
oozie/branches/hcat-intre/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
    oozie/branches/hcat-intre/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
    oozie/branches/hcat-intre/release-log.txt
    oozie/branches/hcat-intre/sharelib/pom.xml
    oozie/branches/hcat-intre/src/main/assemblies/sharelib.xml

Modified: 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
 (original)
+++ 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
 Wed Feb 13 01:29:31 2013
@@ -389,39 +389,44 @@ public class JavaActionExecutor extends 
         }
     }
 
-    protected void addShareLib(Path appPath, Configuration conf, String 
actionShareLibName)
-    throws ActionExecutorException {
-        if (actionShareLibName != null) {
-            try {
-                Path systemLibPath = 
Services.get().get(WorkflowAppService.class).getSystemLibPath();
-                if (systemLibPath != null) {
-                    Path actionLibPath = new Path(systemLibPath, 
actionShareLibName);
-                    String user = conf.get("user.name");
-                    FileSystem fs;
-                    // If the actionLibPath has a valid scheme and authority, 
then use them to determine the filesystem that the
-                    // sharelib resides on; otherwise, assume it resides on 
the same filesystem as the appPath and use the appPath
-                    // to determine the filesystem
-                    if (actionLibPath.toUri().getScheme() != null && 
actionLibPath.toUri().getAuthority() != null) {
-                        fs = 
Services.get().get(HadoopAccessorService.class).createFileSystem(user, 
actionLibPath.toUri(), conf);
-                    }
-                    else {
-                        fs = 
Services.get().get(HadoopAccessorService.class).createFileSystem(user, 
appPath.toUri(), conf);
-                    }
-                    if (fs.exists(actionLibPath)) {
-                        FileStatus[] files = fs.listStatus(actionLibPath);
-                        for (FileStatus file : files) {
-                            addToCache(conf, actionLibPath, 
file.getPath().toUri().getPath(), false);
+    protected void addShareLib(Path appPath, Configuration conf, String[] 
actionShareLibNames)
+            throws ActionExecutorException {
+        if (actionShareLibNames != null) {
+            for (String actionShareLibName : actionShareLibNames) {
+                try {
+                    Path systemLibPath = 
Services.get().get(WorkflowAppService.class).getSystemLibPath();
+                    if (systemLibPath != null) {
+                        Path actionLibPath = new Path(systemLibPath, 
actionShareLibName.trim());
+                        String user = conf.get("user.name");
+                        FileSystem fs;
+                        // If the actionLibPath has a valid scheme and 
authority, then use them to
+                        // determine the filesystem that the sharelib resides 
on; otherwise, assume
+                        // it resides on the same filesystem as the appPath 
and use the appPath to
+                        // determine the filesystem
+                        if (actionLibPath.toUri().getScheme() != null && 
actionLibPath.toUri().getAuthority() != null) {
+                            fs = 
Services.get().get(HadoopAccessorService.class)
+                                    .createFileSystem(user, 
actionLibPath.toUri(), conf);
+                        }
+                        else {
+                            fs = 
Services.get().get(HadoopAccessorService.class)
+                                    .createFileSystem(user, appPath.toUri(), 
conf);
+                        }
+                        if (fs.exists(actionLibPath)) {
+                            FileStatus[] files = fs.listStatus(actionLibPath);
+                            for (FileStatus file : files) {
+                                addToCache(conf, actionLibPath, 
file.getPath().toUri().getPath(), false);
+                            }
                         }
                     }
                 }
-            }
-            catch (HadoopAccessorException ex){
-                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED,
-                        ex.getErrorCode().toString(), ex.getMessage());
-            }
-            catch (IOException ex){
-                throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED,
-                        "It should never happen", ex.getMessage());
+                catch (HadoopAccessorException ex) {
+                    throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED, 
ex.getErrorCode()
+                            .toString(), ex.getMessage());
+                }
+                catch (IOException ex) {
+                    throw new 
ActionExecutorException(ActionExecutorException.ErrorType.FAILED,
+                            "It should never happen", ex.getMessage());
+                }
             }
         }
     }
@@ -501,7 +506,7 @@ public class JavaActionExecutor extends 
         // Add action specific share libs
         addActionShareLib(appPath, conf, context, actionXml);
         // Add common sharelibs for Oozie
-        addShareLib(appPath, conf, JavaActionExecutor.OOZIE_COMMON_LIBDIR);
+        addShareLib(appPath, conf, new 
String[]{JavaActionExecutor.OOZIE_COMMON_LIBDIR});
     }
 
     private void addActionShareLib(Path appPath, Configuration conf, Context 
context, Element actionXml)
@@ -517,7 +522,7 @@ public class JavaActionExecutor extends 
         // Action sharelibs are only added if user has specified to use system 
libpath
         if (wfJobConf.getBoolean(OozieClient.USE_SYSTEM_LIBPATH, false)) {
             // add action specific sharelibs
-            addShareLib(appPath, conf, getShareLibName(context, actionXml, 
conf));
+            addShareLib(appPath, conf, getShareLibNames(context, actionXml, 
conf));
         }
     }
 
@@ -1161,14 +1166,15 @@ public class JavaActionExecutor extends 
 
 
     /**
-     * Return the sharelib name for the action.
+     * Return the sharelib names for the action.
      * <p/>
-     * If <code>NULL</code> or emtpy, it means that the action does not use 
the action
+     * If <code>NULL</code> or empty, it means that the action does not use 
the action
      * sharelib.
      * <p/>
      * If a non-empty string, i.e. <code>foo</code>, it means the action uses 
the
-     * action sharelib subdirectory <code>foo</code> and all JARs in the 
sharelib
-     * <code>foo</code> directory will be in the action classpath.
+     * action sharelib sub-directory <code>foo</code> and all JARs in the 
sharelib
+     * <code>foo</code> directory will be in the action classpath. Multiple 
sharelib
+     * sub-directories can be specified as a comma separated list.
      * <p/>
      * The resolution is done using the following precedence order:
      * <ul>
@@ -1181,18 +1187,22 @@ public class JavaActionExecutor extends 
      *
      * @param context executor context.
      * @param actionXml
-     *@param conf action configuration.  @return the action sharelib name.
+     * @param conf action configuration.
+     * @return the action sharelib names.
      */
-    protected String getShareLibName(Context context, Element actionXml, 
Configuration conf) {
-        String name = conf.get(ACTION_SHARELIB_FOR + getType());
-        if (name == null) {
+    protected String[] getShareLibNames(Context context, Element actionXml, 
Configuration conf) {
+        String[] names = conf.getStrings(ACTION_SHARELIB_FOR + getType());
+        if (names == null || names.length == 0) {
             try {
                 XConfiguration jobConf = new XConfiguration(new 
StringReader(context.getWorkflow().getConf()));
-                name = jobConf.get(ACTION_SHARELIB_FOR + getType());
-                if (name == null) {
-                    name = Services.get().getConf().get(ACTION_SHARELIB_FOR + 
getType());
-                    if (name == null) {
-                        name = getDefaultShareLibName(actionXml);
+                names = jobConf.getStrings(ACTION_SHARELIB_FOR + getType());
+                if (names == null || names.length == 0) {
+                    names = 
Services.get().getConf().getStrings(ACTION_SHARELIB_FOR + getType());
+                    if (names == null || names.length == 0) {
+                        String name = getDefaultShareLibName(actionXml);
+                        if (name != null) {
+                            names = new String[] { name };
+                        }
                     }
                 }
             }
@@ -1200,7 +1210,7 @@ public class JavaActionExecutor extends 
                 throw new RuntimeException("It cannot happen, " + 
ex.toString(), ex);
             }
         }
-        return name;
+        return names;
     }
 
     private final static String ACTION_SHARELIB_FOR = 
"oozie.action.sharelib.for.";

Modified: 
oozie/branches/hcat-intre/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- 
oozie/branches/hcat-intre/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
 (original)
+++ 
oozie/branches/hcat-intre/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
 Wed Feb 13 01:29:31 2013
@@ -46,7 +46,6 @@ import org.apache.oozie.WorkflowActionBe
 import org.apache.oozie.WorkflowJobBean;
 import org.apache.oozie.action.ActionExecutor;
 import org.apache.oozie.action.ActionExecutorException;
-import org.apache.oozie.action.hadoop.ActionExecutorTestCase.Context;
 import org.apache.oozie.client.OozieClient;
 import org.apache.oozie.client.WorkflowAction;
 import org.apache.oozie.client.WorkflowJob;
@@ -67,6 +66,8 @@ import org.apache.oozie.workflow.lite.En
 import org.apache.oozie.workflow.lite.LiteWorkflowApp;
 import org.apache.oozie.workflow.lite.StartNodeDef;
 import org.jdom.Element;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class TestJavaActionExecutor extends ActionExecutorTestCase {
 
@@ -76,6 +77,7 @@ public class TestJavaActionExecutor exte
         setSystemProperty("oozie.service.ActionService.executor.classes", 
JavaActionExecutor.class.getName());
         
setSystemProperty("oozie.service.HadoopAccessorService.action.configurations",
                           "*=hadoop-conf," + getJobTrackerUri() + 
"=action-conf");
+        setSystemProperty(WorkflowAppService.SYSTEM_LIB_PATH, 
getFsTestCaseDir() + "/systemlib");
         new File(getTestCaseConfDir(), "action-conf").mkdir();
         InputStream is = 
Thread.currentThread().getContextClassLoader().getResourceAsStream("test-action-config.xml");
         OutputStream os = new FileOutputStream(new File(getTestCaseConfDir() + 
"/action-conf", "java.xml"));
@@ -318,7 +320,6 @@ public class TestJavaActionExecutor exte
         protoConf.set(WorkflowAppService.HADOOP_USER, getTestUser());
         protoConf.setStrings(WorkflowAppService.APP_LIB_PATH_LIST, 
appJarPath.toString(), appSoPath.toString());
 
-
         WorkflowJobBean wf = createBaseWorkflow(protoConf, "action");
         if(group != null) {
             wf.setGroup(group);
@@ -983,20 +984,24 @@ public class TestJavaActionExecutor exte
 
         Configuration actionConf = new XConfiguration();
 
-        assertEquals("java-action-executor", ae.getShareLibName(context, new 
Element("java"), actionConf));
+        Assert.assertArrayEquals(new String[] { "java-action-executor" },
+                ae.getShareLibNames(context, new Element("java"), actionConf));
 
         Services.get().getConf().set("oozie.action.sharelib.for.java", 
"java-oozie-conf");
-        assertEquals("java-oozie-conf", ae.getShareLibName(context, new 
Element("java"), actionConf));
+        Assert.assertArrayEquals(new String[] { "java-oozie-conf" },
+                ae.getShareLibNames(context, new Element("java"), actionConf));
 
         jobConf = "<configuration>" + "<property>"
                + "<name>oozie.action.sharelib.for.java</name>"
                + "<value>java-job-conf</value>" + "</property>"
                + "</configuration>";
         wfBean.setConf(jobConf);
-        assertEquals("java-job-conf", ae.getShareLibName(context, new 
Element("java"), actionConf));
+        Assert.assertArrayEquals(new String[] { "java-job-conf" },
+                ae.getShareLibNames(context, new Element("java"), actionConf));
 
         actionConf.set("oozie.action.sharelib.for.java", "java-action-conf");
-        assertEquals("java-action-conf", ae.getShareLibName(context, new 
Element("java"), actionConf));
+        Assert.assertArrayEquals(new String[] { "java-action-conf" },
+                ae.getShareLibNames(context, new Element("java"), actionConf));
     }
 
     public void testJavaOpts() throws Exception {
@@ -1128,6 +1133,85 @@ public class TestJavaActionExecutor exte
         assertTrue(cacheFilesStr.contains(jar3Path.toString()));
     }
 
+    @Test
+    public void testAddActionShareLib() throws Exception {
+        Path systemLibPath = new Path(getFsTestCaseDir(), "systemlib");
+        Path javaShareLibPath = new Path(systemLibPath, "java");
+        getFileSystem().mkdirs(javaShareLibPath);
+        Path jar1Path = new Path(javaShareLibPath, "jar1.jar");
+        getFileSystem().create(jar1Path).close();
+        Path jar2Path = new Path(javaShareLibPath, "jar2.jar");
+        getFileSystem().create(jar2Path).close();
+
+        Path hcatShareLibPath = new Path(systemLibPath, "hcat");
+        getFileSystem().mkdirs(hcatShareLibPath);
+        Path jar3Path = new Path(hcatShareLibPath, "jar3.jar");
+        getFileSystem().create(jar3Path).close();
+        Path jar4Path = new Path(hcatShareLibPath, "jar4.jar");
+        getFileSystem().create(jar4Path).close();
+
+        Path otherShareLibPath = new Path(systemLibPath, "other");
+        getFileSystem().mkdirs(otherShareLibPath);
+        Path jar5Path = new Path(otherShareLibPath, "jar5.jar");
+        getFileSystem().create(jar5Path).close();
+
+        String actionXml = "<java>" + "<job-tracker>" + getJobTrackerUri() + 
"</job-tracker>" +
+                "<name-node>" + getNameNodeUri() + "</name-node>" +
+                "<job-xml>job.xml</job-xml>" + "<job-xml>job2.xml</job-xml>" +
+                "<main-class>MAIN-CLASS</main-class>" +
+                "</java>";
+        Element eActionXml = XmlUtils.parseXml(actionXml);
+        Context context = createContext(actionXml, null);
+
+        // Test oozie server action sharelib setting
+        WorkflowJobBean workflow = (WorkflowJobBean) context.getWorkflow();
+        XConfiguration wfConf = new XConfiguration();
+        wfConf.set(WorkflowAppService.HADOOP_USER, getTestUser());
+        wfConf.set(OozieClient.APP_PATH, new Path(getAppPath(), 
"workflow.xml").toString());
+        wfConf.setBoolean(OozieClient.USE_SYSTEM_LIBPATH, true);
+        workflow.setConf(XmlUtils.prettyPrint(wfConf).toString());
+
+        Services.get().getConf().set("oozie.action.sharelib.for.java", 
"java,hcat");
+
+        JavaActionExecutor ae = new JavaActionExecutor();
+
+        Configuration jobConf = ae.createBaseHadoopConf(context, eActionXml);
+        ae.setupLauncherConf(jobConf, eActionXml, getAppPath(), context);
+        ae.setLibFilesArchives(context, eActionXml, getAppPath(), jobConf);
+
+        URI[] cacheFiles = DistributedCache.getCacheFiles(jobConf);
+        String cacheFilesStr = Arrays.toString(cacheFiles);
+        assertTrue(cacheFilesStr.contains(jar1Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar2Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar3Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar4Path.toString()));
+
+        // Test per workflow action sharelib setting
+        workflow = (WorkflowJobBean) context.getWorkflow();
+        wfConf = new XConfiguration();
+        wfConf.set(WorkflowAppService.HADOOP_USER, getTestUser());
+        wfConf.set(OozieClient.APP_PATH, new Path(getAppPath(), 
"workflow.xml").toString());
+        wfConf.setBoolean(OozieClient.USE_SYSTEM_LIBPATH, true);
+        wfConf.set("oozie.action.sharelib.for.java", "other,hcat");
+        workflow.setConf(XmlUtils.prettyPrint(wfConf).toString());
+
+        Services.get().getConf().set("oozie.action.sharelib.for.java", "java");
+        ae = new JavaActionExecutor();
+
+        jobConf = ae.createBaseHadoopConf(context, eActionXml);
+        ae.setupLauncherConf(jobConf, eActionXml, getAppPath(), context);
+        ae.setLibFilesArchives(context, eActionXml, getAppPath(), jobConf);
+
+        cacheFiles = DistributedCache.getCacheFiles(jobConf);
+        cacheFilesStr = Arrays.toString(cacheFiles);
+        // The oozie server setting should have been overridden by workflow 
setting
+        assertFalse(cacheFilesStr.contains(jar1Path.toString()));
+        assertFalse(cacheFilesStr.contains(jar2Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar3Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar4Path.toString()));
+        assertTrue(cacheFilesStr.contains(jar5Path.toString()));
+    }
+
     public void testAddShareLibSchemeAndAuthority() throws Exception {
         JavaActionExecutor ae = new JavaActionExecutor() {
             @Override
@@ -1149,14 +1233,14 @@ public class TestJavaActionExecutor exte
         JobConf conf = ae.createBaseHadoopConf(context, eActionXml);
         // The next line should not throw an Exception because it will get the 
scheme and authority from the appPath, and not the
         // sharelib path because it doesn't have a scheme or authority
-        ae.addShareLib(appPath, conf, "java-action-executor");
+        ae.addShareLib(appPath, conf, new String[]{"java-action-executor"});
 
         appPath = new Path("foo://bar:1234/blah");
         conf = ae.createBaseHadoopConf(context, eActionXml);
         // The next line should throw an Exception because it will get the 
scheme and authority from the appPath, which is obviously
         // invalid, and not the sharelib path because it doesn't have a scheme 
or authority
         try {
-            ae.addShareLib(appPath, conf, "java-action-executor");
+            ae.addShareLib(appPath, conf, new 
String[]{"java-action-executor"});
         }
         catch (ActionExecutorException aee) {
             assertEquals("E0902", aee.getErrorCode());
@@ -1171,7 +1255,7 @@ public class TestJavaActionExecutor exte
         conf = ae.createBaseHadoopConf(context, eActionXml);
         // The next line should not throw an Exception because it will get the 
scheme and authority from the sharelib path (and not
         // from the obviously invalid appPath)
-        ae.addShareLib(appPath, conf, "java-action-executor");
+        ae.addShareLib(appPath, conf, new String[]{"java-action-executor"});
     }
 
     public void testFilesystemScheme() throws Exception {

Modified: 
oozie/branches/hcat-intre/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/docs/src/site/twiki/WorkflowFunctionalSpec.twiki?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- oozie/branches/hcat-intre/docs/src/site/twiki/WorkflowFunctionalSpec.twiki 
(original)
+++ oozie/branches/hcat-intre/docs/src/site/twiki/WorkflowFunctionalSpec.twiki 
Wed Feb 13 01:29:31 2013
@@ -2289,7 +2289,8 @@ and Mapreduce Streaming share library di
 
 Oozie bundles a share library for specific versions of streaming, pig, hive, 
sqoop, distcp actions. These versions
 of streaming, pig, hive, sqoop and distcp have been tested and verified to 
work correctly with the version of Oozie
-that includes them.
+that includes them. Oozie also bundles a separate share library for hcatalog, 
which can be used with pig, hive and java
+actions.
 
 In addition, Oozie provides a mechanism to override the action share library 
JARs to allow using an alternate version
 of of the action JARs.
@@ -2297,14 +2298,18 @@ of of the action JARs.
 This mechanism enables Oozie administrators to patch share library JARs, to 
include alternate versios of the share
 libraries, to provide acess to more than one version at the same time.
 
-The sharelibrary override is supported at server level and at job level. The 
share library name is resolved using
-the following precedence order:
+The share library override is supported at server level and at job level. The 
share library directory names are resolved
+using the following precedence order:
 
    *  action.sharelib.for.#ACTIONTYPE# in the action configuration
    *  action.sharelib.for.#ACTIONTYPE# in the job configuration
    *  action.sharelib.for.#ACTIONTYPE# in the oozie server configuration
    *  action's =ActionExecutor getDefaultShareLibName()= method
 
+More than one share library directory name can be specified for an action by 
using a comma separated list. For example:
+When using HCatLoader and HCatStorer in pig, =action.sharelib.for.pig= can be 
set to =pig,hcatalog= to include both pig
+and hcatalog jars.
+
 ---++ 18 User-Retry for Workflow Actions (since Oozie 3.1)
 
 Oozie provides User-Retry capabilities when an action is in =ERROR= or 
=FAILED= state.

Modified: oozie/branches/hcat-intre/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/release-log.txt?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- oozie/branches/hcat-intre/release-log.txt (original)
+++ oozie/branches/hcat-intre/release-log.txt Wed Feb 13 01:29:31 2013
@@ -1,6 +1,7 @@
 
 -- Oozie 3.4.0 release (trunk - unreleased)
 
+OOZIE-1197 Create a hcat sharelib which can be included in pig, hive and java 
actions (mona,rohini via virag)
 OOZIE-1211 oozie does not support duplicated dataset (jaoki via virag)
 OOZIE-1187 reduce memory usage of SLA query (invoked by CLI command) to avoid 
OOM (egashira via virag) 
 OOZIE-1096 Update wfgen README.txt to have the TLP mailing list (jun aoki via 
rkanter)

Added: oozie/branches/hcat-intre/sharelib/hcatalog/pom.xml
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/sharelib/hcatalog/pom.xml?rev=1445453&view=auto
==============================================================================
--- oozie/branches/hcat-intre/sharelib/hcatalog/pom.xml (added)
+++ oozie/branches/hcat-intre/sharelib/hcatalog/pom.xml Wed Feb 13 01:29:31 2013
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.oozie</groupId>
+        <artifactId>oozie-main</artifactId>
+        <version>3.4.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <groupId>org.apache.oozie</groupId>
+    <artifactId>oozie-sharelib-hcatalog</artifactId>
+    <version>3.4.0-SNAPSHOT</version>
+    <description>Apache Oozie Share Lib HCatalog</description>
+    <name>Apache Oozie Share Lib HCatalog</name>
+    <packaging>jar</packaging>
+
+    <properties>
+        <sharelib.action.postfix>hcatalog</sharelib.action.postfix>
+        <sharelib.transitive.filtering>true</sharelib.transitive.filtering>
+    </properties>
+
+    <dependencies>
+        <dependency>
+             <groupId>org.apache.oozie</groupId>
+             <artifactId>oozie-hcatalog</artifactId>
+             <scope>compile</scope>
+             <exclusions>
+                 <exclusion>
+                    <groupId>org.apache.hcatalog</groupId>
+                    <artifactId>hcatalog-server-extensions</artifactId>
+                </exclusion>
+                 <exclusion>
+                    <groupId>org.apache.hive</groupId>
+                    <artifactId>hive-builtins</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.zookeeper</groupId>
+                    <artifactId>zookeeper</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.codehaus.jackson</groupId>
+                    <artifactId>jackson-core-asl</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.codehaus.jackson</groupId>
+                    <artifactId>jackson-mapper-asl</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-collections</groupId>
+                    <artifactId>commons-collections</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpcore</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.derby</groupId>
+                    <artifactId>derby</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.googlecode.javaewah</groupId>
+                    <artifactId>JavaEWAH</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.hamcrest</groupId>
+                    <artifactId>hamcrest-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.json</groupId>
+                    <artifactId>json</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.netty</groupId>
+                    <artifactId>netty</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.antlr</groupId>
+                    <artifactId>antlr</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.mockito</groupId>
+                    <artifactId>mockito-all</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.datanucleus</groupId>
+                    <artifactId>datanucleus-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.datanucleus</groupId>
+                    <artifactId>datanucleus-rdbms</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.datanucleus</groupId>
+                    <artifactId>datanucleus-enhancer</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.datanucleus</groupId>
+                    <artifactId>datanucleus-connectionpool</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-cli</groupId>
+                    <artifactId>commons-cli</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-lang</groupId>
+                    <artifactId>commons-lang</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-dbcp</groupId>
+                    <artifactId>commons-dbcp</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-pool</groupId>
+                    <artifactId>commons-pool</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>asm</groupId>
+                    <artifactId>asm</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.antlr</groupId>
+                    <artifactId>antlr-runtime</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.antln</groupId>
+                    <artifactId>stringtemplate</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>antlr</groupId>
+                    <artifactId>antlr</artifactId>
+                </exclusion>
+             </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>gen-classpath</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>build-classpath</goal>
+                        </goals>
+                        <configuration>
+                            <includeScope>compile</includeScope>
+                            
<outputFile>${project.build.directory}/classpath</outputFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <finalName>partial-sharelib</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <descriptors>
+                        
<descriptor>../../src/main/assemblies/partial-sharelib.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Modified: oozie/branches/hcat-intre/sharelib/pom.xml
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/sharelib/pom.xml?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- oozie/branches/hcat-intre/sharelib/pom.xml (original)
+++ oozie/branches/hcat-intre/sharelib/pom.xml Wed Feb 13 01:29:31 2013
@@ -33,6 +33,7 @@
 
     <modules>
         <module>streaming</module>
+        <module>hcatalog</module>
         <module>pig</module>
         <module>hive</module>
         <module>sqoop</module>

Modified: oozie/branches/hcat-intre/src/main/assemblies/sharelib.xml
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/src/main/assemblies/sharelib.xml?rev=1445453&r1=1445452&r2=1445453&view=diff
==============================================================================
--- oozie/branches/hcat-intre/src/main/assemblies/sharelib.xml (original)
+++ oozie/branches/hcat-intre/src/main/assemblies/sharelib.xml Wed Feb 13 
01:29:31 2013
@@ -55,6 +55,10 @@
            <directory>${basedir}/distcp/target/partial-sharelib</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
+       <fileSet>
+           <directory>${basedir}/hcatalog/target/partial-sharelib</directory>
+           <outputDirectory>/</outputDirectory>
+       </fileSet>
     </fileSets>
 
 </assembly>


Reply via email to