ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [65/75] [abbrv] incubator-ignite git commit: [IGNITE-349]: bugfix by integration testing results: (1) NPE in properties serialization; (2) small usability improvement.
Date Fri, 06 Mar 2015 06:50:08 GMT
[IGNITE-349]: bugfix by integration testing results: (1) NPE in properties serialization; (2)
small usability improvement.


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

Branch: refs/heads/ignite-51
Commit: d1ebb02bb58b0c2e2e76bccafe832a900b91e729
Parents: d3a3a3e
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Thu Mar 5 21:33:22 2015 +0300
Committer: iveselovskiy <iveselovskiy@gridgain.com>
Committed: Thu Mar 5 21:33:22 2015 +0300

----------------------------------------------------------------------
 .../hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d1ebb02b/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 f5d7055..3320a96 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
@@ -64,7 +64,12 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys
      * @param cfgPath Additional path to Hadoop configuration.
      * @throws IgniteCheckedException In case of error.
      */
-    public IgniteHadoopIgfsSecondaryFileSystem(@Nullable String uri, @Nullable String cfgPath)
throws IgniteCheckedException {
+    public IgniteHadoopIgfsSecondaryFileSystem(@Nullable String uri, @Nullable String cfgPath)
+            throws IgniteCheckedException {
+        // Treat empty uri argument as null to improve configuration usability:
+        if (F.isEmpty(uri))
+            uri = null;
+
         try {
             SecondaryFileSystemProvider secProvider = new SecondaryFileSystemProvider(uri,
cfgPath);
 
@@ -75,7 +80,9 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys
             if (!uri.endsWith("/"))
                 uri += "/";
 
-            props.put(SECONDARY_FS_CONFIG_PATH, cfgPath);
+            if (cfgPath != null)
+                props.put(SECONDARY_FS_CONFIG_PATH, cfgPath);
+
             props.put(SECONDARY_FS_URI, uri);
         }
         catch (IOException e) {


Mime
View raw message