Package org.apache.accumulo.core.client.impl.TabletLocator

Examples of org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation


        parent.invalidateCache(failures);
     
      SortedMap<KeyExtent,Text> metadata = MetadataTable.getMetadataLocationEntries(results);
     
      for (Entry<KeyExtent,Text> entry : metadata.entrySet()) {
        list.add(new TabletLocation(entry.getKey(), entry.getValue().toString()));
      }
     
      return list;
     
    }
View Full Code Here


        if (attempt > 0)
          UtilWaitThread.sleep(100);
       
        attempt++;
       
        TabletLocation tl = tabLocator.locateTablet(split, false, false);
       
        if (tl == null)
          continue;
       
        try {
View Full Code Here

        System.arraycopy(splitBytes, 0, rowBytes, diff, splitBytes.length);
       
        Text currRow = new Text(rowBytes);
        split = split.add(splitDistance);
       
        locations.add(new TabletLocation(new KeyExtent(new Text("0"), currRow, prevRow), "192.168.1." + (i % 256) + ":9997"));
        prevRow = currRow;
      }
     
      locations.add(new TabletLocation(new KeyExtent(new Text("0"), null, prevRow), "192.168.1.1:9997"));
     
      return locations;
    }
View Full Code Here

      for (int i = 0; i < numTablets - 1; i++) {
       
        Text currRow = new Text(String.format("%016x", split));
        split += splitDistance;
       
        locations.add(new TabletLocation(new KeyExtent(new Text("0"), currRow, prevRow), "192.168.1." + (i % 256) + ":9997"));
        prevRow = currRow;
      }
     
      locations.add(new TabletLocation(new KeyExtent(new Text("0"), null, prevRow), "192.168.1.1:9997"));
     
      return locations;
    }
View Full Code Here

      throw new UnsupportedOperationException();
    }
   
    @Override
    public TabletLocation locateTablet(Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
      return new TabletLocation(new KeyExtent(new Text("!0"), null, null), "192.168.1.1:9997");
    }
View Full Code Here

      int notNull = 0;
     
      // Text row = new Text();
      for (Mutation mut : mutations) {
        // row.set(mut.getRow());
        TabletLocation tl = trie.ceiling(new ArrayByteSequence(mut.getRow(), 0, mut.getRow().length));
        /*
         * if(!tl.tablet_extent.contains(row)){ throw new RuntimeException(tl.tablet_extent+" does not contain "+row); }
         */
        if (tl != null)
          notNull++;
View Full Code Here

   
    ExecutorService threadPool = Executors.newFixedThreadPool(numThreads);
   
    for (final Entry<Path,List<TabletLocation>> entry : assignments.entrySet()) {
      if (entry.getValue().size() == 1) {
        TabletLocation tabletLocation = entry.getValue().get(0);
       
        // if the tablet completely contains the map file, there is no
        // need to estimate its
        // size
        ais.put(entry.getKey(), Collections.singletonList(new AssignmentInfo(tabletLocation.tablet_extent, mapFileSizes.get(entry.getKey()))));
View Full Code Here

        if (!reader.hasTop()) {
          // log.debug(filename + " not found");
          break;
        }
        row = reader.getTopKey().getRow();
        TabletLocation tabletLocation = locator.locateTablet(row, false, true);
        // log.debug(filename + " found row " + row + " at location " + tabletLocation);
        result.add(tabletLocation);
        row = tabletLocation.tablet_extent.getEndRow();
        if (row != null && (endRow == null || row.compareTo(endRow) < 0)) {
          row = new Text(row);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.