001/* Module initializer for hadoop module.
002 * 
003 * Copyright (c) 2012-2013 The Regents of the University of California.
004 * All rights reserved.
005 *
006 * '$Author: crawl $'
007 * '$Date: 2015-09-04 16:53:05 +0000 (Fri, 04 Sep 2015) $' 
008 * '$Revision: 33862 $'
009 * 
010 * Permission is hereby granted, without written agreement and without
011 * license or royalty fees, to use, copy, modify, and distribute this
012 * software and its documentation for any purpose, provided that the above
013 * copyright notice and the following two paragraphs appear in all copies
014 * of this software.
015 *
016 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
017 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
018 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
019 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
020 * SUCH DAMAGE.
021 *
022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
025 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
026 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
027 * ENHANCEMENTS, OR MODIFICATIONS.
028 *
029 */
030package org.kepler.module.hadoop;
031
032import org.kepler.configuration.ConfigurationUtilities;
033import org.kepler.module.ModuleInitializer;
034
035/** Module initializer for hadoop module.
036 * 
037 *  @author Jianwu Wang
038 *  @version $Id: Initialize.java 33862 2015-09-04 16:53:05Z crawl $
039 */
040
041public class Initialize implements ModuleInitializer {
042
043    /** Copy hadoop configuration info to base config files. */
044    @Override
045    public void initializeModule() {
046
047        // copy hadoop engine to ddp-common configuration
048        ConfigurationUtilities.copyProperties("ddp-common", "hadoop", "Engines", "Engines.Engine");
049
050        // copy input and output formats to ddp-common configuration
051        ConfigurationUtilities.copyProperties("ddp-common", "hadoop", "InputFormats", "InputFormats.Format");
052        ConfigurationUtilities.copyProperties("ddp-common", "hadoop", "OutputFormats", "OutputFormats.Format");
053
054        // copy icon mappings to gui
055        ConfigurationUtilities.copyAllProperties("uiSVGIconMappingsByClass", "gui", "hadoop");
056
057    }
058}