|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.test.support.compat.MiniMRClusterCompat
public abstract class MiniMRClusterCompat
Compatibility class accessing minimr classes at runtime without knowing implementations during the compile time.
Usually minimr clusters are constructed via MiniMRClientClusterFactory which have same methods for hadoop 1.x and 2.x. Hadoop have this to easy testing for both versions. However at least hadoop 1.x distribution from a Cloudera(chd3, chd4) don't have this factory method for we need to resolve underlying cluster classes at runtime. Effectively these legacy classes cannot be resolved at compile time because Hadoop 2.x is based on Yarn and thus have different minimr cluster implementations.
Constructor Summary | |
---|---|
MiniMRClusterCompat()
|
Method Summary | |
---|---|
static org.apache.hadoop.conf.Configuration |
getConfiguration(java.lang.Object mrClusterObject)
Gets the Configuration from a cluster. |
static java.lang.Object |
instantiateCluster(java.lang.Class<?> caller,
int nodes,
org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.FileSystem fileSystem,
java.lang.ClassLoader classLoader)
Instantiates a minimrcluster. |
static void |
stopCluster(java.lang.Object mrClusterObject)
Finds and calls lifecycle stop method for given cluster via reflection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MiniMRClusterCompat()
Method Detail |
---|
public static java.lang.Object instantiateCluster(java.lang.Class<?> caller, int nodes, org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.FileSystem fileSystem, java.lang.ClassLoader classLoader)
caller
- the one who called this methodnodes
- number of nodesconfiguration
- passed configurationfileSystem
- hdfs filesystemclassLoader
- the class loader
public static void stopCluster(java.lang.Object mrClusterObject)
mrClusterObject
- the Cluster Objectpublic static org.apache.hadoop.conf.Configuration getConfiguration(java.lang.Object mrClusterObject)
Configuration
from a cluster.
mrClusterObject
- the Cluster Object
Configuration
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |