congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Host2NodesMap.contains
Code IndexAdd Tabnine to your IDE (free)

How to use
contains
method
in
org.apache.hadoop.hdfs.server.blockmanagement.Host2NodesMap

Best Java code snippets using org.apache.hadoop.hdfs.server.blockmanagement.Host2NodesMap.contains (Showing top 4 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

hostmapLock.writeLock().lock();
try {
 if (node==null || contains(node)) {
  return false;
origin: ch.cern.hadoop/hadoop-hdfs

hostmapLock.writeLock().lock();
try {
 if (node==null || contains(node)) {
  return false;
origin: io.prestosql.hadoop/hadoop-apache

hostmapLock.writeLock().lock();
try {
 if (node==null || contains(node)) {
  return false;
origin: ch.cern.hadoop/hadoop-hdfs

@Test
public void testContains() throws Exception {
 DatanodeDescriptor nodeNotInMap =
  DFSTestUtil.getDatanodeDescriptor("3.3.3.3", "/d1/r4");
 for (int i = 0; i < dataNodes.length; i++) {
  assertTrue(map.contains(dataNodes[i]));
 }
 assertFalse(map.contains(null));
 assertFalse(map.contains(nodeNotInMap));
}
org.apache.hadoop.hdfs.server.blockmanagementHost2NodesMapcontains

Javadoc

Check if node is already in the map.

Popular methods of Host2NodesMap

  • add
    add node to the map return true if the node is added; false otherwise.
  • getDatanodeByHost
    Get a data node by its IP address.
  • remove
    remove node from the map return true if the node is removed; false otherwise.
  • getDataNodeByHostName
    get a data node by its hostname. This should be used if only one datanode service is running on a ho
  • getDatanodeByXferAddr
    Find data node by its transfer address

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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