Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.TableId;
import org.apache.accumulo.core.data.TabletId;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.dataImpl.KeyExtent;
Expand All @@ -77,8 +78,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import datawave.accumulo.inmemory.impl.InMemoryTabletLocator;

public class InMemoryTableOperations extends TableOperationsHelper {
private static final Logger log = LoggerFactory.getLogger(InMemoryTableOperations.class);
private static final byte[] ZERO = {0};
Expand Down Expand Up @@ -560,11 +559,15 @@ public SamplerConfiguration getSamplerConfiguration(String tableName) throws Tab
@Override
public Locations locate(String tableName, Collection<Range> ranges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<>();
InMemoryTabletLocator locator = new InMemoryTabletLocator();
List<Range> ignore = locator.binRanges(null, new ArrayList<>(ranges), binnedRanges);
List<Range> ignore = binRanges(new ArrayList<>(ranges), binnedRanges);
return new LocationsImpl(binnedRanges);
}

private List<Range> binRanges(ArrayList<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges) {
binnedRanges.put("", Collections.singletonMap(new KeyExtent(TableId.of(""), null, null), ranges));
return Collections.emptyList();
}

private static class LocationsImpl implements Locations {

private Map<Range,List<TabletId>> groupedByRanges;
Expand Down
Loading