Diff stringlengths 10 2k | Message stringlengths 28 159 |
|---|---|
import org.apache.accumulo.core.iterators.LongCombiner.FixedLenEncoder;
import org.apache.accumulo.core.iterators.LongCombiner.VarLenEncoder;
Encoder<Long> encoder = LongCombiner.VAR_LEN_ENCODER;
Encoder<Long> encoder = LongCombiner.VAR_LEN_ENCODER;
LongCombiner.setEncodingType(is, VarLenEncoder.class);
... | Either log or rethrow this exception. |
@Deprecated
@Override
ColumnUpdate upd = (ColumnUpdate) obj;
return Arrays.equals(getColumnFamily(), upd.getColumnFamily()) && Arrays.equals(getColumnQualifier(), upd.getColumnQualifier())
&& Arrays.equals(getColumnVisibility(), upd.getColumnVisibility()) && isDeleted() == upd.isDeleted() && Arra... | Return empty string instead. |
* <li>{@link AccumuloOutputFormat#setConnectorInfo(Job, String, AuthenticationToken)} OR {@link AccumuloOutputFormat#setConnectorInfo(Job, Path)}
* {@link CredentialHelper#asBase64String(org.apache.accumulo.core.security.thrift.TCredentials)}.
* the path to a file in the configured file system, containi... | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
public Repo<Master> call(long tid, Master master) throws Exception {
Instance instance = master.getInstance();
public void undo(long tid, Master master) throws Exception {
Instance instance = master.getInstance();
public Repo<Master> call(long tid, Master master) throws Exception {
tableInfo.table... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
static public InetSocketAddress parseAddress(String address, int defaultPort) throws NumberFormatException {
final String[] parts = address.split(":", 2);
if (parts.length == 2) {
if (parts[1].isEmpty()) return new InetSocketAddress(parts[0], defaultPort);
return new InetSocketAddress(parts[0], In... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
Connector conn = master.getConnector();
Instance instance = master.getInstance(); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode; | Move this constructor to comply with Java Code Conventions. |
import org.apache.accumulo.core.cli.Help;
import com.beust.jcommander.Parameter;
static class Opts extends Help {
@Parameter(names="--testId", required=true)
String testId;
@Parameter(names="--action", required=true, description="one of 'setup', 'teardown' or 'client'")
String action;
@Parameter(... | Remove this unused private "appendProp" method. |
private Key prevKey;
public BlockIndexEntry(int pos, int entriesLeft, Key prevKey) {
this.prevKey = prevKey;
this.prevKey = key;
return prevKey.compareTo(o.prevKey);
@Override
return prevKey + " " + entriesLeft + " " + pos;
}
public Key getPrevKey() {
return prevK... | Remove this unused private "appendProp" method. |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
if (e.getErrorCode().equals(SecurityErrorCode.TABLE_DOESNT_EXIST))
return new org.apache.accumulo.proxy.thrift.TableNotFoundException(e.toString()); | 2 duplicated blocks of code must be removed. |
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
final HashMap<String,String> props = new HashMap<String,String>();
final HashSet<String> exclude = new HashSet<String>();
for (String ke... | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
import java.util.HashMap;
SecurityHelper.setSystemConnector(state, sysConn);
SecurityHelper.setSysUserName(state, systemUserName);
SecurityHelper.setSysUserPass(state, sysUserPass);
SecurityHelper.setTableExists(state, false);
SecurityHelper.setTableExists(state, false);
SecurityHelper.setTabUse... | Either log or rethrow this exception. |
List<Text> range = ConcurrentFixture.generateRange(rand);
conn.tableOperations().compact(tableName, range.get(0), range.get(1), false, wait);
log.debug((wait ? "compacted " : "initiated compaction ") + tableName + " from " + range.get(0) + " to " + range.get(1));
log.debug("compact " + tableName +... | Define a constant instead of duplicating this literal " from " 3 times. |
osw.append(ExportTable.DATA_VERSION_PROP + ":" + ServerConstants.DATA_VERSION + "\n"); | Make the "audit" logger private static final and rename it to comply with the format "LOG(?:GER)?". |
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
public BatchWriterImpl(Instance instance, InstanceTokenWrapper credentials, String table, BatchWriterConfig config) { | Immediately return this expression instead of assigning it to the temporary variable "ret". |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
protected Class<? extends AuthenticationToken> tokenClass;
try {
tokenClass = Class.forName(props.getProperty("org.apache.accumulo.proxy.ProxyServer.tokenClass")).asSubclass(AuthenticationToken.class);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
AuthenticationTok... | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
import static org.apache.accumulo.core.data.Mutation.SERIALIZED_FORMAT.VERSION2;
@Override
protected ColumnUpdate newColumnUpdate(byte[] cf, byte[] cq, byte[] cv, boolean hasts, long ts, boolean deleted, byte[] val) {
return new ServerColumnUpdate(cf, cq, cv, hasts, ts, deleted, val, this); | Constructor has 8 parameters, which is greater than 7 authorized. |
private final Instance instance;
public ClientServiceHandler(Instance instance, TransactionWatcher transactionWatcher) {
this.instance = instance;
return instance.getZooKeepers();
return conf(new ServerConfiguration(instance).getConfiguration());
return conf(new ServerConfiguration(instance).get... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
conn.securityOperations().createUser(userName, (userName + "pass").getBytes()); | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
import org.apache.accumulo.server.ServerConstants;
import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.fs.VolumeManagerImpl;
public static String createTabletDirectory(VolumeManager fs, String tableId, Text endRow) {
String volume = fs.choose(ServerConstants.getTablesDirs());
... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
// TODO maybe remove from bad servers
log.error("unable to get tablet server status " + server + " " + ex.getMessage());
log.debug("unable to get tablet server status " + server, ex); | Remove this unused method parameter "lock". |
package org.apache.accumulo.server.tabletserver.log;
import java.util.Set;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.server.conf.ServerConfiguration;
public abstract class LoggerStrategy {
// Called by the tablet server to get the list of loggers to use from the available set
... | Return empty string instead. |
* This class remains here for backwards compatibility.
* @deprecated since 1.4
* @see org.apache.accumulo.core.iterators.user.LargeRowFilter
public class LargeRowFilter extends org.apache.accumulo.core.iterators.user.LargeRowFilter { | Remove this unused private "match" method. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.security.Credentials;
public ServicerForMetadataTable(Instance instance, Credentials credentials) { | Immediately return this expression instead of assigning it to the temporary variable "onlineTabletsForTable". |
import java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY).addWork(file, source.getBytes(utf8)); | Move this variable to comply with Java Code Conventions. |
if (topKey != null)
return;
if (sourceIter.hasTop() == false)
return;
if (sourceIter != null)
return new WholeRowIterator(sourceIter.deepCopy(env));
if (range.getEndKey() != null && followingRowKey.compareTo(range.getEndKey()) > 0)
return; | Remove this call to "exit" or ensure it is really required. |
if (tablePropCache == null)
synchronized (TableConfiguration.class) {
if (tablePropCache == null)
tablePropCache = new ZooCache(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), new TableConfWatcher(inst.getInstanceID()));
}
if (value != null)
log.error("Using def... | Remove this call to "exit" or ensure it is really required. |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
Instance instance = new ZooKeeperInstance(cluster.getConfig().getInstanceName(), cluster.getConfig().getZooKeepers()); | Either log or rethrow this exception. |
return new Credentials(getSysUserName(), getSysToken()).toThrift(this.state.getInstance());
return new Credentials(getTabUserName(), getTabToken()).toThrift(this.state.getInstance()); | Remove this hard-coded password. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.server.conf.ServerConfiguration;
private String bannerText;
private String bannerColor;
private String bannerBackground;
bannerText = sanitize(ServerConfiguration.getSystemConfiguration().get(Property.MONITOR_BANNER_TEXT));
bann... | Remove the literal "true" boolean value. |
@Test(timeout = 2 * 60 * 1000) | Either log or rethrow this exception. |
@Override | Make the "log" logger private static final and rename it to comply with the format "LOG(?:GER)?". |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
private static final int CORE_POOL_SIZE = 8;
private static final int MAX_POOL_SIZE = CORE_POOL_SIZE;
static String tableName = null;
@Override
public void visit(State state, Properties props) throws Exception {
Random rand = new Random();
tableName = Integer.toHexString(Math.abs(rand.nextInt())... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
public final static String PARTITIONED_INPUT_MIN_SPLIT_SIZE = "wikipedia.min.input.split.size";
public static long getMinInputSplitSize(Configuration conf) {
return conf.getLong(PARTITIONED_INPUT_MIN_SPLIT_SIZE, 1l << 27);
}
| Complete the task associated to this TODO comment. |
// Set the formatter property on the table | Either log or rethrow this exception. |
if (parts.length > 1)
addr = new InetSocketAddress(parts[0], Integer.parseInt(parts[1]));
else
addr = new InetSocketAddress(parts[0], 2181);
if (line.startsWith(" "))
clients++;
if (line.startsWith("Mode"))
mode = line.split... | Remove this call to "exit" or ensure it is really required. |
AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[0], args[1]);
AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[2], args[3].getBytes(), args[4], new Authorizations());
AccumuloInputFormat.addIterator(job.getConfiguration(), regex); | Remove this unused private "debugQuery" method. |
@Test(timeout = 2 * 60 *1000) | Either log or rethrow this exception. |
log.trace("Using existing connection to " + ttk.getLocation() + ":" + ttk.getPort() + " timeout " + ttk.getTimeout()); | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.core.security.Credentials;
private Credentials credentials;
serverQueue = serverQueues.get(location);
} catch (Exception e) {} finally {
locator.binMutations(credentials, mutations, binnedMutations, failures);
... | Immediately return this expression instead of assigning it to the temporary variable "onlineTabletsForTable". |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
@Deprecated | Remove this unused method parameter "ex". |
package org.apache.accumulo.fate.zookeeper; | Remove this call to "exit" or ensure it is really required. |
void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.math.BigInteger;
eid = new BigInteger(sa[1], 16).longValue(); | Return empty string instead. |
if (super.getTopKey().isDeleted()) | At most one statement is allowed per line, but 2 statements were found on this line. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
Long next = iter.next();
sum = safeAdd(sum, next); | Remove this call to "exit" or ensure it is really required. |
super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes()); | Remove this unused method parameter "ex". |
while ((totalMemUsed > maxMem || flushing) && !somethingFailed) { | Return empty string instead. |
import java.util.TreeMap; | Replace all tab characters in this file by sequences of white-spaces. |
public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
if (args.length < 5 || args.length > 7) {
System.out
.println("bin/accumulo accumulo.examples.helloworld.ReadData <instance name> <zoo keepers> <tablename> <username> <password> [st... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.commons.cli.OptionGroup;
OptionGroup nameGroup = new OptionGroup();
allOpt = new Option("a", "all", false, "delete all scan iterators");
nameGroup.addOption(nameOpt);
nameGroup.addOption(allOpt);
nameGroup.setRequired(true);
o.addOptionGroup(nameGroup); | 2 duplicated blocks of code must be removed. |
} else {
shellState.checkTableState();
tablesToFlush.add(shellState.getTableName()); | Define and throw a dedicated exception instead of using a generic one. |
shellState.getReader().flush();
shellState.getReader().println(String.format(fmt, args)); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
private static String principal;
private static AuthenticationToken token;
Connector connector = HdfsZooInstance.getInstance().getConnector(principal, token); | Immediately return this expression instead of assigning it to the temporary variable "connector". |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.core.util;
import org.apache.accumulo.core.data.ByteSequence;
public class ByteArrayBackedCharSequence implements CharSequence {
private byte[] data;
private int offset;
private int len;
public ByteArrayBackedCharSequence(byte[] data, int offset, int len){
this.data = data;
this.... | Return empty string instead. |
import org.apache.accumulo.core.client.security.SecurityErrorCode;
if (ae.getSecurityErrorCode().equals(SecurityErrorCode.PERMISSION_DENIED)) {
} else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) { | Do not forget to remove this deprecated code someday. |
import org.apache.accumulo.core.util.RootTable;
if (pr.getTableName().equals(MetadataTable.ID) || pr.getTableName().equals(RootTable.ID)) { | Reduce this switch case number of lines from 12 to at most 5, for example by extracting code into methods. |
/**
* This iterator facilitates document-partitioned indexing. It is an example of extending the IntersectingIterator to customize the placement of the term and
* docID. It expects a table structure of the following form:
*
* row: shardID, colfam: docColf\0type, colqual: docID, value: doc
*
* row: shardID, colf... | Refactor this code to not nest more than 3 if/for/while/switch/try statements. |
import org.apache.accumulo.core.cli.ClientOnRequiredTable;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOnRequiredTable {
@Parameter(names="--output", description="output directory", required=true)
String output;
@Parameter(names="--columns", description="columns to extract, ... | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.core.util.ServerServices.Service;
static volatile boolean warnedAboutTServersBeingDown = false;
if (!opened) {
if (!warnedAboutTServersBeingDown) {
if (servers.isEmpty()) {
log.warn("There are no tablet servers: check that zookeeper and tablet servers ar... | Move this variable to comply with Java Code Conventions. |
private TabletServerStatus status;
private TServerInstance instance;
public TServerUsesLoggers(TServerInstance instance, TabletServerStatus status) {
this.instance = instance;
this.status = status;
}
@Override
public Set<String> getLoggers() {
return Collections.unmodifiableSet(status.l... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.util.List;
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 1l), new Value("val1".getBytes()));
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq2"), new Text("cv1"), 2l), new Value("val2".getBytes()));
map.put(new Key(new Text("r2"), new Text("cf1")... | Replace all tab characters in this file by sequences of white-spaces. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.security.thrift.Credential;
public void initializeSecurity(Credential itw, String rootuser) throws AccumuloSecurityException { | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.cli.ClientOnRequiredTable;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOnRequiredTable {
@Parameter(names="--num", required=true)
int num = 0;
@Parameter(names="--min")
long min = 0;
@Parameter(names="--max")
long max = Long.MAX_VALUE... | Remove this call to "exit" or ensure it is really required. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
if (!shellState.getConnector().tableOperations().exists(tableName))
throw new TableNotFoundException(null, tableName, null);
if (text == null)
return null; | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.server.iterators.MetadataBulkLoadFilter;
initialMetadataConf.put(Property.TABLE_ITERATOR_PREFIX.getKey() + "majc.bulkLoadFilter", "20," + MetadataBulkLoadFilter.class.getName()); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.cli.BatchWriterOpts;
BatchWriterOpts bwOpts = new BatchWriterOpts();
opts.parseArgs(InsertWithBatchWriter.class.getName(), args, bwOpts);
MultiTableBatchWriter mtbw = connector.createMultiTableBatchWriter(bwOpts.getBatchWriterConfig()); | Remove this unused method parameter "opts". |
public void setUser(String s) {
this.user = s;
}
| Remove this unused method parameter "ex". |
* jdwpEnabled=true
if (opts.prop.containsKey("jdwpEnabled"))
config.setJDWPEnabled(Boolean.parseBoolean(opts.prop.getProperty("jdwpEnabled"))); | Define a constant instead of duplicating this literal "superSecret" 3 times. |
import org.apache.accumulo.core.client.mapreduce.lib.util.OutputConfigurator; | Either log or rethrow this exception. |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.security.tokens.PasswordToken;
import org.apache.accumulo.core.security.tokens.SecurityToken; | Replace all tab characters in this file by sequences of white-spaces. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.instamo;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Ve... | Remove this unused private "appendProp" method. |
package org.apache.accumulo.examples.simple.filedata; | 2 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.security.thrift.Credential;
private Credential credentials;
public Writer(Instance instance, Credential credentials, Text table) {
public Writer(Instance instance, Credential credentials, String table) {
private static void updateServer(Mutation m, KeyExtent extent, String server... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.util.List;
List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.get(shellState.getTableName());
if (tableScanIterators == null) {
Shell.log.debug("Found no scan iterators to set");
}
Shell.log.debug("Found " + tableScanIterators.size() + " scan iterators to set");
... | Remove the literal "true" boolean value. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.iterators.LongCombiner;
import org.apache.accumulo.core.iterators.user.SummingCombiner;
TableOperations tableOps = state.getConnector().tableOperations();
if (!... | This block of commented-out lines of code should be removed. |
@SuppressWarnings("all") public enum ScanState implements org.apache.thrift.TEnum { | 300 duplicated blocks of code must be removed. |
package org.apache.accumulo.server.test;
import java.io.IOException;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.file.map.MyMapFile;
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.hadoop.conf.Configuration;
import o... | Return empty string instead. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.