Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
FALCON-2290 Change staging directory for entity creation while extens…
Browse files Browse the repository at this point in the history
…ion job submission
  • Loading branch information
PracheerAgarwal committed Feb 23, 2017
1 parent 7f3932c commit beece2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/main/java/org/apache/falcon/ExtensionHandler.java
Expand Up @@ -55,6 +55,7 @@ public final class ExtensionHandler {
public static final Logger LOG = LoggerFactory.getLogger(ExtensionHandler.class);
private static final String UTF_8 = CharEncoding.UTF_8;
private static final String TMP_BASE_DIR = String.format("file://%s", System.getProperty("java.io.tmpdir"));
private static final String PATH_SEPARATOR = "_";
private static final String LOCATION = "location";
private static final String TYPE = "type";
private static final String NAME = "extensionName";
Expand Down Expand Up @@ -146,7 +147,7 @@ private static void stageEntities(List<Entity> entities, String stagePath) {
}

private static String createStagePath(String extensionName, String jobName) {
String stagePath = TMP_BASE_DIR + File.separator + extensionName + File.separator + jobName
String stagePath = TMP_BASE_DIR + File.separator + extensionName + PATH_SEPARATOR + jobName
+ File.separator + System.currentTimeMillis()/1000;
File tmpPath = new File(stagePath);
if (tmpPath.mkdir()) {
Expand Down

0 comments on commit beece2d

Please sign in to comment.