/ /apps /bin /conf /lib /logs
bin 디렉토리에는 실행스크립트 파일이 있습니다.
실행스크립트에 다음과 같은 정보를 설정할 수 있습니다.
/bin/startup.bat /bin/startup.sh
startup.bat
@echo off setlocal set "JAVA_HOME=C:/Java/jdk1.7.0_80" set "SCHEDULER_NM=scheduler" set "SCHEDULER_HOME=C:/scheduler-server" cd "%SCHEDULER_HOME%" echo Using JAVA_HOME: %JAVA_HOME% echo Using SCHEDULER_HOME: %SCHEDULER_HOME% echo Using CONFIG_PATH: %SCHEDULER_HOME%/conf "%JAVA_HOME%/bin/java" -DCONFIG_PATH=%SCHEDULER_HOME%/conf -Dlogback.configurationFile=%SCHEDULER_HOME%/conf/logback.xml -Dglue.scheduler.server.port=8805 -cp *;lib/* com.posco.glue.server.PoscoSchedulerServer %SCHEDULER_NM%
startup.sh
export JAVA_HOME=/DBMS/DCCM/apps/tech_st/10.1.3/appsutil/jdk/jre export SCHEJULER_NM=scheduler export SCHEDULER_HOME=/DBMS/DCCM/GLUE/scheduler-server cd $SCHEDULER_HOME echo "Using JAVA_HOME : "$JAVA_HOME echo "Using SCHEDULER_HOME : "$SCHEDULER_HOME echo "Using CONFIG_PATH : "$SCHEDULER_HOME/conf $JAVA_HOME/bin/java -DCONFIG_PATH=$SCHEDULER_HOME/conf -Dlogback.configurationFile=$SCHEDULER_HOME/conf/logback.xml -Dglue.scheduler.server.port=8805 -cp ./*:./lib/* com.posco.glue.server.PoscoSchedulerServer $SCHEJULER_NM
conf 디렉토리에는 다음과 같은 설정파일이 있습니다.
실행스크립트에서 CONFIG_PATH로 지정된 위치입니다.
/conf/glue.properties /conf/logback.xml /conf/scheduler.properties /conf/quartz.properties
glue.properties
accepted.ip=172.31.47.160,172.31.225.206,172.30.* purge.scheduled.job.cron.expression=0 * * * * ? purge.scheduled.job.day.time=10
accepted.ip : NIO Event 처리 기준.
주어진 IP로 요청된 Event(reload, fire등) 만 처리합니다.
default 는 전체 허용입니다.
purge.scheduled.job.cron.expression : 로그삭제 Job의 실행주기 정의.
cron 표현식으로 작성합니다. default 는 매분 정각에 수행됩니다.
purge.scheduled.job.day.time : 로그삭제 Job 실행시 로그삭제 기준.
default 는 10일이며, 로그삭제 Job이 실행될 때마다 10일 이전의 log 파일을 삭제합니다.
logback.xml
<?xml version="1.0" encoding="UTF-8"?> <configuration debug="true"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${SCHEDULER_HOME}/logs/scheduler-server.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>${SCHEDULER_HOME}/logs/scheduler-server.log.%i</fileNamePattern> <minIndex>1</minIndex> <maxIndex>10</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>5MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%d [%thread] %-5level %logger - %msg%n</pattern> </encoder> </appender> <logger name="com.poscoict.glueframework"> <level value="info" /> </logger> <logger name="com.poscoict.app"> <level value="debug" /> </logger> <logger name="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao"> <level value="warn"/> </logger> <logger name="org.quartz"> <level value="info" /> </logger> <root level="warn"> <appender-ref ref="FILE" /> </root> </configuration>
scheduler.properties
cm-dataSource.driverClassName=oracle.jdbc.driver.OracleDriver cm-dataSource.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL cm-dataSource.username=scott cm-dataSource.password=tiger cm-dataSource.minIdle=0 cm-dataSource.maxActive=-1 cm-dataSource.maxIdle=1000
quartz.properties
# Default Properties file for use by StdSchedulerFactory # to create a Quartz Scheduler Instance, if a different # properties file is not explicitly specified. # org.quartz.scheduler.instanceName: DefaultQuartzScheduler org.quartz.scheduler.rmi.export: false org.quartz.scheduler.rmi.proxy: false org.quartz.scheduler.wrapJobExecutionInUserTransaction: false org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount: 10 org.quartz.threadPool.threadPriority: 5 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true org.quartz.jobStore.misfireThreshold: 60000 org.quartz.jobStore.class: org.quartz.simpl.RAMJobStore
lib 디렉토리에는 다음과 같은 라이브러리들이 있습니다.
JDBC Driver(ex. ojdbc6.jar)는 직접 추가합니다.
/lib/aopalliance-1.0.jar /lib/backport-util-concurrent-3.0.jar /lib/bcprov-jdk15-1.46.jar /lib/c3p0-0.9.1.1.jar /lib/commons-codec-1.6.jar /lib/commons-dbcp-1.4.jar /lib/commons-lang3-3.1.jar /lib/commons-pool-1.5.4.jar /lib/ehcache-core-2.6.9.jar /lib/glue-core-4.2.7-RELEASE.jar /lib/glue-schedule-4.2.7-RELEASE.jar /lib/glue-schema-4.2.7-RELEASE.jar /lib/httpclient-4.5.jar /lib/httpcore-4.4.1.jar /lib/jackson-core-asl-1.9.12.jar /lib/jackson-mapper-asl-1.9.12.jar /lib/jcl-over-slf4j-1.7.7.jar /lib/license-api-1.1.4.jar /lib/logback-classic-1.1.3.jar /lib/logback-core-1.1.3.jar /lib/mina-core-1.0.10.jar /lib/quartz-2.2.1.jar /lib/slf4j-api-1.7.7.jar /lib/spring-aop-3.2.8.RELEASE.jar /lib/spring-beans-3.2.8.RELEASE.jar /lib/spring-context-3.2.8.RELEASE.jar /lib/spring-context-support-3.2.8.RELEASE.jar /lib/spring-core-3.2.8.RELEASE.jar /lib/spring-expression-3.2.8.RELEASE.jar /lib/spring-jdbc-3.2.8.RELEASE.jar /lib/spring-tx-3.2.8.RELEASE.jar /lib/stax-api-1.0.1.jar /lib/xmlbeans-2.4.0.jar