@Override
        public String getContainerStdErr(HboxContainerId cid) {
            if (cid.toString().equals(amContainerId)) {
                if (amContainerStdErr.length() > 0) {
                    String stdErr = amContainerStdErr.toString();
                    amContainerStdErr.setLength(0);
                    return stdErr;
                } else {
                    return "";
                }
            }
            return containerListener.getContainerStdErr(cid);
        }
Internal class for running application class
core/src/main/java/net/qihoo/hbox/AM/ApplicationMaster.java