Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.mahout.driver;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import com.google.common.io.Closeables;
import org.apache.hadoop.util.ProgramDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* General-purpose driver class for Mahout programs. Utilizes org.apache.hadoop.util.ProgramDriver to run
* main methods of other classes, but first loads up default properties from a properties file.
*
* To run locally:
*
*
$MAHOUT_HOME/bin/mahout run shortJobName [over-ride ops]
*
* Works like this: by default, the file "driver.classes.props" is loaded from the classpath, which
* defines a mapping between short names like "vectordump" and fully qualified class names.
* The format of driver.classes.props is like so:
*
*
*
*
* The default properties to be applied to the program run is pulled out of, by default, ".props"
* (also off of the classpath).
*
* The format of the default properties files is as follows:
*
i|input = /path/to/my/input
o|output = /path/to/my/output
m|jarFile = /path/to/jarFile
# etc - each line is shortArg|longArg = value
*
* The next argument to the Driver is supposed to be the short name of the class to be run (as defined in the
* driver.classes.props file).
*
* Then the class which will be run will have it's main called with
*
*
*
* After all the "default" properties are loaded from the file, any further command-line arguments are taken in,
* and over-ride the defaults.
*
* So if your driver.classes.props looks like so:
*
*
org.apache.mahout.utils.vectors.VectorDumper = vecDump : dump vectors from a sequence file
*
* and you have a file core/src/main/resources/vecDump.props which looks like
*