/** Factory for FijiTable instances. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Sealed public interface FijiTableFactory { /** * Opens a FijiTable by name. * * <p>Clients must take care to release the FijiTable instance when finished.</p> * * @param tableName Name of the table to open. * @return the opened Fiji table. * @throws IOException on I/O error. */ FijiTable openTable(String tableName) throws IOException; }
/** * Base interface for tasks that emit (key, value) pairs. * * Tasks can be mappers, reducers, gatherers, etc. * * Users wishing to create jobs should extend FijiMapper, FijiReducer, FijiGatherer, etc, rather * than directly implementing this interface. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Extensible public interface KVOutputJob { /** @return the type of keys emitted by this task. */ Class<?> getOutputKeyClass(); /** @return the type of values emitted by this task. */ Class<?> getOutputValueClass(); }
/** * Thrown when there is an attempt to operate on a Fiji instance whose data format version * is incompatible with the Fiji client version. */ @ApiAudience.Public @ApiStability.Stable public final class IncompatibleFijiVersionException extends IOException { /** * Creates a new <code>IncompatibleFijiVersionException</code> with the specified * detail message. * * @param message The exception message. */ public IncompatibleFijiVersionException(String message) { super(message); } }
/** * Base class for Fiji reducer. * * @param <INKEY> The type of the input key to the mapper. * @param <INVALUE> The type of the input value to the mapper. * @param <OUTKEY> The type of the output key from the mapper. * @param <OUTVALUE> The type of the output value from the mapper. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Extensible public abstract class FijiReducer<INKEY, INVALUE, OUTKEY, OUTVALUE> extends Reducer<INKEY, INVALUE, OUTKEY, OUTVALUE> implements KVOutputJob { }
/** * Thrown when attempting to access a column that does not exist. */ @ApiAudience.Public @ApiStability.Stable public final class NoSuchColumnException extends IOException { /** * Creates a new <code>NoSuchColumnException</code> with the specified detail message. * * @param message The exception message. */ public NoSuchColumnException(String message) { super(message); } }
/** * Thrown when a Fiji table layout has a schema class reference that cannot be loaded * (probably because it is not on the class path). */ @ApiAudience.Public @ApiStability.Stable public final class SchemaClassNotFoundException extends InvalidLayoutException { /** * Creates a new <code>SchemaClassNotFoundException</code> with the specified detail message.. * * @param message The exception message. */ public SchemaClassNotFoundException(String message) { super(message); } }
/** * Thrown when fiji encounters a row key component name that is not valid. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Sealed public class EntityIdException extends RuntimeException { /** * Creates a new <code>EntityIdException</code> with the specified detail message. * * @param message The exception message. */ public EntityIdException(String message) { super(message); } }
/** * Fiji analytic functions (mappers, reducers, producer, gatherers, etc.) that read * {@link org.apache.avro.mapred.AvroKey} objects are required to implement this interface * as a means of specifying the Avro reader schema for their input key data. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Extensible public interface AvroKeyReader { /** * If the input key class is {@link org.apache.avro.mapred.AvroKey}, this method * returns the Avro reader schema of the wrapped datum; otherwise null. * * @throws IOException If there is an error. * @return The Avro reader schema of the datum wrapped in the AvroKey input. */ Schema getAvroKeyReaderSchema() throws IOException; }
/** * Base class for Fiji mappers. * * @param <INKEY> The type of the input key to the mapper. * @param <INVALUE> The type of the input value to the mapper. * @param <OUTKEY> The type of the output key from the mapper. * @param <OUTVALUE> The type of the output value from the mapper. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Extensible public abstract class FijiMapper<INKEY, INVALUE, OUTKEY, OUTVALUE> extends Mapper<INKEY, INVALUE, OUTKEY, OUTVALUE> implements KVOutputJob { }
/** * Thrown when attempting to read data from a cell that doesn't exist. */ @ApiAudience.Public @ApiStability.Stable public final class NoCellDataException extends Exception { /** * Creates a new <code>NoCellDataException</code> with the specified detail message. * * @param message The exception message. */ public NoCellDataException(String message) { super(message); } }
/** Context for Fiji bulk-importers or reducers to output to a Fiji table. */ @ApiAudience.Public @ApiStability.Stable @Inheritance.Sealed public interface FijiTableContext extends FijiContext, FijiPutter, FijiDeleter { /** @return a factory to create entity IDs to write to the output Fiji table. */ EntityIdFactory getEntityIdFactory(); /** * Creates an entity ID for the specified Fiji row key. * * @param components Fiji row key components. * @return the entity ID for the specified Fiji row key. */ EntityId getEntityId(Object... components); }
/** * Thrown to indicate that a flag is required but not supplied. */ @ApiAudience.Framework @ApiStability.Stable public final class RequiredFlagException extends Exception { /** * Creates a new <code>RequiredFlagException</code> for the specified flag name. * * @param flagName The name of the flag without the '--'. */ public RequiredFlagException(String flagName) { super("Must provide flag --" + flagName + "."); } }
/** * Exception thrown during a metadata restore operation due to user error. */ @ApiAudience.Public @ApiStability.Stable final class RestoreException extends Exception { /** * Creates a new RestoreException instance, with the specified message. A user-readable * message must be specified with this exception type. * @param msg the message to include. */ RestoreException(String msg) { super(msg); } }
/** * Thrown when a user attempts an action he or she does not have access to. */ @ApiAudience.Public @ApiStability.Stable public final class FijiAccessException extends RuntimeException { /** * Creates a new <code>FijiAccessException</code> with the specified detail message. * * @param message The exception message. */ public FijiAccessException(String message) { super(message); } }
/** * Thrown when a Fiji instance or table layout name is invalid. */ @ApiAudience.Public @ApiStability.Stable public final class FijiInvalidNameException extends RuntimeException { /** * Creates a new <code>FijiInvalidNameException</code> with the specified detail message. * * @param message The exception message. */ public FijiInvalidNameException(String message) { super(message); } }
/** * Thrown when there is an error validating a FijiDataRequest against a Fiji table. */ @ApiAudience.Public @ApiStability.Stable public final class FijiDataRequestException extends RuntimeException { /** * Creates a new <code>FijiDataRequestException</code> with the specified detail message. * * @param message The exception message. */ public FijiDataRequestException(String message) { super(message); } }
/** Thrown when a MapReduceJob is being built, but it has missing or incomplete configuration. */ @ApiAudience.Public @ApiStability.Stable public final class JobConfigurationException extends RuntimeException { /** * Creates a new <code>JobConfigurationException</code> instance. * * @param message A detailed message describing the exception. */ public JobConfigurationException(String message) { super(message); } }
/** Thrown when a FijiProducer fails to produce output. */ @ApiAudience.Public @ApiStability.Stable public final class FijiProducerOutputException extends IOException { /** * Creates a new <code>FijiProducerOutputException</code> instance. * * @param message An exception message. */ public FijiProducerOutputException(String message) { super(message); } }
/** Thrown when a JobInputSpec or JobOutputSpec cannot be parsed. */ @ApiAudience.Framework @ApiStability.Stable public final class JobIOSpecParseException extends RuntimeException { /** * @param message A message describing the problem with parsing. * @param spec The spec string that could not be parsed. */ public JobIOSpecParseException(String message, String spec) { super(message + " [spec=" + spec + "]"); } }
/** * Interface for a closeable iterable. * * @param <T> the type returned by .iterator().next() */ @ApiAudience.Framework @ApiStability.Stable @Inheritance.Sealed public interface CloseableIterable<T> extends Closeable, Iterable<T> {}