ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject incubator-ignite git commit: # IGNITE-414: Final fix.
Date Tue, 10 Mar 2015 14:34:55 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-414 8310d07dc -> 5e69db20d


# IGNITE-414: Final fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5e69db20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5e69db20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5e69db20

Branch: refs/heads/ignite-414
Commit: 5e69db20d0de75ed1ce761410f7f5ac4e11b3051
Parents: 8310d07
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Mar 10 17:34:57 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Mar 10 17:34:57 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/igfs/IgfsImpl.java      | 78 ++++++++++----------
 1 file changed, 39 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e69db20/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index 8c4078c..8e45b71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -453,10 +453,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public boolean exists(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<Boolean>() {
             @Override public Boolean call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("Check file exists: " + path);
 
@@ -490,10 +490,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsFile info(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<IgfsFile>() {
             @Override public IgfsFile call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("Get file info: " + path);
 
@@ -511,10 +511,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsPathSummary summary(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<IgfsPathSummary>() {
             @Override public IgfsPathSummary call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("Calculating path summary: " + path);
 
@@ -534,12 +534,12 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsFile update(final IgfsPath path, final Map<String, String>
props) {
+        A.notNull(path, "path");
+        A.notNull(props, "props");
+        A.ensure(!props.isEmpty(), "!props.isEmpty()");
+
         return safeOp(new Callable<IgfsFile>() {
             @Override public IgfsFile call() throws Exception {
-                A.notNull(path, "path");
-                A.notNull(props, "props");
-                A.ensure(!props.isEmpty(), "!props.isEmpty()");
-
                 if (log.isDebugEnabled())
                     log.debug("Set file properties [path=" + path + ", props=" + props +
']');
 
@@ -583,11 +583,11 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public void rename(final IgfsPath src, final IgfsPath dest) {
+        A.notNull(src, "src");
+        A.notNull(dest, "dest");
+
         safeOp(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                A.notNull(src, "src");
-                A.notNull(dest, "dest");
-
                 if (log.isDebugEnabled())
                     log.debug("Rename file [src=" + src + ", dest=" + dest + ']');
 
@@ -687,10 +687,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public boolean delete(final IgfsPath path, final boolean recursive) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<Boolean>() {
             @Override public Boolean call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("Deleting file [path=" + path + ", recursive=" + recursive
+ ']');
 
@@ -781,10 +781,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public void mkdirs(final IgfsPath path, @Nullable final Map<String, String>
props)  {
+        A.notNull(path, "path");
+
         safeOp(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("Make directories: " + path);
 
@@ -863,10 +863,10 @@ public final class IgfsImpl implements IgfsEx {
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public Collection<IgfsPath> listPaths(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<Collection<IgfsPath>>() {
             @Override public Collection<IgfsPath> call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("List directory: " + path);
 
@@ -907,10 +907,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public Collection<IgfsFile> listFiles(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<Collection<IgfsFile>>() {
             @Override public Collection<IgfsFile> call() throws Exception {
-                A.notNull(path, "path");
-
                 if (log.isDebugEnabled())
                     log.debug("List directory details: " + path);
 
@@ -982,12 +982,12 @@ public final class IgfsImpl implements IgfsEx {
     /** {@inheritDoc} */
     @Override public IgfsInputStreamAdapter open(final IgfsPath path, final int bufSize,
         final int seqReadsBeforePrefetch) {
+        A.notNull(path, "path");
+        A.ensure(bufSize >= 0, "bufSize >= 0");
+        A.ensure(seqReadsBeforePrefetch >= 0, "seqReadsBeforePrefetch >= 0");
+
         return safeOp(new Callable<IgfsInputStreamAdapter>() {
             @Override public IgfsInputStreamAdapter call() throws Exception {
-                A.notNull(path, "path");
-                A.ensure(bufSize >= 0, "bufSize >= 0");
-                A.ensure(seqReadsBeforePrefetch >= 0, "seqReadsBeforePrefetch >= 0");
-
                 if (log.isDebugEnabled())
                     log.debug("Open file for reading [path=" + path + ", bufSize=" + bufSize
+ ']');
 
@@ -1070,11 +1070,11 @@ public final class IgfsImpl implements IgfsEx {
         @Nullable final Map<String, String> props,
         final boolean simpleCreate
     ) {
+        A.notNull(path, "path");
+        A.ensure(bufSize >= 0, "bufSize >= 0");
+
         return safeOp(new Callable<IgfsOutputStream>() {
             @Override public IgfsOutputStream call() throws Exception {
-                A.notNull(path, "path");
-                A.ensure(bufSize >= 0, "bufSize >= 0");
-
                 if (log.isDebugEnabled())
                     log.debug("Open file for writing [path=" + path + ", bufSize=" + bufSize
+ ", overwrite=" +
                         overwrite + ", props=" + props + ']');
@@ -1173,11 +1173,11 @@ public final class IgfsImpl implements IgfsEx {
     /** {@inheritDoc} */
     @Override public IgfsOutputStream append(final IgfsPath path, final int bufSize, final
boolean create,
         @Nullable final Map<String, String> props) {
+        A.notNull(path, "path");
+        A.ensure(bufSize >= 0, "bufSize >= 0");
+
         return safeOp(new Callable<IgfsOutputStream>() {
             @Override public IgfsOutputStream call() throws Exception {
-                A.notNull(path, "path");
-                A.ensure(bufSize >= 0, "bufSize >= 0");
-
                 if (log.isDebugEnabled())
                     log.debug("Open file for appending [path=" + path + ", bufSize=" + bufSize
+ ", create=" + create +
                         ", props=" + props + ']');
@@ -1245,10 +1245,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public void setTimes(final IgfsPath path, final long accessTime, final long
modificationTime) {
+        A.notNull(path, "path");
+
         safeOp(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                A.notNull(path, "path");
-
                 if (accessTime == -1 && modificationTime == -1)
                     return null;
 
@@ -1294,12 +1294,12 @@ public final class IgfsImpl implements IgfsEx {
     /** {@inheritDoc} */
     @Override public Collection<IgfsBlockLocation> affinity(final IgfsPath path, final
long start, final long len,
         final long maxLen) {
+        A.notNull(path, "path");
+        A.ensure(start >= 0, "start >= 0");
+        A.ensure(len >= 0, "len >= 0");
+
         return safeOp(new Callable<Collection<IgfsBlockLocation>>() {
             @Override public Collection<IgfsBlockLocation> call() throws Exception
{
-                A.notNull(path, "path");
-                A.ensure(start >= 0, "start >= 0");
-                A.ensure(len >= 0, "len >= 0");
-
                 if (log.isDebugEnabled())
                     log.debug("Get affinity for file block [path=" + path + ", start=" +
start + ", len=" + len + ']');
 
@@ -1377,10 +1377,10 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public long size(final IgfsPath path) {
+        A.notNull(path, "path");
+
         return safeOp(new Callable<Long>() {
             @Override public Long call() throws Exception {
-                A.notNull(path, "path");
-
                 IgniteUuid nextId = meta.fileId(path);
 
                 if (nextId == null)


Mime
View raw message