/** * Factory for Lock instances. * * @deprecated use the lock factory methods in {@link com.moz.fiji.schema.zookeeper.ZooKeeperUtils}. */ @ApiAudience.Private @Inheritance.Sealed @Deprecated public interface LockFactory { /** * Creates a new lock in the specified directory. Locks within a directory are exclusive; no two * locks may be taken out from the same directory at the same time. * * @param directory identifying an exclusive lock location (e.g. a ZooKeeper ZNode path). * @return a lock which is exclusive in the specified directory. * @throws IOException on unrecoverable error. */ Lock create(String directory) throws IOException; }
@ApiAudience.Private public final class Time {
@ApiAudience.Private public final class AvroSchemaIdResolver implements Function<AvroSchema, Long> {
@ApiAudience.Private public final class SpecificCellDecoder<T> extends AvroCellDecoder<T> {
@ApiAudience.Private public final class GenericCellDecoder<T> extends AvroCellDecoder<T> {
@ApiAudience.Private public final class CassandraFijiReaderFactory implements FijiReaderFactory {
@ApiAudience.Private public final class HColumnDescriptorComparator implements Comparator<HColumnDescriptor> { @Override
@ApiAudience.Private public final class RawBytesCellEncoder implements FijiCellEncoder { private static final Logger LOG = LoggerFactory.getLogger(RawBytesCellEncoder.class);
@ApiAudience.Private public final class HBaseFijiReaderFactory implements FijiReaderFactory {
@ApiAudience.Private public final class CassandraFijiFactory implements FijiFactory {
@ApiAudience.Private public final class SchemaTableAvroResolver implements AvroSchemaResolver {
@ApiAudience.Private @ApiStability.Experimental public interface ZooKeeperFactory extends PriorityProvider {
@ApiAudience.Private public final class DefaultFijiCellEncoderFactory implements FijiCellEncoderFactory {
@ApiAudience.Private public final class FijiPivoters {
@ApiAudience.Private public final class CassandraFijiWriterFactory implements FijiWriterFactory {
@ApiAudience.Private public final class HBaseFijiWriterFactory implements FijiWriterFactory {
@ApiAudience.Private public final class NGramSynthesizer implements Synthesizer<String> {
/** Lock interface. */ @ApiAudience.Private @Inheritance.Sealed public interface Lock extends Closeable { /** * Unconditionally acquires the lock. * * @throws IOException on I/O error. */ void lock() throws IOException; /** * Acquires the lock. * * @param timeout * Deadline, in seconds, to acquire the lock. 0 means no timeout. * @return whether the lock is acquired (ie. false means timeout). * @throws IOException on I/O error. */ boolean lock(double timeout) throws IOException; /** * Releases the lock. * * @throws IOException on I/O error. */ void unlock() throws IOException; }
/** * An interface for Fiji mappers or bulk importers that read from HBase HTables. * * <p>Reading from an HTable requires knowing what subset of rows and columns should be * read (accomplished by configuring a Scan descriptor).</p> * * <p>If your mapper or bulk importer uses an HTableInputFormat, you should implement this * interface as a means of specifying the input HTable scan descriptor.</p> */ @ApiAudience.Private public interface HTableReader { /** * Returns an HBase scan descriptor that specifies what subset of rows and cells should * be read from the input HTable. * * <p>This method may return null, meaning that this instance is not really able to read * from an HTable.</p> * * @param conf The job configuration. * @return A new scan descriptor. * @throws IOException If the scan descriptor cannot be constructed. */ Scan getInputHTableScan(Configuration conf) throws IOException; }
/** * A {@link ZooKeeperFactory} which assumes a FijiURI is pointing to an existing, remote, ZooKeeper * ensemble. This {@link ZooKeeperFactory} implementation will be used in all non-unit-test * situations. */ @ApiAudience.Private @Inheritance.Sealed public class DefaultZooKeeperFactory implements ZooKeeperFactory { /** {@inheritDoc}. */ @Override public String getZooKeeperEnsemble(FijiURI uri) { final List<String> zkHosts = Lists.newArrayList(); for (String host : uri.getZookeeperQuorum()) { zkHosts.add(String.format("%s:%s", host, uri.getZookeeperClientPort())); } return Joiner.on(",").join(zkHosts); } @Override public int getPriority(Map<String, String> runtimeHints) { // Default priority; should be used unless overridden by a higher priority test provider. return Priority.NORMAL; } }