Tabnine Logo
HadoopConf
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • JList (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now