Пример #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);
   }
 }
Пример #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);
   }
 }
Пример #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);
   }
 }
Пример #4
0
 public static boolean exists(String batchId) {
   return EntityManager.exists(BatchEntityType.instance, batchId);
 }
Пример #5
0
 public static void destroy(String batchId) {
   EntityManager.removeEntity(BatchEntityType.instance, batchId);
 }