blob: 667028272e9b3affe3ce2bf120ffc0584e3fc5c8 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.jpm.mr.running;
import org.apache.eagle.app.service.ApplicationListener;
import org.apache.eagle.app.spi.AbstractApplicationProvider;
import org.apache.eagle.jpm.analyzer.meta.MetaManagementService;
import org.apache.eagle.jpm.analyzer.meta.impl.MetaManagementServiceJDBCImpl;
import org.apache.eagle.jpm.analyzer.meta.impl.MetaManagementServiceMemoryImpl;
import org.apache.eagle.metadata.service.memory.MemoryMetadataStore;
import org.apache.eagle.metadata.store.jdbc.JDBCMetadataStore;
import java.util.Optional;
public class MRRunningJobApplicationProvider extends AbstractApplicationProvider<MRRunningJobApplication> {
@Override
public MRRunningJobApplication getApplication() {
return new MRRunningJobApplication();
}
@Override
public Optional<ApplicationListener> getApplicationListener() {
return Optional.of(new MRRunningJobApplicationListener());
}
@Override
protected void onRegister() {
bind(MemoryMetadataStore.class, MetaManagementService.class, MetaManagementServiceMemoryImpl.class);
bind(JDBCMetadataStore.class, MetaManagementService.class, MetaManagementServiceJDBCImpl.class);
}
}