001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie.service; 020 021import org.apache.oozie.util.XLogFilter; 022import org.apache.oozie.service.Service; 023import org.apache.oozie.service.Services; 024import org.apache.oozie.util.XLog; 025 026/** 027 * Set Dag specific log info parameters. 028 */ 029public class DagXLogInfoService implements Service { 030 031 /** 032 * Token log info constant. 033 */ 034 public static final String TOKEN = "TOKEN"; 035 036 /** 037 * App log info constant. 038 */ 039 public static final String APP = "APP"; 040 041 /** 042 * Job log info constant. 043 */ 044 public static final String JOB = "JOB"; 045 046 /** 047 * Action log info constant. 048 */ 049 public static final String ACTION = "ACTION"; 050 051 /** 052 * Initialize the service. 053 * 054 * @param services services. 055 */ 056 public void init(Services services) { 057 XLog.Info.defineParameter(TOKEN); 058 XLog.Info.defineParameter(APP); 059 XLog.Info.defineParameter(JOB); 060 XLog.Info.defineParameter(ACTION); 061 062 XLogFilter.defineParameter(TOKEN); 063 XLogFilter.defineParameter(APP); 064 XLogFilter.defineParameter(JOB); 065 XLogFilter.defineParameter(ACTION); 066 067 } 068 069 /** 070 * Destroy the service. 071 */ 072 public void destroy() { 073 } 074 075 /** 076 * Return the public interface of the service. 077 * 078 * @return {@link DagXLogInfoService}. 079 */ 080 public Class<? extends Service> getInterface() { 081 return DagXLogInfoService.class; 082 } 083 084}