This project has retired. For details please refer to its
Attic page.
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 package org.apache.oozie.command.coord;
019
020 import java.util.List;
021 import java.util.Map;
022
023 import org.apache.oozie.CoordinatorJobBean;
024 import org.apache.oozie.CoordinatorJobInfo;
025 import org.apache.oozie.DagEngineException;
026 import org.apache.oozie.command.CommandException;
027 import org.apache.oozie.command.wf.JobCommand;
028 import org.apache.oozie.store.CoordinatorStore;
029 import org.apache.oozie.store.StoreException;
030 import org.apache.oozie.util.ParamChecker;
031 import org.apache.oozie.util.XLog;
032
033 public class CoordJobsCommand extends CoordinatorCommand<CoordinatorJobInfo> {
034 private Map<String, List<String>> filter;
035 private int start;
036 private int len;
037
038 public CoordJobsCommand(Map<String, List<String>> filter, int start, int length) {
039 super("job.info", "job.info", 1, XLog.OPS);
040 this.filter = filter;
041 this.start = start;
042 this.len = length;
043 }
044
045 @Override
046 protected CoordinatorJobInfo call(CoordinatorStore store) throws StoreException, CommandException {
047 CoordinatorJobInfo coord = store.getCoordinatorInfo(filter, start, len);
048 // workflow.setConsoleUrl(getJobConsoleUrl(id));
049 // workflow.setActions((List) store.getActionsForWorkflow(id,
050 // false));
051 return coord;
052 }
053 }