Example #1
0
 public static void executeAsRowMutation(String batchId, HTableInterface table) {
   try {
     EntityManager.processEntity(BatchEntityType.instance, batchId, ROW_MUTATION_EXECUTOR, table);
   } catch (EntityNotFoundException e) {
     throw new BuildException("There was no batch " + batchId + " previously initialized", e);
   }
 }
Example #2
0
 public static void addAction(String batchId, IAction action) {
   try {
     EntityManager.processEntity(BatchEntityType.instance, batchId, ADD_ACTION, action);
   } catch (EntityNotFoundException e) {
     throw new BuildException("There was no batch " + batchId + " previously initialized", e);
   }
 }
Example #3
0
 public static void init(String batchId, BatchAction action) {
   try {
     EntityManager.setEntity(BatchEntityType.instance, batchId, action, false);
   } catch (EntityStorageAbsentException e) {
     throw new BuildException("There are no storage for HBase batch", e);
   }
 }
Example #4
0
 public static boolean exists(String batchId) {
   return EntityManager.exists(BatchEntityType.instance, batchId);
 }
Example #5
0
 public static void destroy(String batchId) {
   EntityManager.removeEntity(BatchEntityType.instance, batchId);
 }