Codota Logo
HadoopConf
Code IndexAdd Codota to your IDE (free)

How to use
HadoopConf
in
com.moz.fiji.hadoop.configurator

Best Java code snippets using com.moz.fiji.hadoop.configurator.HadoopConf (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

/**
 * Sets the delimiter.
 *
 * @param delimiter The delimiter.
 */
@HadoopConf(key=CONF_FIELD_DELIMITER, defaultValue=DEFAULT_FIELD_DELIMITER)
protected void setFieldDelimiter(String delimiter) {
 if (delimiter.length() != 1) {
  throw new RuntimeException("Delimiter must be exactly one character long."
    + "  Received: \"" + delimiter + "\".");
 }
 mFieldDelimiter = delimiter;
}
origin: com.moz.fiji.hadoop/hadoop-configurator

 /**
  * Gets the default value specified by the annotation.
  *
  * @return The default value.
  */
 private String getDefault() {
  return mAnnotation.defaultValue();
 }
}
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the configuration key that should be used to populate the field.
 *
 * @return The key that was specified in the HadoopConf annotation.
 */
public String getKey() {
 return mAnnotation.key();
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

/**
 * Sets the log rate - the number of lines between log statements for incomplete/rejected lines.
 *
 * @param logRateString The logging rate as a string.
 */
@HadoopConf(key=CONF_LOG_RATE, usage="The number of lines to skip between log statements")
protected final void setLogRate(String logRateString) {
 if (logRateString != null) {
  try {
   Long logRate = Long.parseLong(logRateString);
   mLogRate = logRate;
  } catch (NumberFormatException ne) {
   LOG.warn("Unable to parse log rate: " + logRateString);
  }
 }
}
origin: com.moz.fiji.hadoop/hadoop-configurator

 /**
  * Gets the default value as a string.
  *
  * @param instance The object instance.
  * @return The default string value.
  * @throws IllegalAccessException If the field cannot be read.
  */
 private String getDefaultString(Object instance) throws IllegalAccessException {
  String defaultValue = mAnnotation.defaultValue();
  if (defaultValue.isEmpty()) {
   return (String) mField.get(instance);
  }
  return defaultValue;
 }
}
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the configuration key that should be used to populate the field.
 *
 * @return The key that was specified in the HadoopConf annotation.
 */
public String getKey() {
 return mAnnotation.key();
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

public static final String CONF_REGEX = "fiji.regexproducer.regex";
@HadoopConf(key=CONF_INPUT_COLUMN, usage="The input column name.")
private String mInputColumn;
@HadoopConf(key=CONF_OUTPUT_COLUMN, usage="The output column name.")
private String mOutputColumn;
@HadoopConf(key=CONF_REGEX, usage="The regular expression used to extract from the input column.")
private String mRegex;
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the default value as a boolean.
 *
 * @param instance The object instance.
 * @return The default boolean value.
 * @throws IllegalAccessException If the field cannot be read.
 */
private boolean getDefaultBoolean(Object instance) throws IllegalAccessException {
 String defaultValue = mAnnotation.defaultValue();
 if (defaultValue.isEmpty()) {
  return mField.getBoolean(instance);
 }
 return Boolean.parseBoolean(defaultValue);
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

/**
 * Sets the output column name.
 *
 * @param column The output column.
 */
@HadoopConf(key=CONF_OUTPUT, usage="The output column name.")
protected void setOutputColumn(String column) {
 if (null == column || column.isEmpty()) {
  throw new RuntimeException("Must specify " + CONF_OUTPUT);
 }
 mOutputColumn = new FijiColumnName(column);
}
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the default value as an int.
 *
 * @param instance The object instance.
 * @return The default int value.
 * @throws IllegalAccessException If the field cannot be read.
 */
private int getDefaultInt(Object instance) throws IllegalAccessException {
 String defaultValue = mAnnotation.defaultValue();
 if (defaultValue.isEmpty()) {
  return mField.getInt(instance);
 }
 return Integer.parseInt(defaultValue);
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

/**
 * Sets the input column name.
 *
 * @param column The input column.
 */
@HadoopConf(key=CONF_INPUT, usage="The input column name.")
protected void setInputColumn(String column) {
 if (null == column || column.isEmpty()) {
  throw new RuntimeException("Must specify " + CONF_INPUT);
 }
 mInputColumn = new FijiColumnName(column);
}
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the default value as a long.
 *
 * @param instance The object instance.
 * @return The default long value.
 * @throws IllegalAccessException If the field cannot be read.
 */
private long getDefaultLong(Object instance) throws IllegalAccessException {
 String defaultValue = mAnnotation.defaultValue();
 if (defaultValue.isEmpty()) {
  return mField.getLong(instance);
 }
 return Long.parseLong(defaultValue);
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

@HadoopConf(key=CONF_MAX_VERSIONS, usage="Max number of versions to return for any key.")
private int mMaxVersions = 1;
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the default value as a double.
 *
 * @param instance The object instance.
 * @return The default double value.
 * @throws IllegalAccessException If the field cannot be read.
 */
private float getDefaultDouble(Object instance) throws IllegalAccessException {
 String defaultValue = mAnnotation.defaultValue();
 if (defaultValue.isEmpty()) {
  return (float) mField.getDouble(instance);
 }
 return Float.parseFloat(defaultValue);
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

 /**
  * Sets the path to the text input descriptor file and parses it.
  *
  * @param inputDescriptorFile The input descriptor path.
  * @throws RuntimeException if there's an error reading or parsing the input descriptor.
  */
 @HadoopConf(key=CONF_FILE, usage="The input descriptor file.")
 protected final void setInputDescriptorPath(String inputDescriptorFile) {

  if (null == inputDescriptorFile || inputDescriptorFile.isEmpty()) {
   // Remind the user to specify this path.
   LOG.error("No input-descriptor path specified.");
   throw new RuntimeException("No input descriptor file specified on the Configuration."
     + "  Did you specify the " + CONF_FILE + " variable?");
  }

  Path descriptorPath = new Path(inputDescriptorFile);
  try {
   LOG.info("Parsing input-descriptor file: " + descriptorPath.toString());
   FileSystem fs = descriptorPath.getFileSystem(getConf());
   FSDataInputStream inputStream = fs.open(descriptorPath);
   mTableImportDescriptor =
     FijiTableImportDescriptor.createFromEffectiveJson(inputStream);

  } catch (IOException ioe) {
   LOG.error("Could not read input-descriptor file: " + descriptorPath.toString());
   throw new RuntimeException("Could not read file: " + descriptorPath.toString(), ioe);
  }
 }
}
origin: com.moz.fiji.hadoop/hadoop-configurator

/**
 * Gets the default value as a float.
 *
 * @param instance The object instance.
 * @return The default float value.
 * @throws IllegalAccessException If the field cannot be read.
 */
private float getDefaultFloat(Object instance) throws IllegalAccessException {
 String defaultValue = mAnnotation.defaultValue();
 if (defaultValue.isEmpty()) {
  return mField.getFloat(instance);
 }
 return Float.parseFloat(defaultValue);
}
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

/**
 * Sets the family.
 *
 * @param family The family.
 */
@HadoopConf(key=CONF_EXPORT_FAMILY)
protected void setFamily(String family) {
 FijiColumnName name = new FijiColumnName(family);
 if (name.isFullyQualified()) {
  throw new RuntimeException("Expected an unqualified map type family. "
    + "Requested family was: " + name.getName());
 }
 mFamily = family;
}
origin: com.moz.fiji.hadoop/hadoop-configurator

   + instance.getClass().getName() + "." + mField.getName());
if (null == conf.get(key) && mAnnotation.defaultValue().isEmpty()) {
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

@HadoopConf(key=CONF_COLUMN_DESCRIPTORS)
protected void setColumnDescriptors(String[] columnDescriptors) {
 if (null == columnDescriptors || 0 == columnDescriptors.length) {
origin: com.moz.fiji.mapreduce.lib/fiji-mapreduce-lib

@HadoopConf(key=CONF_FIELD_DELIMITER)
private String mColumnDelimiter = CSV_DELIMITER;
com.moz.fiji.hadoop.configuratorHadoopConf

Most used methods

  • <init>
  • defaultValue
  • key

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • putExtra (Intent)
  • setContentView (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Notification (javax.management)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now