/** * A scanner over rows in a FijiTable. Rows are returned as {@link FijiResult}s. * {@code FijiResultScanner} must be closed when it will no longer be used. * * @param <T> type of {@code FijiCell} value returned by scanned {@code FijiResult}s. */ @ApiAudience.Framework @ApiStability.Experimental @Inheritance.Sealed public interface FijiResultScanner<T> extends Closeable, Iterator<FijiResult<T>> { }
/** Configuration keys used by Cassandra FijiMR in Hadoop Configuration objects. */ @ApiAudience.Public @ApiStability.Evolving public final class CassandraFijiConfKeys { private static final Logger LOG = LoggerFactory.getLogger(CassandraFijiConfKeys.class); /** Desired number of input splits. */ public static final String TARGET_NUMBER_OF_CASSANDRA_INPUT_SPLITS = "fiji.input.splits.target"; /** Utility class may not be instantiated. */ private CassandraFijiConfKeys() { } }
/** 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); } }
/** Interface for factories of FijiCellEncoder instances. */ @ApiAudience.Framework @ApiStability.Evolving @Inheritance.Sealed public interface FijiCellEncoderFactory { /** * Creates a new Fiji cell encoder. * * @param cellSpec Specification of the cell encoding. * @return a new Fiji cell encoder. * @throws IOException on I/O error. */ FijiCellEncoder create(CellSpec cellSpec) throws IOException; }
/** * Responsible for deserializing FijiRowFilters from the results of a call to * {@link FijiRowFilter#toJson}. */ @ApiAudience.Framework @ApiStability.Evolving @Inheritance.Extensible public interface FijiRowFilterDeserializer { /** * Deserialize JSON into a {@code FijiRowFilter}. * * @param root the {@code JsonNode} holding the contents of the filter * @return a fully populated and operable {@code FijiRowFilter} */ FijiRowFilter createFromJson(JsonNode root); }
/** 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); }
/** * 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 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 functions that resolve AvroSchema descriptors into Schema objects. */ @ApiAudience.Private public interface AvroSchemaResolver extends Function<AvroSchema, Schema> { /** * Resolves an Avro schema descriptor into a Schema object. * * @param avroSchema Avro schema descriptor to resolve. * @return the resolved Schema object. */ @Override Schema apply(AvroSchema avroSchema); }
/** 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); } }
/** * Iterator of FijiCells which may in the future provide additional methods specific to iterating * over the contents of a FijiResult. * * @param <T> Type of the value in the cells returned by this Iterator. */ @ApiAudience.Framework @ApiStability.Experimental @Inheritance.Sealed public interface FijiResultIterator<T> extends Iterator<FijiCell<T>> {}
/** * 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); } }
/** * 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 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 + "."); } }
/** * 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 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 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); } }
/** * 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); } }