Skip to content

Commit

Permalink
HBASE-16695 Procedure v2 - Support for parent holding locks
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Bertozzi committed Sep 26, 2016
1 parent e01e05c commit 8da0500
Show file tree
Hide file tree
Showing 5 changed files with 597 additions and 267 deletions.
Expand Up @@ -908,4 +908,16 @@ public static Procedure convert(final ProcedureProtos.Procedure proto)


return proc; return proc;
} }

/**
* @param a the first procedure to be compared.
* @param b the second procedure to be compared.
* @return true if the two procedures have the same parent
*/
public static boolean haveSameParent(final Procedure a, final Procedure b) {
if (a.hasParent() && b.hasParent()) {
return a.getParentProcId() == b.getParentProcId();
}
return false;
}
} }
Expand Up @@ -18,6 +18,8 @@


package org.apache.hadoop.hbase.procedure2; package org.apache.hadoop.hbase.procedure2;


import com.google.common.annotations.VisibleForTesting;

import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability; import org.apache.hadoop.hbase.classification.InterfaceStability;


Expand Down Expand Up @@ -69,6 +71,7 @@ public interface ProcedureRunnableSet {
* Returns the number of elements in this collection. * Returns the number of elements in this collection.
* @return the number of elements in this collection. * @return the number of elements in this collection.
*/ */
@VisibleForTesting
int size(); int size();


/** /**
Expand Down

0 comments on commit 8da0500

Please sign in to comment.