HBASE-17207 Arrays.asList() with too few arguments. (John Leach)
This commit is contained in:
parent
c7b8b63cd1
commit
f112427425
|
@ -27,7 +27,7 @@ import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
|
@ -129,7 +129,7 @@ public class BufferedMutatorImpl implements BufferedMutator {
|
|||
@Override
|
||||
public void mutate(Mutation m) throws InterruptedIOException,
|
||||
RetriesExhaustedWithDetailsException {
|
||||
mutate(Arrays.asList(m));
|
||||
mutate(Collections.singletonList(m));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
package org.apache.hadoop.hbase.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -68,7 +68,7 @@ public final class MultiAction {
|
|||
* @param a
|
||||
*/
|
||||
public void add(byte[] regionName, Action a) {
|
||||
add(regionName, Arrays.asList(a));
|
||||
add(regionName, Collections.singletonList(a));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.filter;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hadoop.hbase.Cell;
|
||||
|
@ -194,7 +195,7 @@ final public class FilterList extends FilterBase {
|
|||
* @param filter another filter
|
||||
*/
|
||||
public void addFilter(Filter filter) {
|
||||
addFilter(Arrays.asList(filter));
|
||||
addFilter(Collections.singletonList(filter));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,6 +54,7 @@ import java.net.InetSocketAddress;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -355,7 +356,7 @@ public final class FanOutOneBlockAsyncDFSOutputSaslHelper {
|
|||
throw new IOException(String.format("Invalid cipher suite, %s=%s",
|
||||
DFS_ENCRYPT_DATA_TRANSFER_CIPHER_SUITES_KEY, cipherSuites));
|
||||
}
|
||||
return Arrays.asList(new CipherOption(CipherSuite.AES_CTR_NOPADDING));
|
||||
return Collections.singletonList(new CipherOption(CipherSuite.AES_CTR_NOPADDING));
|
||||
}
|
||||
|
||||
private void sendSaslMessage(ChannelHandlerContext ctx, byte[] payload,
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.hadoop.hbase.master;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -63,7 +64,7 @@ public class RackManager {
|
|||
}
|
||||
// just a note - switchMapping caches results (at least the implementation should unless the
|
||||
// resolution is really a lightweight process)
|
||||
List<String> racks = switchMapping.resolve(Arrays.asList(server.getHostname()));
|
||||
List<String> racks = switchMapping.resolve(Collections.singletonList(server.getHostname()));
|
||||
if (racks != null && !racks.isEmpty()) {
|
||||
return racks.get(0);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import com.google.common.base.Preconditions;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -243,7 +244,7 @@ public class RegionStateStore {
|
|||
// Called when meta is not on master
|
||||
List<Put> list = shouldPutBarrier ?
|
||||
Arrays.asList(metaPut, MetaTableAccessor.makeBarrierPut(hri.getEncodedNameAsBytes(),
|
||||
openSeqNum, hri.getTable().getName())) : Arrays.asList(metaPut);
|
||||
openSeqNum, hri.getTable().getName())) : Collections.singletonList(metaPut);
|
||||
multiHConnection.processBatchCallback(list, TableName.META_TABLE_NAME, null, null);
|
||||
|
||||
} catch (IOException ioe) {
|
||||
|
|
Loading…
Reference in New Issue