Author: mona
Date: Thu Nov  8 02:43:09 2012
New Revision: 1406898

URL: http://svn.apache.org/viewvc?rev=1406898&view=rev
Log:
OOZIE-1045 Parameterize <unresolved-instances> tag currently hardcoded 
(egashira via mona)

Modified:
    
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
    
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
    
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
    oozie/branches/hcat-intre/release-log.txt

Modified: 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java?rev=1406898&r1=1406897&r2=1406898&view=diff
==============================================================================
--- 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
 (original)
+++ 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
 Thu Nov  8 02:43:09 2012
@@ -294,7 +294,7 @@ public class CoordActionInputCheckXComma
         Element outputList = eAction.getChild("output-events", 
eAction.getNamespace());
         if (outputList != null) {
             for (Element dEvent : (List<Element>) 
outputList.getChildren("data-out", eAction.getNamespace())) {
-                if (dEvent.getChild("unresolved-instances", 
dEvent.getNamespace()) != null) {
+                if (dEvent.getChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
dEvent.getNamespace()) != null) {
                     throw new CommandException(ErrorCode.E1006, 
"coord:latest()/future()",
                             " not permitted in output-event ");
                 }
@@ -317,11 +317,11 @@ public class CoordActionInputCheckXComma
     private boolean materializeUnresolvedEvent(List<Element> eDataEvents, Date 
nominalTime, Date actualTime,
             Configuration conf) throws Exception {
         for (Element dEvent : eDataEvents) {
-            if (dEvent.getChild("unresolved-instances", dEvent.getNamespace()) 
== null) {
+            if (dEvent.getChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
dEvent.getNamespace()) == null) {
                 continue;
             }
             ELEvaluator eval = 
CoordELEvaluator.createLazyEvaluator(actualTime, nominalTime, dEvent, conf);
-            String uresolvedInstance = dEvent.getChild("unresolved-instances", 
dEvent.getNamespace()).getTextTrim();
+            String uresolvedInstance = 
dEvent.getChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
dEvent.getNamespace()).getTextTrim();
             String unresolvedList[] = 
uresolvedInstance.split(CoordELFunctions.INSTANCE_SEPARATOR);
             StringBuffer resolvedTmp = new StringBuffer();
             for (int i = 0; i < unresolvedList.length; i++) {
@@ -346,7 +346,7 @@ public class CoordActionInputCheckXComma
                 uriInstance.addContent(resolvedTmp.toString());
                 dEvent.getContent().add(1, uriInstance);
             }
-            dEvent.removeChild("unresolved-instances", dEvent.getNamespace());
+            dEvent.removeChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
dEvent.getNamespace());
         }
 
         return true;

Modified: 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java?rev=1406898&r1=1406897&r2=1406898&view=diff
==============================================================================
--- 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
 (original)
+++ 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
 Thu Nov  8 02:43:09 2012
@@ -6,9 +6,9 @@
  * 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.
@@ -46,6 +46,7 @@ public class CoordCommandUtils {
     public static int FUTURE = 2;
     public static int UNEXPECTED = -1;
     public static final String RESOLVED_UNRESOLVED_SEPARATOR = ";";
+    public static final String UNRESOLVED_INST_TAG = "unresolved-instances";
 
     /**
      * parse a function like coord:latest(n)/future() and return the 'n'.
@@ -259,7 +260,7 @@ public class CoordCommandUtils {
             dependencyList.append(urisWithDoneFlag);
         }
         if (unresolvedInstances.length() > 0) {
-            Element elemInstance = new Element("unresolved-instances", 
event.getNamespace());
+            Element elemInstance = new Element(UNRESOLVED_INST_TAG, 
event.getNamespace());
             elemInstance.addContent(unresolvedInstances.toString());
             event.getContent().add(1, elemInstance);
         }
@@ -475,7 +476,7 @@ public class CoordCommandUtils {
             resolveInstanceRange(event, instances, appInst, conf, eval);
             // Separate out the unresolved instances
             separateResolvedAndUnresolved(event, instances, dependencyList);
-            String tmpUnresolved = 
event.getChildTextTrim("unresolved-instances", event.getNamespace());
+            String tmpUnresolved = event.getChildTextTrim(UNRESOLVED_INST_TAG, 
event.getNamespace());
             if (tmpUnresolved != null) {
                 if (unresolvedList.length() > 0) {
                     unresolvedList.append(CoordELFunctions.INSTANCE_SEPARATOR);

Modified: 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java?rev=1406898&r1=1406897&r2=1406898&view=diff
==============================================================================
--- 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
 (original)
+++ 
oozie/branches/hcat-intre/core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
 Thu Nov  8 02:43:09 2012
@@ -6,9 +6,9 @@
  * 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.
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.oozie.command.coord.CoordCommandUtils;
 import org.apache.oozie.service.ELService;
 import org.apache.oozie.service.Services;
 import org.apache.oozie.util.DateUtils;
@@ -163,7 +164,7 @@ public class CoordELEvaluator {
                 }
                 else {
                 }
-                if (data.getChild("unresolved-instances", data.getNamespace()) 
!= null) {
+                if (data.getChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
data.getNamespace()) != null) {
                     e.setVariable(".datain." + data.getAttributeValue("name") 
+ ".unresolved", "true"); // TODO:
                     // check
                     // null
@@ -180,7 +181,7 @@ public class CoordELEvaluator {
                 }
                 else {
                 }// TODO
-                if (data.getChild("unresolved-instances", data.getNamespace()) 
!= null) {
+                if (data.getChild(CoordCommandUtils.UNRESOLVED_INST_TAG, 
data.getNamespace()) != null) {
                     e.setVariable(".dataout." + data.getAttributeValue("name") 
+ ".unresolved", "true"); // TODO:
                     // check
                     // null

Modified: oozie/branches/hcat-intre/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/branches/hcat-intre/release-log.txt?rev=1406898&r1=1406897&r2=1406898&view=diff
==============================================================================
--- oozie/branches/hcat-intre/release-log.txt (original)
+++ oozie/branches/hcat-intre/release-log.txt Thu Nov  8 02:43:09 2012
@@ -1,4 +1,5 @@
 -- Oozie 3.4.0 release (trunk - unreleased)
+OOZIE-1045 Parameterize <unresolved-instances> tag currently hardcoded 
(egashira via mona)
 OOZIE-1029 MiniMRCluster fails to start when used against YARN (rkanter via 
tucu)
 OOZIE-1048 Enable propagation of native libraries as a VM argument using 
java.library.path (venkatesh via tucu)
 OOZIE-1011 Tests from OOZIE-994 fail when run against Hadoop trunk (rkanter 
via tucu)


Reply via email to