IGNITE-2308: Cleanup.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/db69ec77 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/db69ec77 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/db69ec77 Branch: refs/heads/ignite-2308 Commit: db69ec7776c33d74c796837a1b694b28ac9efe9b Parents: 0de6ed9 Author: vozerov-gridgain <[email protected]> Authored: Mon Jan 4 10:06:15 2016 +0400 Committer: vozerov-gridgain <[email protected]> Committed: Mon Jan 4 10:06:15 2016 +0400 ---------------------------------------------------------------------- .../hadoop/HadoopClassLoaderTest.java | 48 ++++++++++---------- .../hadoop/cls/CircularDependencyHadoop.java | 14 ------ .../hadoop/cls/CircularDependencyNoHadoop.java | 9 ---- .../hadoop/cls/DependencyNoHadoop.java | 9 ---- .../processors/hadoop/cls/HadoopCasting.java | 23 ---------- .../hadoop/cls/HadoopClassAnnotation.java | 10 ---- .../hadoop/cls/HadoopConstructorInvocation.java | 13 ------ .../HadoopDeclaredCheckedExceptionInMethod.java | 13 ------ .../HadoopDeclaredRuntimeExceptionInMethod.java | 13 ------ .../processors/hadoop/cls/HadoopExtends.java | 10 ---- .../processors/hadoop/cls/HadoopField.java | 13 ------ .../processors/hadoop/cls/HadoopImplements.java | 19 -------- .../hadoop/cls/HadoopInitializer.java | 14 ------ .../processors/hadoop/cls/HadoopInnerClass.java | 15 ------ .../hadoop/cls/HadoopLocalVariableType.java | 20 -------- .../hadoop/cls/HadoopMethodAnnotation.java | 12 ----- .../hadoop/cls/HadoopMethodInvocation.java | 13 ------ .../hadoop/cls/HadoopMethodParameter.java | 13 ------ .../hadoop/cls/HadoopMethodReturnType.java | 13 ------ .../processors/hadoop/cls/HadoopOuterClass.java | 20 -------- .../hadoop/cls/HadoopParameterAnnotation.java | 11 ----- .../hadoop/cls/HadoopStaticField.java | 11 ----- .../hadoop/cls/HadoopStaticInitializer.java | 16 ------- .../processors/hadoop/cls/NoHadoop.java | 7 --- .../hadoop/deps/CircularDependencyHadoop.java | 31 +++++++++++++ .../hadoop/deps/CircularDependencyNoHadoop.java | 26 +++++++++++ .../hadoop/deps/DependencyNoHadoop.java | 26 +++++++++++ .../processors/hadoop/deps/HadoopCasting.java | 40 ++++++++++++++++ .../hadoop/deps/HadoopClassAnnotation.java | 27 +++++++++++ .../deps/HadoopConstructorInvocation.java | 30 ++++++++++++ .../HadoopDeclaredCheckedExceptionInMethod.java | 30 ++++++++++++ .../HadoopDeclaredRuntimeExceptionInMethod.java | 30 ++++++++++++ .../processors/hadoop/deps/HadoopExtends.java | 27 +++++++++++ .../processors/hadoop/deps/HadoopField.java | 30 ++++++++++++ .../hadoop/deps/HadoopImplements.java | 36 +++++++++++++++ .../hadoop/deps/HadoopInitializer.java | 31 +++++++++++++ .../hadoop/deps/HadoopInnerClass.java | 30 ++++++++++++ .../hadoop/deps/HadoopLocalVariableType.java | 37 +++++++++++++++ .../hadoop/deps/HadoopMethodAnnotation.java | 29 ++++++++++++ .../hadoop/deps/HadoopMethodInvocation.java | 30 ++++++++++++ .../hadoop/deps/HadoopMethodParameter.java | 30 ++++++++++++ .../hadoop/deps/HadoopMethodReturnType.java | 30 ++++++++++++ .../hadoop/deps/HadoopOuterClass.java | 37 +++++++++++++++ .../hadoop/deps/HadoopParameterAnnotation.java | 28 ++++++++++++ .../hadoop/deps/HadoopStaticField.java | 28 ++++++++++++ .../hadoop/deps/HadoopStaticInitializer.java | 33 ++++++++++++++ .../processors/hadoop/deps/NoHadoop.java | 24 ++++++++++ 47 files changed, 723 insertions(+), 336 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoaderTest.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoaderTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoaderTest.java index 88f43b8..d0964e8 100644 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoaderTest.java +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoaderTest.java @@ -17,34 +17,32 @@ package org.apache.ignite.internal.processors.hadoop; -import java.util.HashSet; import javax.security.auth.AuthPermission; import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.mapreduce.Job; -import org.apache.ignite.internal.processors.hadoop.cls.CircularDependencyHadoop; -import org.apache.ignite.internal.processors.hadoop.cls.CircularDependencyNoHadoop; -import org.apache.ignite.internal.processors.hadoop.cls.DependencyNoHadoop; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopCasting; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopClassAnnotation; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopConstructorInvocation; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopDeclaredCheckedExceptionInMethod; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopDeclaredRuntimeExceptionInMethod; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopExtends; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopField; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopImplements; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopInitializer; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopInnerClass; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopLocalVariableType; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopMethodAnnotation; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopMethodInvocation; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopMethodParameter; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopMethodReturnType; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopOuterClass; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopParameterAnnotation; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopStaticField; -import org.apache.ignite.internal.processors.hadoop.cls.HadoopStaticInitializer; -import org.apache.ignite.internal.processors.hadoop.cls.NoHadoop; +import org.apache.ignite.internal.processors.hadoop.deps.CircularDependencyHadoop; +import org.apache.ignite.internal.processors.hadoop.deps.CircularDependencyNoHadoop; +import org.apache.ignite.internal.processors.hadoop.deps.DependencyNoHadoop; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopCasting; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopClassAnnotation; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopConstructorInvocation; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopDeclaredCheckedExceptionInMethod; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopDeclaredRuntimeExceptionInMethod; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopExtends; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopField; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopImplements; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopInitializer; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopInnerClass; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopLocalVariableType; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopMethodAnnotation; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopMethodInvocation; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopMethodParameter; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopMethodReturnType; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopOuterClass; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopParameterAnnotation; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopStaticField; +import org.apache.ignite.internal.processors.hadoop.deps.HadoopStaticInitializer; +import org.apache.ignite.internal.processors.hadoop.deps.NoHadoop; /** * http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyHadoop.java deleted file mode 100644 index 02df9be..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyHadoop.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.mapreduce.Job; - -/** - * Class has a direct Hadoop dependency and a circular dependency on another class. - */ -public class CircularDependencyHadoop { - /** */ - Job[][] jobs = new Job[4][4]; - - /** */ - private CircularDependencyNoHadoop y; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyNoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyNoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyNoHadoop.java deleted file mode 100644 index 0f9b543..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/CircularDependencyNoHadoop.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Does not have direct Hadoop dependency, but has a circular - */ -public class CircularDependencyNoHadoop { - /** */ - private CircularDependencyHadoop x; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/DependencyNoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/DependencyNoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/DependencyNoHadoop.java deleted file mode 100644 index f13f1ce..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/DependencyNoHadoop.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Has a unidirected dependency on Hadoop-dependent class. - */ -public class DependencyNoHadoop { - /** */ - HadoopField x; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopCasting.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopCasting.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopCasting.java deleted file mode 100644 index 39a58f6..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopCasting.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.FileSystem; - -/** - * Class contains casting to a Hadoop type. - */ -public abstract class HadoopCasting <T> { - /** */ - public abstract T create(); - - /** */ - public void consume(T t) { - // noop - } - - /** */ - void test(HadoopCasting<FileSystem> c) { - FileSystem fs = c.create(); - - c.consume(fs); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopClassAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopClassAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopClassAnnotation.java deleted file mode 100644 index ff18f82..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopClassAnnotation.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * Class has Hadoop annotation. - */ [email protected] -public class HadoopClassAnnotation { -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopConstructorInvocation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopConstructorInvocation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopConstructorInvocation.java deleted file mode 100644 index c7ac886..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopConstructorInvocation.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configuration; - -/** - * Invokes a Hadoop type constructor. - */ -public class HadoopConstructorInvocation { - /** */ - private void foo() { - Object x = new Configuration(); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredCheckedExceptionInMethod.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredCheckedExceptionInMethod.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredCheckedExceptionInMethod.java deleted file mode 100644 index b9890f1..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredCheckedExceptionInMethod.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.ChecksumException; - -/** - * Method declares a checked Hadoop Exception. - */ -public class HadoopDeclaredCheckedExceptionInMethod { - /** */ - void foo() throws ChecksumException { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredRuntimeExceptionInMethod.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredRuntimeExceptionInMethod.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredRuntimeExceptionInMethod.java deleted file mode 100644 index 9c8c000..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopDeclaredRuntimeExceptionInMethod.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.HadoopIllegalArgumentException; - -/** - * Method declares a runtime Hadoop Exception. - */ -public class HadoopDeclaredRuntimeExceptionInMethod { - /** */ - void foo() throws HadoopIllegalArgumentException { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopExtends.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopExtends.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopExtends.java deleted file mode 100644 index f0a082e..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopExtends.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.LocalFileSystem; - -/** - * Class extends a Hadoop class. - */ -public class HadoopExtends extends LocalFileSystem { - // noop -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopField.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopField.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopField.java deleted file mode 100644 index ccdeb0e..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopField.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configuration; - -/** - * Has a Hadoop field. - */ -public class HadoopField { - /** - * - */ - private Configuration conf; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopImplements.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopImplements.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopImplements.java deleted file mode 100644 index a143e85..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopImplements.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configurable; -import org.apache.hadoop.conf.Configuration; - -/** - * Implements a Hadoop interface. - */ -public class HadoopImplements implements Configurable { - /** {@inheritDoc} */ - @Override public void setConf(Configuration conf) { - // noop - } - - /** {@inheritDoc} */ - @Override public Configuration getConf() { - return null; - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInitializer.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInitializer.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInitializer.java deleted file mode 100644 index f153e57..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInitializer.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Has a field initialized with an expression invoking Hadoop method. - */ -public class HadoopInitializer { - /** */ - private final Object x = org.apache.hadoop.fs.FileSystem.getDefaultUri(null); - - /** */ - HadoopInitializer() throws Exception { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInnerClass.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInnerClass.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInnerClass.java deleted file mode 100644 index 15d0a4a..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopInnerClass.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configurable; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.AbstractFileSystem; - -/** - * Has a *static* inner class depending on Hadoop. - */ -public class HadoopInnerClass { - /** */ - private static abstract class Foo implements Configurable { - // nothing - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopLocalVariableType.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopLocalVariableType.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopLocalVariableType.java deleted file mode 100644 index a82909c..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopLocalVariableType.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configuration; - -/** - * Has a local variable of Hadoop type. - */ -public class HadoopLocalVariableType { - /** */ - void foo() { - Configuration c = null; - - moo(c); - } - - /** */ - void moo(Object x) { - - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodAnnotation.java deleted file mode 100644 index b62677b..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodAnnotation.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Method has a Hadoop annotation. - */ -public class HadoopMethodAnnotation { - /** */ - @org.apache.hadoop.classification.InterfaceStability.Unstable - void foo() { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodInvocation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodInvocation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodInvocation.java deleted file mode 100644 index 85a1e49..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodInvocation.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.FileSystem; - -/** - * Method contains a Hadoop type method invocation. - */ -public class HadoopMethodInvocation { - /** */ - void foo(FileSystem fs) { - fs.getChildFileSystems(); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodParameter.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodParameter.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodParameter.java deleted file mode 100644 index 427b771..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodParameter.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configuration; - -/** - * Contains a formal parameter of Hadoop type. - */ -public class HadoopMethodParameter { - /** */ - protected void paramaterMethod(Configuration c) { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodReturnType.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodReturnType.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodReturnType.java deleted file mode 100644 index afb883d..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopMethodReturnType.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.FileSystem; - -/** - * Contains a method return value of Hadoop type. - */ -public class HadoopMethodReturnType { - /** */ - FileSystem fsMethod() { - return null; - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopOuterClass.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopOuterClass.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopOuterClass.java deleted file mode 100644 index 8a453d7..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopOuterClass.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.conf.Configuration; - -/** - * Outer class depends on Hadoop, but Inner *static* one does not. - */ -public class HadoopOuterClass { - /** */ - Configuration c; - - /** */ - public static class InnerNoHadoop { - /** */ - int x; - - /** */ - void foo() {} - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopParameterAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopParameterAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopParameterAnnotation.java deleted file mode 100644 index 03da8e2..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopParameterAnnotation.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Has a paramater annotated with a Hadoop annotation. - */ -public class HadoopParameterAnnotation { - /** */ - void foo(@org.apache.hadoop.classification.InterfaceStability.Stable Object annotatedParam) { - // noop - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticField.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticField.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticField.java deleted file mode 100644 index fd11093..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticField.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import org.apache.hadoop.fs.FileSystem; - -/** - * Has a static field of Hadoop type. - */ -public class HadoopStaticField { - /** */ - static FileSystem fs; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticInitializer.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticInitializer.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticInitializer.java deleted file mode 100644 index 022493b..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/HadoopStaticInitializer.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -import java.util.List; -import org.apache.hadoop.fs.FileSystem; - -/** - * Uses Hadoop type in a static initializer. - */ -public class HadoopStaticInitializer { - /** */ - static final List x; - - static { - x = FileSystem.getAllStatistics(); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/NoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/NoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/NoHadoop.java deleted file mode 100644 index 8bd13f9..0000000 --- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/cls/NoHadoop.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.apache.ignite.internal.processors.hadoop.cls; - -/** - * Class that does not anyhow depend on Hadoop. - */ -public class NoHadoop { -} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyHadoop.java new file mode 100644 index 0000000..24db626 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyHadoop.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.mapreduce.Job; + +/** + * Class has a direct Hadoop dependency and a circular dependency on another class. + */ +public class CircularDependencyHadoop { + /** */ + Job[][] jobs = new Job[4][4]; + + /** */ + private CircularDependencyNoHadoop y; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyNoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyNoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyNoHadoop.java new file mode 100644 index 0000000..4b019e4 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/CircularDependencyNoHadoop.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Does not have direct Hadoop dependency, but has a circular + */ +public class CircularDependencyNoHadoop { + /** */ + private CircularDependencyHadoop x; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/DependencyNoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/DependencyNoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/DependencyNoHadoop.java new file mode 100644 index 0000000..25a29a1 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/DependencyNoHadoop.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Has a unidirected dependency on Hadoop-dependent class. + */ +public class DependencyNoHadoop { + /** */ + HadoopField x; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopCasting.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopCasting.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopCasting.java new file mode 100644 index 0000000..3a5de89 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopCasting.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.FileSystem; + +/** + * Class contains casting to a Hadoop type. + */ +public abstract class HadoopCasting <T> { + /** */ + public abstract T create(); + + /** */ + public void consume(T t) { + // noop + } + + /** */ + void test(HadoopCasting<FileSystem> c) { + FileSystem fs = c.create(); + + c.consume(fs); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopClassAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopClassAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopClassAnnotation.java new file mode 100644 index 0000000..cb934d2 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopClassAnnotation.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.classification.InterfaceAudience; + +/** + * Class has Hadoop annotation. + */ [email protected] +public class HadoopClassAnnotation { +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopConstructorInvocation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopConstructorInvocation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopConstructorInvocation.java new file mode 100644 index 0000000..5d641b1 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopConstructorInvocation.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configuration; + +/** + * Invokes a Hadoop type constructor. + */ +public class HadoopConstructorInvocation { + /** */ + private void foo() { + Object x = new Configuration(); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredCheckedExceptionInMethod.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredCheckedExceptionInMethod.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredCheckedExceptionInMethod.java new file mode 100644 index 0000000..91e6410 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredCheckedExceptionInMethod.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.ChecksumException; + +/** + * Method declares a checked Hadoop Exception. + */ +public class HadoopDeclaredCheckedExceptionInMethod { + /** */ + void foo() throws ChecksumException { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredRuntimeExceptionInMethod.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredRuntimeExceptionInMethod.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredRuntimeExceptionInMethod.java new file mode 100644 index 0000000..bef47d3 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopDeclaredRuntimeExceptionInMethod.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.HadoopIllegalArgumentException; + +/** + * Method declares a runtime Hadoop Exception. + */ +public class HadoopDeclaredRuntimeExceptionInMethod { + /** */ + void foo() throws HadoopIllegalArgumentException { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopExtends.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopExtends.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopExtends.java new file mode 100644 index 0000000..e7324f8 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopExtends.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.LocalFileSystem; + +/** + * Class extends a Hadoop class. + */ +public class HadoopExtends extends LocalFileSystem { + // noop +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopField.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopField.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopField.java new file mode 100644 index 0000000..21e3f38 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopField.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configuration; + +/** + * Has a Hadoop field. + */ +public class HadoopField { + /** + * + */ + private Configuration conf; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopImplements.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopImplements.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopImplements.java new file mode 100644 index 0000000..d6f3c1b --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopImplements.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configurable; +import org.apache.hadoop.conf.Configuration; + +/** + * Implements a Hadoop interface. + */ +public class HadoopImplements implements Configurable { + /** {@inheritDoc} */ + @Override public void setConf(Configuration conf) { + // noop + } + + /** {@inheritDoc} */ + @Override public Configuration getConf() { + return null; + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInitializer.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInitializer.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInitializer.java new file mode 100644 index 0000000..7a7f809 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInitializer.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Has a field initialized with an expression invoking Hadoop method. + */ +public class HadoopInitializer { + /** */ + private final Object x = org.apache.hadoop.fs.FileSystem.getDefaultUri(null); + + /** */ + HadoopInitializer() throws Exception { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInnerClass.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInnerClass.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInnerClass.java new file mode 100644 index 0000000..3fa3e41 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopInnerClass.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configurable; + +/** + * Has a *static* inner class depending on Hadoop. + */ +public class HadoopInnerClass { + /** */ + private static abstract class Foo implements Configurable { + // nothing + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopLocalVariableType.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopLocalVariableType.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopLocalVariableType.java new file mode 100644 index 0000000..de2354e --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopLocalVariableType.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configuration; + +/** + * Has a local variable of Hadoop type. + */ +public class HadoopLocalVariableType { + /** */ + void foo() { + Configuration c = null; + + moo(c); + } + + /** */ + void moo(Object x) { + + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodAnnotation.java new file mode 100644 index 0000000..a013021 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodAnnotation.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Method has a Hadoop annotation. + */ +public class HadoopMethodAnnotation { + /** */ + @org.apache.hadoop.classification.InterfaceStability.Unstable + void foo() { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodInvocation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodInvocation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodInvocation.java new file mode 100644 index 0000000..b4d52b6 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodInvocation.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.FileSystem; + +/** + * Method contains a Hadoop type method invocation. + */ +public class HadoopMethodInvocation { + /** */ + void foo(FileSystem fs) { + fs.getChildFileSystems(); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodParameter.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodParameter.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodParameter.java new file mode 100644 index 0000000..c9621aa --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodParameter.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configuration; + +/** + * Contains a formal parameter of Hadoop type. + */ +public class HadoopMethodParameter { + /** */ + protected void paramaterMethod(Configuration c) { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodReturnType.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodReturnType.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodReturnType.java new file mode 100644 index 0000000..b2a1a3f --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopMethodReturnType.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.FileSystem; + +/** + * Contains a method return value of Hadoop type. + */ +public class HadoopMethodReturnType { + /** */ + FileSystem fsMethod() { + return null; + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopOuterClass.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopOuterClass.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopOuterClass.java new file mode 100644 index 0000000..142198c --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopOuterClass.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.conf.Configuration; + +/** + * Outer class depends on Hadoop, but Inner *static* one does not. + */ +public class HadoopOuterClass { + /** */ + Configuration c; + + /** */ + public static class InnerNoHadoop { + /** */ + int x; + + /** */ + void foo() {} + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopParameterAnnotation.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopParameterAnnotation.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopParameterAnnotation.java new file mode 100644 index 0000000..02bb099 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopParameterAnnotation.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Has a paramater annotated with a Hadoop annotation. + */ +public class HadoopParameterAnnotation { + /** */ + void foo(@org.apache.hadoop.classification.InterfaceStability.Stable Object annotatedParam) { + // noop + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticField.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticField.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticField.java new file mode 100644 index 0000000..eff1c4e --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticField.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import org.apache.hadoop.fs.FileSystem; + +/** + * Has a static field of Hadoop type. + */ +public class HadoopStaticField { + /** */ + static FileSystem fs; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticInitializer.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticInitializer.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticInitializer.java new file mode 100644 index 0000000..109b971 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/HadoopStaticInitializer.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +import java.util.List; +import org.apache.hadoop.fs.FileSystem; + +/** + * Uses Hadoop type in a static initializer. + */ +public class HadoopStaticInitializer { + /** */ + static final List x; + + static { + x = FileSystem.getAllStatistics(); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/db69ec77/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/NoHadoop.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/NoHadoop.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/NoHadoop.java new file mode 100644 index 0000000..aff3981 --- /dev/null +++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/deps/NoHadoop.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.hadoop.deps; + +/** + * Class that does not anyhow depend on Hadoop. + */ +public class NoHadoop { +}
