congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Locations
Code IndexAdd Tabnine to your IDE (free)

How to use
Locations
in
org.apache.accumulo.core.client.admin

Best Java code snippets using org.apache.accumulo.core.client.admin.Locations (Showing top 1 results out of 315)

origin: org.apache.accumulo/accumulo-test

private void assertContains(Locations locations, HashSet<String> tservers,
  Map<Range,ImmutableSet<TabletId>> expected1, Map<TabletId,ImmutableSet<Range>> expected2) {
 Map<Range,Set<TabletId>> gbr = new HashMap<>();
 for (Entry<Range,List<TabletId>> entry : locations.groupByRange().entrySet()) {
  gbr.put(entry.getKey(), new HashSet<>(entry.getValue()));
 }
 Assert.assertEquals(expected1, gbr);
 Map<TabletId,Set<Range>> gbt = new HashMap<>();
 for (Entry<TabletId,List<Range>> entry : locations.groupByTablet().entrySet()) {
  gbt.put(entry.getKey(), new HashSet<>(entry.getValue()));
  TabletId tid = entry.getKey();
  String location = locations.getTabletLocation(tid);
  Assert.assertNotNull("Location for " + tid + " was null", location);
  Assert.assertTrue("Unknown location " + location, tservers.contains(location));
  Assert.assertTrue("Expected <host>:<port> " + location, location.split(":").length == 2);
 }
 Assert.assertEquals(expected2, gbt);
}
org.apache.accumulo.core.client.adminLocations

Javadoc

A snapshot of metadata information about where a specified set of ranges are located returned by TableOperations#locate(String,java.util.Collection)

Most used methods

  • getTabletLocation
    For any TabletId known to this object, the method will return the tablet server location for that ta
  • groupByRange
    For all of the ranges passed to TableOperations#locate(String,java.util.Collection), return a map of
  • groupByTablet
    For all of the ranges passed to TableOperations#locate(String,java.util.Collection), return a map of

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top Vim plugins
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