-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28136/#review64448
-----------------------------------------------------------
In ShareLibService, call getShareLibFilesForActionConf() on each of the action
executors and create a HashSet of file names that will be added to action conf
(currently only hive-site.xml). Whenever that file name is encountered, parse
it and keep it in a local map <Path, Configuration>
In JavaActionExectuor, addShareLib
for (Path shareLibPath : shareLibPath) {
if
(actionExecutor.getShareLibFilesForActionConf().contains(shareLibPath.getName())
{ //actually need to do fragment instead of name if fragment is present in uri
addActionConf(ShareLibService.getConfiguration(shareLibPath)); //Do not
overwrite in the action conf. Add only if not set as action conf has to take
precedence.
} else {
// add to distributed cache
}
}
core/src/main/java/org/apache/oozie/action/hadoop/Hive2ActionExecutor.java
<https://reviews.apache.org/r/28136/#comment107162>
List<String> getShareLibFilesForActionConf
core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
<https://reviews.apache.org/r/28136/#comment107163>
Not required. If fragment name or file name in
getShareLibFileForActionConf, then read the conf file and add it to actionConf
else add to distributed cache in addShareLib() itself.
core/src/main/java/org/apache/oozie/service/ShareLibService.java
<https://reviews.apache.org/r/28136/#comment107164>
No need to have separate tags for lib and conf.
core/src/test/java/org/apache/oozie/service/TestShareLibService.java
<https://reviews.apache.org/r/28136/#comment107176>
testConfFileAddedToActionConf
core/src/test/java/org/apache/oozie/service/TestShareLibService.java
<https://reviews.apache.org/r/28136/#comment107177>
testConfFileAddedToDistributedCache
- Rohini Palaniswamy
On Nov. 18, 2014, 9:10 a.m., Purshotam Shah wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28136/
> -----------------------------------------------------------
>
> (Updated Nov. 18, 2014, 9:10 a.m.)
>
>
> Review request for oozie.
>
>
> Bugs: OOZIE-2068
> https://issues.apache.org/jira/browse/OOZIE-2068
>
>
> Repository: oozie-git
>
>
> Description
> -------
>
> OOZIE-2068 - sharelib support for conf
>
>
> Diffs
> -----
>
> core/src/main/java/org/apache/oozie/action/hadoop/Hive2ActionExecutor.java
> d70c3e1
> core/src/main/java/org/apache/oozie/action/hadoop/HiveActionExecutor.java
> 832bbe6
> core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
> fd1a98b
> core/src/main/java/org/apache/oozie/service/ShareLibService.java b408549
> core/src/main/resources/oozie-default.xml 19cae9d
>
> core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
> 48166a5
> core/src/test/java/org/apache/oozie/service/TestHAShareLibService.java
> d2ad881
> core/src/test/java/org/apache/oozie/service/TestShareLibService.java
> f261448
> tools/src/test/java/org/apache/oozie/tools/TestOozieSharelibCLI.java
> a76014c
>
> Diff: https://reviews.apache.org/r/28136/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Purshotam Shah
>
>