Package jp.co.acroquest.endosnipe.common.config

Examples of jp.co.acroquest.endosnipe.common.config.JavelinConfig


        // HadoopRecorder������������
        synchronized (HadoopRecorder.class)
        {
            if (HadoopRecorder.isInitialized() == false)
            {
                HadoopRecorder.javelinInit(new JavelinConfig());
            }
        ResourceCollector.getInstance().addMultiResource(
            TelegramConstants.ITEMNAME_HADOOP_JOBTRACKER,
            new HadoopJobTrackerGetter());
           
View Full Code Here


            return null;
        }

        if (config == null)
        {
            config = new JavelinConfig();
        }

        // �C�x���g�̏o�͐ݒ背�x�����A�����Ŏw�肵���C�x���g�̃��x�������傫���ꍇ�́A
        // �C�x���g���o�͂��Ȃ��B
        int outputEventLevel = convertEventLevel(config.getEventLevel());
View Full Code Here

                                        jvnFileFullPath,
                                        telegramId);
            }
        }

        JavelinConfig config = new JavelinConfig();
        if (jvnLogBuilder.length() > config.getJvnDownloadMax())
        {
            flushBuffer(jvnLogBuilder, jvnFileName, jvnFileFullPath, callback,
                    config, telegramId);
        }
View Full Code Here

        {
            return createHadoopLog(messageType, time, tree, node);
        }

        HadoopCallTreeNode parent = node.getParent();
        JavelinConfig config = new JavelinConfig();
        boolean isReturnDetail = config.isReturnDetail();

        StringBuffer jvnBuffer = new StringBuffer();

        Invocation callee = node.getInvocation();
        Invocation caller;
        if (parent == null)
        {
            String processName = VMStatusHelper.getProcessName();
            caller =
                    new Invocation(processName, tree.getRootCallerName(),
                                   JavelinLogConstants.DEFAULT_LOGMETHOD, 0);
        }
        else
        {
            caller = parent.getInvocation();
        }

        if (callee == null)
        {
            return "";
        }

        jvnBuffer.append(MESSAGE_TYPES[messageType]);

        SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);
        jvnBuffer.append(",");
        jvnBuffer.append(dateFormat.format(time));

        Throwable throwable = node.getThrowable();
        if (messageType == ID_THROW)
        {
            // ��O�N���X��
            addToJvnBuffer(throwable.getClass().getName(), jvnBuffer);

            // ��O�I�u�W�F�N�gID
            addToJvnBuffer(StatsUtil.getObjectID(throwable), jvnBuffer);
        }

        // �Ăяo���惁�\�b�h��
        addToJvnBuffer(getValidMethodName(callee), jvnBuffer);

        // �Ăяo����N���X��
        addToJvnBuffer(callee.getClassName(), jvnBuffer);

        // �Ăяo����I�u�W�F�N�gID
        addToJvnBuffer("unknown", jvnBuffer);

        if (messageType == ID_FIELD_READ || messageType == ID_FIELD_WRITE)
        {
            // �A�N�Z�X�����\�b�h��
            addToJvnBuffer("", jvnBuffer);

            // �A�N�Z�X���N���X��
            addToJvnBuffer("", jvnBuffer);

            // �A�N�Z�X���I�u�W�F�N�gID
            addToJvnBuffer("", jvnBuffer);

            // �A�N�Z�X��t�B�[���h�̌^
            addToJvnBuffer("", jvnBuffer);
        }
        else if (messageType == ID_CALL || messageType == ID_RETURN)
        {
            // �Ăяo�������\�b�h��
            addToJvnBuffer(getValidMethodName(caller), jvnBuffer);

            // �Ăяo�����N���X��
            addToJvnBuffer(caller.getClassName(), jvnBuffer);

            // �Ăяo�����I�u�W�F�N�gID
            addToJvnBuffer("unknown", jvnBuffer);

            // ���f�B�t�@�C�A
            addToJvnBuffer("", jvnBuffer);
        }

        // �X���b�hID
        addToJvnBuffer(tree.getThreadID(), jvnBuffer);
        jvnBuffer.append(NEW_LINE);

        int stringLimitLength = config.getStringLimitLength();
        String[] args = node.getArgs();
        if (messageType == ID_CALL && args != null && args.length > 0)
        {
            addArgs(jvnBuffer, stringLimitLength, args);
        }

        if (messageType == ID_RETURN)
        {
            String returnValue = node.getReturnValue();
            if (returnValue != null)
            {
                addReturn(jvnBuffer, returnValue, isReturnDetail, stringLimitLength);
            }
        }

        if (config.isLogMBeanInfo() || (config.isLogMBeanInfoRoot() && parent == null))
        {
            if (messageType == ID_CALL)
            {
                // VM���s���
                VMStatus startStatus = node.getStartVmStatus();
View Full Code Here

                return null;
        if (!(node.hasHadoopInfo()))
            return null;

        HadoopCallTreeNode parent = node.getParent();
        JavelinConfig config = new JavelinConfig();

        StringBuffer jvnBuffer = new StringBuffer();

        Invocation callee = node.getInvocation();

        // RPC�Ȃ̂ŌĂяo�����͕K��NULL�ɂȂ�
        if (parent != null)
        {
            return null;
        }

        if (callee == null)
        {
            return null;
        }

        // �������烁�b�Z�[�W�쐬�J�n
        if (node.getHadoopInfo().hasActions() || node.getHadoopInfo().hasStatuses())
        {
            // heartbeat()��Call��Return���t�]�����ĕ\������
            if (messageType == ID_CALL)
            {
                if (!node.getHadoopInfo().hasStatuses())
                    return null;

                jvnBuffer.append(MESSAGE_TYPES[ID_RETURN]);
            }
            else
            {
                if (!node.getHadoopInfo().hasActions())
                    return null;

                jvnBuffer.append(MESSAGE_TYPES[ID_CALL]);
            }

            SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);
            jvnBuffer.append(",");
            jvnBuffer.append(dateFormat.format(time));

            // ��O�̏����o���͍l�����Ȃ�

            // Phase
            addToJvnBuffer(getType(node.getHadoopInfo(), messageType), jvnBuffer);

            // �Ăяo�����z�X�g��
            addToJvnBuffer(node.getHadoopInfo().getHost(), jvnBuffer);

            // �Ăяo����I�u�W�F�N�gID
            addToJvnBuffer("", jvnBuffer);

            // �Ăяo����IP
            addToJvnBuffer("", jvnBuffer);

            // "JobTracker"
            addToJvnBuffer("JobTracker", jvnBuffer);

            // �Ăяo�����I�u�W�F�N�gID
            addToJvnBuffer("", jvnBuffer);

            // ���f�B�t�@�C�A
            addToJvnBuffer("", jvnBuffer);

            // TT->JT�̏ꍇ
            if (messageType == ID_CALL)
            {
                // �X���b�hID�ɍŏ��Ɍ��‚������W���uID��ݒ�
                for (HadoopTaskStatus stat : node.getHadoopInfo().getTaskStatuses())
                {
                    addToJvnBuffer(stat.getJobID(), jvnBuffer);
                    jvnBuffer.append(NEW_LINE);
                    break;
                }

                // �߂�l�o�͂��ݒ肳��Ă���ꍇ
                if (config.isLogReturn())
                {
                    String retVal = makeTaskStatus(node.getHadoopInfo().getTaskStatuses());
                    // �o�͑Ώۂ̃��b�Z�[�W�������ꍇ��null��Ԃ�
                    if (null == retVal)
                        return null;
                    jvnBuffer.append(retVal);
                }
            }
            if (messageType == ID_RETURN)
            {
                // �X���b�hID�ɍŏ��Ɍ��‚������W���uID��ݒ�
                for (HadoopAction action : node.getHadoopInfo().getTaskTrackerActions())
                {
                    addToJvnBuffer(action.getJobID(), jvnBuffer);
                    jvnBuffer.append(NEW_LINE);
                    break;
                }

                // �����o�͂��ݒ肳��Ă���ꍇ
                if (config.isLogArgs())
                {
                    String retVal = makeHeartbeatResponse(node.getHadoopInfo().getTaskTrackerActions());
                    // �o�͑Ώۂ̃��b�Z�[�W�������ꍇ��null��Ԃ�
                    if (null == retVal)
                        return null;
                    jvnBuffer.append(retVal);
                }
            }
        }
        // �W���u�����A�����A��~�̏ꍇ
        else if (node.getHadoopInfo().hasSubmitInfo() ||
                 node.getHadoopInfo().hasCompleteInfo() ||
                 node.getHadoopInfo().hasKilledInfo())
        {
            String command = "";

            // submitJob()�̃��^�[���͏o�͂��Ȃ�
            if (node.getHadoopInfo().hasSubmitInfo())
            {
                if (messageType == ID_RETURN)
                    return null;
                else
                    command = "SubmitJob";
            }
            // completedInfo�̃R�[���͏o�͂��Ȃ�
            if (node.getHadoopInfo().hasCompleteInfo())
            {
                if (messageType == ID_CALL)
                    return null;
                else
                    command = "JobCompleted";
            }
            // killedInfo�̃��^�[���͏o�͂��Ȃ�
            if (node.getHadoopInfo().hasKilledInfo())
            {
                if (messageType == ID_RETURN)
                    return null;
                else
                    command = "KillJob";
            }

            jvnBuffer.append(MESSAGE_TYPES[messageType]);

            SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);
            jvnBuffer.append(",");
            jvnBuffer.append(dateFormat.format(time));

            // ��O�̏����o���͍l�����Ȃ�

            // �Ăяo����
            addToJvnBuffer(command, jvnBuffer);

            // "JobTracker"
            addToJvnBuffer("JobTracker", jvnBuffer);

            // �Ăяo����I�u�W�F�N�gID
            addToJvnBuffer("", jvnBuffer);

            // �Ăяo����IP?
            addToJvnBuffer("", jvnBuffer);

            // �Ăяo�����z�X�g��
            addToJvnBuffer("root", jvnBuffer);

            // �Ăяo�����I�u�W�F�N�gID
            addToJvnBuffer("", jvnBuffer);

            // ���f�B�t�@�C�A
            addToJvnBuffer("", jvnBuffer);

            // �W���uID
            String jobID;
            if (node.getHadoopInfo().hasSubmitInfo())
                jobID = node.getHadoopInfo().getSubmitJobID();
            else if (node.getHadoopInfo().hasCompleteInfo())
                jobID = node.getHadoopInfo().getCompleteJobID();
            else
                jobID = node.getHadoopInfo().getKilledJobID();
            addToJvnBuffer(jobID, jvnBuffer);

            jvnBuffer.append(NEW_LINE);

            // Hadoop�ŗL���������o��
            if (messageType == ID_CALL)
            {
                // �����o�͂��ݒ肳��Ă�ꍇ
                if (config.isLogArgs())
                {
                    // �W���uID���o��
                    jvnBuffer.append(JAVELIN_ARGS_START);
                    jvnBuffer.append(NEW_LINE);
                    jvnBuffer.append("JobID : " + jobID);
                    jvnBuffer.append(NEW_LINE);
                    jvnBuffer.append(JAVELIN_ARGS_END);
                    jvnBuffer.append(NEW_LINE);
                }
            }
            else if (messageType == ID_RETURN)
            {
                // �߂�l�o�͂��ݒ肳��Ă�ꍇ
                if (config.isLogReturn())
                {
                    // �W���uID���o��
                    jvnBuffer.append(JAVELIN_RETURN_START);
                    jvnBuffer.append(NEW_LINE);
                    jvnBuffer.append("JobID : " + jobID);
                    jvnBuffer.append(NEW_LINE);
                    jvnBuffer.append(JAVELIN_RETURN_END);
                    jvnBuffer.append(NEW_LINE);
                }
            }
        }

        if (config.isLogMBeanInfo() || config.isLogMBeanInfoRoot())
        {
            if (messageType == ID_CALL)
            {
                // VM���s���
                VMStatus startStatus = node.getStartVmStatus();
View Full Code Here

TOP

Related Classes of jp.co.acroquest.endosnipe.common.config.JavelinConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.