public class InfrastructureAnalyzer extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_JVM_SIZE |
static String |
MR_FRAMEWORK_NAME |
static String |
MR_JOBTRACKER_ADDRESS |
Constructor and Description |
---|
InfrastructureAnalyzer() |
Modifier and Type | Method and Description |
---|---|
static long |
extractMaxMemoryOpt(String javaOpts) |
static int |
getCkMaxCP()
Gets the maximum local parallelism constraint.
|
static int |
getCkMaxMR()
Gets the maximum remote parallelism constraint
|
static double |
getClusterUtilization(boolean mapOnly)
Gets the fraction of running map/reduce tasks to existing
map/reduce task slots.
|
static long |
getCmMax()
Gets the maximum memory constraint [in bytes].
|
static long |
getHDFSBlockSize()
Gets the HDFS blocksize of the used cluster in bytes.
|
static long |
getLocalMaxMemory()
Gets the maximum memory [in bytes] of the current JVM.
|
static double |
getLocalMaxMemoryFraction() |
static int |
getLocalParallelism()
Gets the number of logical processors of the current node,
including hyper-threading if enabled.
|
static int |
getRemoteParallelMapTasks()
Gets the number of remote parallel map slots.
|
static int |
getRemoteParallelNodes()
Gets the number of cluster nodes (number of tasktrackers).
|
static int |
getRemoteParallelReduceTasks()
Gets the total number of remote parallel reduce slots.
|
static boolean |
isLocalMode() |
static boolean |
isLocalMode(org.apache.hadoop.mapred.JobConf job) |
static void |
setLocalMaxMemory(long localMem) |
static void |
setMaxMemoryOpt(org.apache.hadoop.mapred.JobConf job,
String key,
long bytes) |
static void |
setRemoteParallelMapTasks(int pmap) |
static void |
setRemoteParallelReduceTasks(int preduce) |
public static final long DEFAULT_JVM_SIZE
public static final String MR_FRAMEWORK_NAME
public static final String MR_JOBTRACKER_ADDRESS
public static int getLocalParallelism()
public static int getRemoteParallelNodes()
public static int getRemoteParallelMapTasks()
public static void setRemoteParallelMapTasks(int pmap)
public static int getRemoteParallelReduceTasks()
public static void setRemoteParallelReduceTasks(int preduce)
public static long getLocalMaxMemory()
public static void setLocalMaxMemory(long localMem)
public static double getLocalMaxMemoryFraction()
public static boolean isLocalMode()
public static boolean isLocalMode(org.apache.hadoop.mapred.JobConf job)
public static int getCkMaxCP()
public static int getCkMaxMR()
public static long getCmMax()
public static long getHDFSBlockSize()
public static long extractMaxMemoryOpt(String javaOpts)
public static void setMaxMemoryOpt(org.apache.hadoop.mapred.JobConf job, String key, long bytes)
public static double getClusterUtilization(boolean mapOnly) throws IOException
mapOnly
- if true, only look at map tasksIOException
- if IOException occursCopyright © 2020 The Apache Software Foundation. All rights reserved.