From: <st...@us...> - 2009-06-30 10:23:30
|
Revision: 7754 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=7754&view=rev Author: steve_l Date: 2009-06-30 10:21:58 +0000 (Tue, 30 Jun 2009) Log Message: ----------- SFOS-1249 JobSubmissionTest failing -destination dir not being created Modified Paths: -------------- trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/common/DfsUtils.java trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/components/dfs/DfsCopyFilesImpl.java Modified: trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/common/DfsUtils.java =================================================================== --- trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/common/DfsUtils.java 2009-06-30 01:04:27 UTC (rev 7753) +++ trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/common/DfsUtils.java 2009-06-30 10:21:58 UTC (rev 7754) @@ -245,8 +245,19 @@ * @throws SmartFrogRuntimeException failure to create the directories */ public static void mkParentDirs(FileSystem fileSystem, Path dest) throws SmartFrogRuntimeException { + mkdirs(fileSystem, dest.getParent()); + } + + /** + * Create the parent directories of a given path + * + * @param fileSystem filesystem to work with + * @param dest file + * @throws SmartFrogRuntimeException failure to create the directories + */ + public static void mkdirs(FileSystem fileSystem, Path dest) throws SmartFrogRuntimeException { try { - if (!fileSystem.mkdirs(dest.getParent())) { + if (!fileSystem.mkdirs(dest)) { throw new SmartFrogRuntimeException(ERROR_MKDIR_FAILED + dest); } } catch (IOException e) { Modified: trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/components/dfs/DfsCopyFilesImpl.java =================================================================== --- trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/components/dfs/DfsCopyFilesImpl.java 2009-06-30 01:04:27 UTC (rev 7753) +++ trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/components/dfs/DfsCopyFilesImpl.java 2009-06-30 10:21:58 UTC (rev 7754) @@ -97,7 +97,7 @@ sourceFS = DfsUtils.createFileSystem(sourceFSURL, conf); destFS = DfsUtils.createFileSystem(destFSURL, conf); DfsUtils.assertNotDependent(sourceFS, source, destFS, dest); - DfsUtils.mkParentDirs(destFS, dest); + DfsUtils.mkdirs(destFS, dest); //build a list of sourcefiles List<Path> sourceFiles = listFiles(sourceFS, source, matchPattern); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |