Skip to content

Commit

Permalink
Merge branch '1.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
ctubbsii committed Jul 22, 2016
2 parents faa92c5 + c587a6f commit 2f8c8e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ public byte[] getBuffer() {
}

@Override
@SuppressWarnings("unchecked")
public <T> T getIndex(Class<T> clazz) {
T bi = null;
synchronized (cb) {
@SuppressWarnings("unchecked")
SoftReference<T> softRef = (SoftReference<T>) cb.getIndex();
if (softRef != null)
bi = softRef.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public synchronized void startAllServers(ServerType server) throws IOException {

@Override
public synchronized void start(ServerType server, String hostname) throws IOException {
start(server, hostname, Collections.EMPTY_MAP, Integer.MAX_VALUE);
start(server, hostname, Collections.<String,String> emptyMap(), Integer.MAX_VALUE);
}

public synchronized void start(ServerType server, String hostname, Map<String,String> configOverrides, int limit) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package org.apache.accumulo.master;

import com.google.common.collect.ImmutableSortedSet;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.lang.Math.min;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -30,6 +30,7 @@
import java.util.Optional;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
Expand All @@ -44,6 +45,7 @@
import org.apache.accumulo.core.client.RowIterator;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.PartialKey;
Expand All @@ -68,6 +70,7 @@
import org.apache.accumulo.master.state.TableCounts;
import org.apache.accumulo.master.state.TableStats;
import org.apache.accumulo.server.ServerConstants;
import org.apache.accumulo.server.conf.TableConfiguration;
import org.apache.accumulo.server.fs.FileRef;
import org.apache.accumulo.server.fs.VolumeManager.FileType;
import org.apache.accumulo.server.log.WalStateManager;
Expand All @@ -91,12 +94,8 @@
import org.apache.hadoop.io.Text;
import org.apache.thrift.TException;

import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Iterators;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.server.conf.TableConfiguration;
import static java.lang.Math.min;
import java.util.SortedSet;
import static java.lang.Math.min;

abstract class TabletGroupWatcher extends Daemon {
// Constants used to make sure assignment logging isn't excessive in quantity or size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s
tables = Maps.filterKeys(tables, tableName -> namespace == null || Tables.qualify(tableName).getFirst().equals(namespace));

final boolean sortByTableId = cl.hasOption(sortByTableIdOption.getOpt());
tables = new TreeMap<>((sortByTableId ? MapUtils.invertMap(tables) : tables));
tables = new TreeMap<String,String>((sortByTableId ? MapUtils.invertMap(tables) : tables));

Iterator<String> it = Iterators.transform(tables.entrySet().iterator(), entry -> {
String tableName = String.valueOf(sortByTableId ? entry.getValue() : entry.getKey());
Expand Down

0 comments on commit 2f8c8e7

Please sign in to comment.