Permalink
Browse files

removing trailing / for partition expression for replication

  • Loading branch information...
1 parent 8af69c9 commit 09d352b94679fcc8a8b9e669e15508440469766c Shwetha GS committed Nov 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 feed/src/main/java/org/apache/ivory/converter/OozieFeedMapper.java
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.fs.Path;
import org.apache.ivory.IvoryException;
import org.apache.ivory.Tag;
@@ -246,7 +247,9 @@ private ACTION getReplicationWorkflowAction(Cluster srcCluster, Cluster trgClust
props.put("srcClusterColo", srcCluster.getColo());
props.put(ARG.feedNames.getPropName(), feed.getName());
props.put(ARG.feedInstancePaths.getPropName(), pathsWithPartitions.toString());
- props.put("sourceRelativePaths", pathsWithPartitions.toString().replaceAll("//+", "/"));
+ String parts = pathsWithPartitions.toString().replaceAll("//+", "/");
+ parts = StringUtils.stripEnd(parts, "/");
+ props.put("sourceRelativePaths", parts);
props.put("distcpSourcePaths", "${coord:dataIn('input')}");
props.put("distcpTargetPaths", "${coord:dataOut('output')}");
props.put("ivoryInPaths", pathsWithPartitions.toString());

0 comments on commit 09d352b

Please sign in to comment.