Diff stringlengths 10 2k | Message stringlengths 28 159 |
|---|---|
import org.apache.accumulo.core.security.tokens.AccumuloToken;
public static synchronized TabletLocator getInstance(Instance instance, AccumuloToken<?,?> credentials, Text tableId) {
return getInstance(instance, new InstanceTokenWrapper(credentials, instance.getInstanceID()), tableId);
}
| Return empty string instead. |
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.RootTable;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
if (TabletsSection.TabletColumnFamily.PREV_ROW_CO... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
zoo.putPersistentData(path, "forced down".getBytes(), NodeExistsPolicy.OVERWRITE); | Remove this unused method parameter "ex". |
import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.server.util.TServerUtils.ServerAddress;
ServerAddress sa = TServerUtils.startServer(getSystemConfiguration(), hostname, Property.MASTER_CLIENTPORT, processor, "Master",
"Master Client Service Handler", null, Property.MASTER_MINTHRE... | 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]*$'. |
import org.apache.accumulo.fate.Repo; | Remove this call to "exit" or ensure it is really required. |
getSource().seek(range, colFamSet, inclusive);
getSource().seek(range, colFamSet, inclusive);
super.seek(range, colFamSet, inclusive); | Use "Integer.toString" instead. |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
private final AccumuloConfiguration conf;
TabletClientService.Iface client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
TabletClientService.Iface client = ThriftUtil.getClient(new TabletClientService.Client.Fac... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.security.SecurityUtil;
import org.apache.accumulo.trace.instrument.CountSampler;
import org.apache.accumulo.trace.instrument.Sampler;
import org.apache.accumulo.trace.instrument.Span;
import org.apache.accumulo.trace.instrument.Trace;
import org.apache.accumulo.trace.instrument.thrift.Tr... | Remove this call to "exit" or ensure it is really required. |
package util;
import org.apache.accumulo.core.data.Key;
public class KeyParser extends BaseKeyParser
{
public static final String SELECTOR_FIELD = "selector";
public static final String DATATYPE_FIELD = "dataType";
public static final String FIELDNAME_FIELD = "fieldName";
public static final String UI... | Return empty string instead. |
@SuppressWarnings("all") public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fields>, java.io.Serializable, Cloneable { | 13 duplicated blocks of code must be removed. |
log.info("Instance " + config.getInstance().getInstanceID());
| Define a constant instead of duplicating this literal " for table " 4 times. |
private SortedKeyValueIterator<Key,Value> source;
private Key key;
private Value value;
@Override
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
this.source = source;
}
@Override
public boolean hasTop() {
... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.server.conf.ServerConfiguration;
/**
* Initialize the memory manager.
*
* @param conf
*/
void init(ServerConfiguration conf);
| Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.server.test.continuous.ContinuousWalk.RandomAuths;
private static String authsFile = null;
} else if (args[i].equals("--auths")) {
authsFile = args[++i];
+ " [--debug <debug log>] [--auths <file>] <instance nam... | Remove this unused method parameter "r". |
public class RenameIT extends SimpleMacIT {
String name1 = makeTableName();
String name2 = makeTableName();
opts.tableName = name1;
c.tableOperations().rename(name1, name2);
vopts.tableName = name2;
c.tableOperations().delete(name1);
c.tableOperations().rename(name2, name1);
vopts.tableN... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.cloudtrace.instrument.receivers; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
/**
* indicates a variable-length encoding of a list of Longs using {@link SummingArrayCombiner.VarLongArrayEncoder}
*/
VARLEN,
/**
* indicates a fixed-length (8 bytes for each Long) encoding of a list of Longs using {@link SummingArrayCombiner.FixedLongArrayEncoder}
*/
FIXEDLEN,
... | Do not forget to remove this deprecated code someday. |
/*
* 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]*$'. |
import org.apache.accumulo.trace.instrument.Tracer; | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
import java.io.File;
static TemporaryFolder tempFolder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
| Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.server.mini; | This block of commented-out lines of code should be removed. |
tpc.proxy().update(writer, mutations);
tpc.proxy().closeWriter(writer);
String cookie = tpc.proxy().createScanner(userpass, testTable, null);
ScanResult kvList = tpc.proxy().nextK(cookie, k); | Either log or rethrow this exception. |
AccumuloApp.run(accumulo.getInstanceName(), accumulo.getZooKeepers(), "superSecret", new String[0]); | Define a constant instead of duplicating this literal "digest" 13 times. |
import org.apache.accumulo.core.util.shell.ShellOptionsJC;
protected void setInstance(ShellOptionsJC options) {
java.util.Scanner scanner = new java.util.Scanner(execFile); | Either log or rethrow this exception. |
import java.util.concurrent.TimeUnit;
this.timeOut = scanner.getTimeout(TimeUnit.MILLISECONDS);
smi.scanner.setTimeout(timeOut, TimeUnit.MILLISECONDS);
public void setTimeOut(int timeOut) {
if (timeOut == Integer.MAX_VALUE)
setTimeout(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
else
setTimeout... | Move this constructor to comply with Java Code Conventions. |
addScanIterators(shellState, cl, scanner, tableName); | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
package org.apache.accumulo.wikisearch.iterator;
import org.apache.accumulo.wikisearch.function.QueryFunctions;
import org.apache.accumulo.wikisearch.util.FieldIndexKeyParser; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.minicluster; | 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 u... | Replace all tab characters in this file by sequences of white-spaces. |
import java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(utf8), | Move this variable to comply with Java Code Conventions. |
import org.apache.accumulo.core.util.AddressUtil; | 2 duplicated blocks of code must be removed. |
@Test(timeout = 4 * 60 * 1000) | Replace this use of System.out or System.err by a logger. |
conn.tableOperations().listSplits(t); | Either log or rethrow this exception. |
if (s.length() >= width)
return s; | Remove this call to "exit" or ensure it is really required. |
if (failures != null && failures.length > 0) {
throw new Exception(failures.length + " failure files found importing files from " + dir);
} | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.Instance;
private Instance instance = null;
TableConfWatcher(Instance instance) {
this.instance = instance;
String tablesPrefix = ZooUtil.getRoot(instance) + Constants.ZTABLES + "/";
ServerConfiguration.getTableConfiguration(instance, tableId).propertyChanged... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.examples.filedata;
import java.util.ArrayList;
import org.apache.hadoop.io.Text;
public class KeyUtil {
public static final byte[] nullbyte = new byte[]{0};
public static Text buildNullSepText(String... s) {
Text t = new Text(s[0]);
for (int i = 1; i < s.length; i++) {
t.append(... | Return empty string instead. |
import org.apache.accumulo.core.util.shell.commands.PingCommand;
Command[] debuggingCommands = {new ClasspathCommand(), new DebugCommand(), new ListScansCommand(), new ListCompactionsCommand(), new TraceCommand(),
new PingCommand()}; | 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]*$'. |
if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
throw new TableOfflineException(instance, tableId);
if (tableops == null)
tableops = new TableOperationsImpl(instance, credentials);
if (secops == null)
secops = new SecurityOperationsImpl(instance, credentials);
if (in... | Remove this call to "exit" or ensure it is really required. |
package org.apache.accumulo.examples.wikisearch.parser;
import org.apache.accumulo.examples.wikisearch.parser.QueryParser.QueryTerm; | Rename "table" which hides the field declared at line 107. |
@Test(timeout = 2 * 60 * 1000)
String tableName = makeTableName();
c.tableOperations().create(tableName);
BatchWriter bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig());
getConnector().tableOperations().flush(tableName, null, null, true);
getConnector().tableOperations().set... | 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 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... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
@Deprecated | Return empty string instead. |
return "Metadata Tablets"; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.ac... | Remove this empty statement. |
@Override | Either log or rethrow this exception. |
appendProp(fileWriter, Property.TRACE_TOKEN_PROPERTY_PREFIX + ".password", config.getRootPassword(), siteConfig); | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
private static final long serialVersionUID = 1L;
| Rename this class name 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. |
new_.putPersistentData(path, newInstanceId.getBytes(), NodeExistsPolicy.OVERWRITE); | Remove this unused method parameter "ex". |
* <li>{@link AccumuloRowInputFormat#setConnectorInfo(Job, String, AuthenticationToken)} | 3 duplicated blocks of code must be removed. |
if (source == null)
throw new IllegalStateException("getting null source");
if (source == null)
throw new IllegalStateException("no source set");
if (seenSeek == false)
throw new IllegalStateException("never been seeked");
if (source == null)
throw new IllegalStateException("no s... | 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]*$'. |
nextEvent.event("tablet %s was loaded on %s", tablet, serverName);
nextEvent.event("tablet %s was unloaded from %s", tablet, serverName);
if (tls.walogs.isEmpty() && tls.chopped)
return TabletGoalState.UNASSIGNED;
return TabletGoalState.HOSTED;
... | The Cyclomatic Complexity of this method "update" is 13 which is greater than 10 authorized. |
* OptionDescribers will need to implement two methods: {@code describeOptions()} which returns an instance of {@link IteratorOptions} and
* {@code validateOptions(Map<String,String> options)} which is intended to throw an exception or return false if the options are not acceptable.
* IteratorOptions holds the na... | Replace this use of System.out or System.err by a logger. |
if (Trace.isTracing())
span.data("length", Integer.toString(length));
if (Trace.isTracing())
span.data("length", Integer.toString(length));
if (Trace.isTracing())
span.data("length", Integer.toString(buffer.length)); | 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]*$'. |
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
import org.apache.accumulo.trace.instrument.TraceRunnable;
import org.apache.accumulo.trace.instrument.Tracer; | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 300 duplicated blocks of code must be removed. |
import org.apache.accumulo.proxy.thrift.PrincipalToken;
protected static PrincipalToken userpass;
userpass = new PrincipalToken("root", ByteBuffer.wrap("".getBytes()));
public void ping() throws Exception {
tpc.proxy().ping(userpass);
}
@Test | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
import org.apache.accumulo.core.security.tokens.UserPassToken;
Connector connector = instance.getConnector(new UserPassToken("root",""));
InstanceTokenWrapper auths = new InstanceTokenWrapper(new UserPassToken("root", ""), "instance"); | Immediately return this expression instead of assigning it to the temporary variable "ret". |
public void initialize(String instanceId, boolean initialize) { | Remove this call to "exit" or ensure it is really required. |
CreateRFiles.main(new String[] { "--output", "tmp/testmf", "--numThreads", "8", "--start", "0", "--end", "100000", "--splits", "99"});
VerifyIngest.main(new String[] {"--timestamp", "1", "--size", "50", "--random", "56", "--rows", "100000", "--start", "0", "--cols", "1"}); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
scanner.fetchColumnFamily(BulkPlusOne.CHECK_COLUMN_FAMILY); | This block of commented-out lines of code should be removed. |
@Override
public void cleanup() throws Exception {}
@Override
public Map<String,String> getInitialConfig() {
Map<String,String> props = new HashMap<String,String>();
props.put(Property.TSERV_MAJC_DELAY.getKey(), "1s");
return props;
}
@Override
public List<TableSetup> getTablesToCreat... | 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]*$'. |
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 300 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.client.impl.thrift.ClientService.Iface;
import org.apache.accumulo.core.util.Pair;
public Repo<Master> call(final long tid, final Master master) throws Exception {
if (master.onlineTabletServers().size() == 0)
while (master.onlineTabletServers().size() == 0) {
for (fi... | The Cyclomatic Complexity of this method "call" is 13 which is greater than 10 authorized. |
package sample;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
publ... | Return empty string instead. |
/*
* 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 java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(utf8)));
connector = serverConfiguration.getInstance().getConnector(conf.get(Property... | Move this variable to comply with Java Code Conventions. |
if (!shutdownState.equals(ShutdownState.REGISTERED))
throw new LoggerClosedException();
if (!root.startsWith("/"))
root = System.getenv("ACCUMULO_HOME") + "/" + root;
else if (root.equals(""))
root = System.getProperty("org.apache.accumulo.core.dir.log");
if (fileLock == null... | 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]*$'. |
log.info("Recovery complete for " + extent + " using " + logfile); | Move this variable to comply with Java Code Conventions. |
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig()); | Remove this unused method parameter "e". |
package org.apache.accumulo.core.iterators.aggregation;
import org.apache.accumulo.core.data.Value;
public class StringSummation implements Aggregator {
long sum = 0;
public Value aggregate() {
return new Value(Long.toString(sum).getBytes());
}
public void collect(Value value) {
sum += Long.parseLong(new ... | Return empty string instead. |
import static org.junit.Assert.*;
assertEquals(8, moved);
assertEquals(48, moved); | 6 duplicated blocks of code must be removed. |
private TabletLocator locator;
this.locator = new TimeoutTabletLocator(TabletLocator.getInstance(instance, credentials, new Text(table)), timeout);
binRanges(locator, ranges, binnedRanges);
binRanges(locator, allRanges, binnedRanges);
locator.invalidateCache(tsFailures.keySet());
locat... | Move this constructor to comply with Java Code Conventions. |
/*
* 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 java.util.Set; | 2 duplicated blocks of code must be removed. |
resp.setContentType("text/xml;charset=UTF-8");
sb.append("<osload>").append(status.osLoad).append("</osload>\n");
sb.append("<ingest>").append(summary.ingestRate).append("</ingest>\n");
sb.append("<query>").append(summary.queryRate).append("</query>\n"); | Remove the literal "false" boolean value. |
import org.apache.hadoop.io.MapFile;
FileStatus dataStatus = fs.getFileStatus(new Path(fileStatus.getPath(), MapFile.DATA_FILE_NAME)); | Remove this unused method parameter "acuconf". |
rands[i] = (r.nextLong() & 0x7fffffffffffffffl) % 10000000000l; | 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. |
/*
* 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. |
if (iter != null) {
mdScanner.close();
iter = null;
}
if (iter == null)
return false;
if (!result) {
close();
}
try {
return fetch();
} catch (RuntimeException ex) {
try {
close();
} catch (Exception e) {
log.error(e, e);
}
... | Do not forget to remove this deprecated code someday. |
* 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]*$'. |
tops.setProperty(indexTableName, stem, "19,org.apache.accumulo.examples.wikisearch.iterator.TotalAggregatingIterator");
tops.setProperty(indexTableName, stem + "*", "org.apache.accumulo.examples.wikisearch.aggregator.GlobalIndexUidAggregator");
tops.setProperty(reverseIndexTableName, stem, "19,o... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
* @deprecated since 1.4, use {@link TableOperations#attachIterator(String tableName, IteratorSetting setting)} | Do not forget to remove this deprecated code someday. |
*
*
*
*
*
* | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.accumulo.core.cli.Help;
import com.beust.jcommander.Parameter;
* $ ./bin/accumulo accumulo.server.test.functional.RunTests --tests /user/hadoop/tests --output /user/hadoop/results
static class Opts extends Help {
@Parameter(names="--tests", description="newline separated list of tests to run"... | Remove this unused private "appendProp" method. |
@Override
@Override
public int hashCode() {
return uris.hashCode() + (preDelegation ? Boolean.TRUE : Boolean.FALSE).hashCode();
}
return getClassLoader(context).loadClass(classname).asSubclass(extension); | Reduce the number of conditional operators (6) used in the expression (maximum allowed 3). |
import org.apache.accumulo.server.cli.ClientOpts;
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOpts {
@Parameter(names="--classname", required=true, description="name of the... | Remove this unused private "appendProp" 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 ... | 296 duplicated blocks of code must be removed. |
import org.apache.accumulo.fate.AdminUtil;
import org.apache.accumulo.fate.ZooStore;
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
AdminUtil<Master> admin = new AdminUtil<Master>();
String masterPath = ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK;
admin.prepFail(zs, masterPat... | Remove this call to "exit" or ensure it is really required. |
if (numSubBins < 2)
return index;
if (cutPointArray == null)
throw new FileNotFoundException(cutFileName + " not found in distributed cache"); | Remove this call to "exit" or ensure it is really required. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.