Example usage for org.apache.hadoop.util Shell LINUX

List of usage examples for org.apache.hadoop.util Shell LINUX

Introduction

In this page you can find the example usage for org.apache.hadoop.util Shell LINUX.

Prototype

boolean LINUX

To view the source code for org.apache.hadoop.util Shell LINUX.

Click Source Link

Usage

From source file:com.lenovo.tensorhusky.common.utils.ProcfsBasedProcessTree.java

License:Apache License

/**
 * Checks if the ProcfsBasedProcessTree is available on this system.
 *
 * @return true if ProcfsBasedProcessTree is available. False otherwise.
 *///from  ww w .j a va  2s.  co  m
public static boolean isAvailable() {
    try {
        if (!Shell.LINUX) {
            LOG.info("ProcfsBasedProcessTree currently is supported only on " + "Linux.");
            return false;
        }
    } catch (SecurityException se) {
        LOG.warn("Failed to get Operating System name. " + se);
        return false;
    }
    return true;
}