Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
MultiAction class:
/** * Add an Action to this container based on it's regionName. If the regionName * is wrong, the initial execution will fail, but will be automatically * retried after looking up the correct region. * * @param regionName * @param a */ public void add(byte[] regionName, Action<R> a) { add(regionName, Arrays.asList(a)); } /** * Add an Action to this container based on it's regionName. If the regionName * is wrong, the initial execution will fail, but will be automatically * retried after looking up the correct region. * * @param regionName * @param actionList list of actions to add for the region */ public void add(byte[] regionName, List<Action<R>> actionList){ List<Action<R>> rsActions = actions.get(regionName); if (rsActions == null) { rsActions = new ArrayList<Action<R>>(actionList.size()); actions.put(regionName, rsActions); } rsActions.addAll(actionList); }
Avoid Arrays.asList(a) and Collection.addAll - they create temporary garbage
Attachments
Attachments
Issue Links
- is part of
-
HBASE-15492 Memory usage optimizations
- Closed