Tabnine Logo
MapUtils.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
org.apache.hbase.thirdparty.org.apache.commons.collections4.MapUtils

Best Java code snippets using org.apache.hbase.thirdparty.org.apache.commons.collections4.MapUtils.isEmpty (Showing top 2 results out of 315)

origin: apache/hbase

void filterCellByStore(Entry logEntry) {
 Map<byte[], Long> maxSeqIdInStores =
   regionMaxSeqIdInStores.get(Bytes.toString(logEntry.getKey().getEncodedRegionName()));
 if (MapUtils.isEmpty(maxSeqIdInStores)) {
  return;
 }
 // Create the array list for the cells that aren't filtered.
 // We make the assumption that most cells will be kept.
 ArrayList<Cell> keptCells = new ArrayList<>(logEntry.getEdit().getCells().size());
 for (Cell cell : logEntry.getEdit().getCells()) {
  if (CellUtil.matchingFamily(cell, WALEdit.METAFAMILY)) {
   keptCells.add(cell);
  } else {
   byte[] family = CellUtil.cloneFamily(cell);
   Long maxSeqId = maxSeqIdInStores.get(family);
   // Do not skip cell even if maxSeqId is null. Maybe we are in a rolling upgrade,
   // or the master was crashed before and we can not get the information.
   if (maxSeqId == null || maxSeqId.longValue() < logEntry.getKey().getSequenceId()) {
    keptCells.add(cell);
   }
  }
 }
 // Anything in the keptCells array list is still live.
 // So rather than removing the cells from the array list
 // which would be an O(n^2) operation, we just replace the list
 logEntry.getEdit().setCells(keptCells);
}
origin: org.apache.hbase.thirdparty/hbase-shaded-miscellaneous

/**
 * Null-safe check if the specified map is not empty.
 * <p>
 * Null returns false.
 *
 * @param map  the map to check, may be null
 * @return true if non-null and non-empty
 * @since 3.2
 */
public static boolean isNotEmpty(final Map<?,?> map) {
  return !MapUtils.isEmpty(map);
}
org.apache.hbase.thirdparty.org.apache.commons.collections4MapUtilsisEmpty

Javadoc

Null-safe check if the specified map is empty.

Null returns true.

Popular methods of MapUtils

  • isNotEmpty
    Null-safe check if the specified map is not empty. Null returns false.
  • getBoolean
    Looks up the given key in the given map, converting the result into a boolean, using the default val
  • getByte
    Looks up the given key in the given map, converting the result into a byte, using the default value
  • getDouble
    Looks up the given key in the given map, converting the result into a double, using the default valu
  • getFloat
    Looks up the given key in the given map, converting the result into a float, using the default value
  • getInteger
    Looks up the given key in the given map, converting the result into an integer, using the default va
  • getLong
    Looks up the given key in the given map, converting the result into a long, using the default value
  • getMap
    Looks up the given key in the given map, converting the result into a map, using the default value i
  • getNumber
    Looks up the given key in the given map, converting the result into a number, using the default valu
  • getObject
    Looks up the given key in the given map, converting null into the given default value.
  • getShort
    Looks up the given key in the given map, converting the result into a short, using the default value
  • getString
    Looks up the given key in the given map, converting the result into a string, using the default valu
  • getShort,
  • getString,
  • iterableMap,
  • populateMap,
  • printIndent,
  • verbosePrintInternal

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • Menu (java.awt)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • JFrame (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now