You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/08 09:47:53 UTC
[1/5] ignite git commit: IgniteHadoopIgfsSecondaryFileSystem.usrName
field is renamed to "userName" to preserve backward compatibility.
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5.3 090a5de6a -> fc48a8429
IgniteHadoopIgfsSecondaryFileSystem.usrName field is renamed to "userName" to preserve backward compatibility.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c786820d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c786820d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c786820d
Branch: refs/heads/ignite-1.5.3
Commit: c786820dda7f7cd1849c5593ac24ca9072945887
Parents: a12ec7d
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jan 7 17:48:14 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jan 7 17:48:14 2016 +0400
----------------------------------------------------------------------
.../ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c786820d/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 9f544c1..12cd2ac 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
@@ -114,14 +114,14 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys
*
* @param uri URI of file system.
* @param cfgPath Additional path to Hadoop configuration.
- * @param usrName User name.
+ * @param userName User name.
* @throws IgniteCheckedException In case of error.
* @deprecated Use {@link #getFileSystemFactory()} instead.
*/
@Deprecated
public IgniteHadoopIgfsSecondaryFileSystem(@Nullable String uri, @Nullable String cfgPath,
- @Nullable String usrName) throws IgniteCheckedException {
- setDefaultUserName(usrName);
+ @Nullable String userName) throws IgniteCheckedException {
+ setDefaultUserName(userName);
CachingHadoopFileSystemFactory fac = new CachingHadoopFileSystemFactory();
[2/5] ignite git commit: IGNITE-2342: Set correct classlader before
calling FileSystem.get().
Posted by vo...@apache.org.
IGNITE-2342: Set correct classlader before calling FileSystem.get().
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6ab4ce24
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6ab4ce24
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6ab4ce24
Branch: refs/heads/ignite-1.5.3
Commit: 6ab4ce246316442fa4295f9941c372fea70c24ef
Parents: c786820
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 8 10:23:55 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 8 10:23:55 2016 +0400
----------------------------------------------------------------------
.../hadoop/fs/BasicHadoopFileSystemFactory.java | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6ab4ce24/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
index 1e2bbf2..c791e9a 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
@@ -80,7 +80,24 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory, Ex
assert cfg != null;
try {
- return FileSystem.get(fullUri, cfg, usrName);
+ // FileSystem.get() might delegate to ServiceLoader to get the list of file system implementation.
+ // And ServiceLoader is known to be sensitive to context classloader. Therefore, we change context
+ // classloader to classloader of current class to avoid strange class-cast-exceptions.
+ ClassLoader ctxClsLdr = Thread.currentThread().getContextClassLoader();
+ ClassLoader clsLdr = getClass().getClassLoader();
+
+ if (ctxClsLdr == clsLdr)
+ return FileSystem.get(fullUri, cfg, usrName);
+ else {
+ Thread.currentThread().setContextClassLoader(clsLdr);
+
+ try {
+ return FileSystem.get(fullUri, cfg, usrName);
+ }
+ finally {
+ Thread.currentThread().setContextClassLoader(ctxClsLdr);
+ }
+ }
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
[3/5] ignite git commit: IGNITE-2341: Improved warning message when
BinaryMarshaller cannot be used. Also it is not shown when
"org.apache.ignite" classes is in described situation.
Posted by vo...@apache.org.
IGNITE-2341: Improved warning message when BinaryMarshaller cannot be used. Also it is not shown when "org.apache.ignite" classes is in described situation.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/077ab1b3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/077ab1b3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/077ab1b3
Branch: refs/heads/ignite-1.5.3
Commit: 077ab1b3a77fdb1c2c2fd6360fc5b60fda6c50c3
Parents: 6ab4ce2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 8 11:17:45 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 8 11:17:45 2016 +0400
----------------------------------------------------------------------
.../internal/binary/BinaryClassDescriptor.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/077ab1b3/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
index 1105809..1ffa9e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
@@ -55,6 +55,9 @@ public class BinaryClassDescriptor {
/** */
public static final Unsafe UNSAFE = GridUnsafe.unsafe();
+ /** Apache Ignite base package name. */
+ private static final String OAI_PKG = "org.apache.ignite";
+
/** */
private final BinaryContext ctx;
@@ -173,11 +176,13 @@ public class BinaryClassDescriptor {
mode = serializer != null ? BinaryWriteMode.BINARY : BinaryUtils.mode(cls);
}
- if (useOptMarshaller && userType) {
- U.quietAndWarn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be written in binary format because " +
- "it either implements Externalizable interface or have writeObject/readObject methods. Please " +
- "ensure that all nodes have this class in classpath. To enable binary serialization either " +
- "implement " + Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
+ if (useOptMarshaller && userType && !cls.getName().startsWith(OAI_PKG)) {
+ U.quietAndWarn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be serialized using " +
+ BinaryMarshaller.class.getSimpleName() + " because it either implements Externalizable interface " +
+ "or have writeObject/readObject methods. " + OptimizedMarshaller.class.getSimpleName() + " will be " +
+ "used instead and class instances will be deserialized on the server. Please ensure that all nodes " +
+ "have this class in classpath. To enable binary serialization either implement " +
+ Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
"BinaryTypeConfiguration.setSerializer() method.");
}
[5/5] ignite git commit: Merge branch 'ignite-1.5.2' into ignite-1.5.3
Posted by vo...@apache.org.
Merge branch 'ignite-1.5.2' into ignite-1.5.3
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fc48a842
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fc48a842
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fc48a842
Branch: refs/heads/ignite-1.5.3
Commit: fc48a8429a84ef6c87ed3225a218d7d3ae617e14
Parents: 090a5de 86c4816
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 8 11:48:42 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 8 11:48:42 2016 +0400
----------------------------------------------------------------------
.../internal/binary/BinaryClassDescriptor.java | 15 ++++++++++-----
.../hadoop/fs/BasicHadoopFileSystemFactory.java | 19 ++++++++++++++++++-
.../fs/IgniteHadoopIgfsSecondaryFileSystem.java | 6 +++---
.../hadoop/fs/v1/IgniteHadoopFileSystem.java | 7 ++++++-
.../hadoop/fs/v2/IgniteHadoopFileSystem.java | 7 +++++++
5 files changed, 44 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[4/5] ignite git commit: IGNITE-2340: Improved error thrown when
PROXY mode exists,
but secondary file system is not IgniteHadoopIgfsSecondaryFileSystem.
Posted by vo...@apache.org.
IGNITE-2340: Improved error thrown when PROXY mode exists, but secondary file system is not IgniteHadoopIgfsSecondaryFileSystem.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/86c4816e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/86c4816e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/86c4816e
Branch: refs/heads/ignite-1.5.3
Commit: 86c4816edfd0e983014f136ffc92cde28ec56cca
Parents: 077ab1b
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jan 8 11:26:03 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jan 8 11:26:03 2016 +0400
----------------------------------------------------------------------
.../apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java | 7 ++++++-
.../apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java | 7 +++++++
2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/86c4816e/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 71f6435..45b968c 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
@@ -32,7 +32,9 @@ import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.util.Progressable;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.FileSystemConfiguration;
import org.apache.ignite.hadoop.fs.HadoopFileSystemFactory;
+import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
import org.apache.ignite.igfs.IgfsBlockLocation;
import org.apache.ignite.igfs.IgfsException;
import org.apache.ignite.igfs.IgfsFile;
@@ -335,7 +337,10 @@ public class IgniteHadoopFileSystem extends FileSystem {
throw new IOException("Failed to get secondary file system factory.", e);
}
- assert factory != null;
+ if (factory == null)
+ throw new IOException("Failed to get secondary file system factory (did you set " +
+ IgniteHadoopIgfsSecondaryFileSystem.class.getName() + " as \"secondaryFIleSystem\" in " +
+ FileSystemConfiguration.class.getName() + "?)");
if (factory instanceof LifecycleAware)
((LifecycleAware) factory).start();
http://git-wip-us.apache.org/repos/asf/ignite/blob/86c4816e/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 0d7de86..ac457a4 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
@@ -38,7 +38,9 @@ import org.apache.hadoop.util.DataChecksum;
import org.apache.hadoop.util.Progressable;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.FileSystemConfiguration;
import org.apache.ignite.hadoop.fs.HadoopFileSystemFactory;
+import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
import org.apache.ignite.igfs.IgfsBlockLocation;
import org.apache.ignite.igfs.IgfsFile;
import org.apache.ignite.igfs.IgfsMode;
@@ -344,6 +346,11 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements Closea
throw new IOException("Failed to get secondary file system factory.", e);
}
+ if (factory == null)
+ throw new IOException("Failed to get secondary file system factory (did you set " +
+ IgniteHadoopIgfsSecondaryFileSystem.class.getName() + " as \"secondaryFIleSystem\" in " +
+ FileSystemConfiguration.class.getName() + "?)");
+
assert factory != null;
if (factory instanceof LifecycleAware)