HBASE-19563 A few hbase-procedure classes missing @InterfaceAudience annotation

This commit is contained in:
Guanghao Zhang 2017-12-20 16:50:31 +08:00 committed by Michael Stack
parent 55fefd4b5a
commit 6c6a9d2d1c
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
6 changed files with 24 additions and 1 deletions

View File

@ -18,6 +18,8 @@
package org.apache.hadoop.hbase.procedure2; package org.apache.hadoop.hbase.procedure2;
import org.apache.yetus.audience.InterfaceAudience;
/** /**
* Locking for mutual exclusion between procedures. Used only by procedure framework internally. * Locking for mutual exclusion between procedures. Used only by procedure framework internally.
* {@link LockAndQueue} has two purposes: * {@link LockAndQueue} has two purposes:
@ -42,6 +44,7 @@ package org.apache.hadoop.hbase.procedure2;
* <br> * <br>
* We do not use ReentrantReadWriteLock directly because of its high memory overhead. * We do not use ReentrantReadWriteLock directly because of its high memory overhead.
*/ */
@InterfaceAudience.Private
public class LockAndQueue extends ProcedureDeque implements LockStatus { public class LockAndQueue extends ProcedureDeque implements LockStatus {
private Procedure<?> exclusiveLockOwnerProcedure = null; private Procedure<?> exclusiveLockOwnerProcedure = null;
private int sharedLock = 0; private int sharedLock = 0;

View File

@ -18,18 +18,28 @@
package org.apache.hadoop.hbase.procedure2; package org.apache.hadoop.hbase.procedure2;
import org.apache.yetus.audience.InterfaceAudience;
/** /**
* Interface to get status of a Lock without getting access to acquire/release lock. * Interface to get status of a Lock without getting access to acquire/release lock.
* Currently used in MasterProcedureScheduler where we want to give Queues access to lock's * Currently used in MasterProcedureScheduler where we want to give Queues access to lock's
* status for scheduling purposes, but not the ability to acquire/release it. * status for scheduling purposes, but not the ability to acquire/release it.
*/ */
@InterfaceAudience.Private
public interface LockStatus { public interface LockStatus {
boolean isLocked(); boolean isLocked();
boolean hasExclusiveLock(); boolean hasExclusiveLock();
boolean isLockOwner(long procId); boolean isLockOwner(long procId);
boolean hasParentLock(final Procedure proc); boolean hasParentLock(final Procedure proc);
boolean hasLockAccess(final Procedure proc); boolean hasLockAccess(final Procedure proc);
Procedure<?> getExclusiveLockOwnerProcedure(); Procedure<?> getExclusiveLockOwnerProcedure();
long getExclusiveLockProcIdOwner(); long getExclusiveLockProcIdOwner();
int getSharedLockCount(); int getSharedLockCount();
} }

View File

@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.procedure2;
import org.apache.hadoop.hbase.metrics.Counter; import org.apache.hadoop.hbase.metrics.Counter;
import org.apache.hadoop.hbase.metrics.Histogram; import org.apache.hadoop.hbase.metrics.Histogram;
import org.apache.yetus.audience.InterfaceAudience;
/** /**
* With this interface, the procedure framework provides means to collect following set of metrics * With this interface, the procedure framework provides means to collect following set of metrics
@ -32,6 +33,7 @@ import org.apache.hadoop.hbase.metrics.Histogram;
* *
* Please implement this interface to return appropriate metrics. * Please implement this interface to return appropriate metrics.
*/ */
@InterfaceAudience.Private
public interface ProcedureMetrics { public interface ProcedureMetrics {
/** /**
* @return Total number of instances submitted for a type of a procedure * @return Total number of instances submitted for a type of a procedure

View File

@ -19,8 +19,11 @@ package org.apache.hadoop.hbase.procedure2;
import java.io.IOException; import java.io.IOException;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hadoop.hbase.shaded.com.google.protobuf.Message; import org.apache.hadoop.hbase.shaded.com.google.protobuf.Message;
@InterfaceAudience.Private
public interface ProcedureStateSerializer { public interface ProcedureStateSerializer {
void serialize(Message message) throws IOException; void serialize(Message message) throws IOException;

View File

@ -21,10 +21,12 @@ package org.apache.hadoop.hbase.procedure2.store;
import java.io.IOException; import java.io.IOException;
import org.apache.hadoop.hbase.procedure2.Procedure; import org.apache.hadoop.hbase.procedure2.Procedure;
import org.apache.yetus.audience.InterfaceAudience;
/** /**
* An In-Memory store that does not keep track of the procedures inserted. * An In-Memory store that does not keep track of the procedures inserted.
*/ */
@InterfaceAudience.Private
public class NoopProcedureStore extends ProcedureStoreBase { public class NoopProcedureStore extends ProcedureStoreBase {
private int numThreads; private int numThreads;

View File

@ -21,9 +21,12 @@ package org.apache.hadoop.hbase.procedure2.store;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.yetus.audience.InterfaceAudience;
/** /**
* Base class for {@link ProcedureStore}s. * Base class for {@link ProcedureStore}s.
*/ */
@InterfaceAudience.Private
public abstract class ProcedureStoreBase implements ProcedureStore { public abstract class ProcedureStoreBase implements ProcedureStore {
private final CopyOnWriteArrayList<ProcedureStoreListener> listeners = new CopyOnWriteArrayList<>(); private final CopyOnWriteArrayList<ProcedureStoreListener> listeners = new CopyOnWriteArrayList<>();