Repository: incubator-ignite Updated Branches: refs/heads/ignite-418 2b48860be -> 61d0d564a
[IGNITE-418]: corrections by review results. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/61d0d564 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/61d0d564 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/61d0d564 Branch: refs/heads/ignite-418 Commit: 61d0d564a73c9dc2759d877de89e86048d46bce3 Parents: 2b48860 Author: iveselovskiy <iveselovs...@gridgain.com> Authored: Tue Mar 10 11:41:28 2015 +0300 Committer: iveselovskiy <iveselovs...@gridgain.com> Committed: Tue Mar 10 11:41:28 2015 +0300 ---------------------------------------------------------------------- .../hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java | 10 +++------- .../ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java | 3 ++- .../ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java | 10 ++++++---- pom.xml | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/61d0d564/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java index 36f1dda..807311b 100644 --- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java +++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java @@ -330,7 +330,7 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys final Map<String, String> props = properties(status); - IgfsFile igfsFile = new IgfsFile() { + return new IgfsFile() { @Override public IgfsPath path() { return path; } @@ -344,7 +344,8 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys } @Override public int blockSize() { - return (int)status.getBlockSize(); + // By convention directory has blockSize == 0, while file has blockSize > 0: + return isDirectory() ? 0 : (int)status.getBlockSize(); } @Override public long groupBlockSize() { @@ -383,11 +384,6 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys return props; } }; - - // By convention directory has blockSize == 0, while file has blockSize > 0: - assert igfsFile.isDirectory() == (igfsFile.blockSize() == 0); - - return igfsFile; } catch (FileNotFoundException ignore) { return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/61d0d564/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java index 92f5b85..41ef3e5 100644 --- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java +++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java @@ -702,7 +702,8 @@ public class IgniteHadoopFileSystem extends FileSystem { } catch (IOException ioe) { // Log the exception before rethrowing since it may be ignored: - LOG.warn("Failed to rename [srcPath="+srcPath+", dstPath="+dstPath+", mode="+mode+"]: ", ioe); + LOG.warn("Failed to rename [srcPath=" + srcPath + ", dstPath=" + dstPath + ", mode=" + mode + ']', + ioe); throw ioe; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/61d0d564/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java index fea8739..5dac047 100644 --- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java +++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java @@ -581,17 +581,19 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements Closea IgfsPath dstPath = convert(dst); Set<IgfsMode> childrenModes = modeRslvr.resolveChildrenModes(srcPath); - if (clientLog.isLogEnabled()) - clientLog.logRename(srcPath, modeRslvr.resolveMode(srcPath), dstPath); - if (childrenModes.contains(PROXY)) { if (clientLog.isLogEnabled()) clientLog.logRename(srcPath, PROXY, dstPath); secondaryFs.renameInternal(toSecondary(src), toSecondary(dst)); } + else { + if (clientLog.isLogEnabled()) + clientLog.logRename(srcPath, modeRslvr.resolveMode(srcPath), dstPath); + + rmtClient.rename(srcPath, dstPath); + } - rmtClient.rename(srcPath, dstPath); } finally { leaveBusy(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/61d0d564/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 94b0c36..9c6ef75 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ <properties> <ignite.version>1.0.0-RC2-SNAPSHOT</ignite.version> <ignite.edition>fabric</ignite.edition> - <hadoop.version>2.6.0</hadoop.version> + <hadoop.version>2.4.1</hadoop.version> <spring.version>4.1.0.RELEASE</spring.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.build.timestamp.format>MMMM d yyyy</maven.build.timestamp.format>