Diff stringlengths 10 2k | Message stringlengths 28 159 |
|---|---|
package org.apache.accumulo.fate.zookeeper;
import org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock.QueueLock; | 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 ... | Replace this if-then-else statement by a single return statement. |
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; | Remove this call to "exit" or ensure it is really required. |
/**
* @deprecated since 1.4
* @use org.apache.accumulo.core.iterators.user.MinCombiner with MinCombiner.Type.STRING
*/ | 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 ... | Remove this hard-coded password. |
package org.apache.accumulo.examples.simple.constraints; | Rename "table" which hides the field declared at line 107. |
package org.apache.accumulo.test.randomwalk.shard;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison. |
// Used to specify the maximum # of versions of an Accumulo cell value to return
* Specify an Accumulo iterator type to manage the behavior of the underlying table scan this InputFormat's Record Reader will conduct, w/ priority dictating
* The Class RangeInputSplit. Encapsulates an Accumulo range for use in Map... | 2 duplicated blocks of code must be removed. |
public void cleanup() throws Exception {} | Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation. |
import org.apache.accumulo.core.util.MapCounter; | Cast one of the operands of this multiplication operation to a "long". |
* 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]*$'. |
public static byte[] getLockData(org.apache.accumulo.core.zookeeper.ZooCache zc, String path, Stat stat) {
return zc.get(path + "/" + lockNode, stat);
return getLockData(path, null);
}
public static byte[] getLockData(String path, Stat stat) {
return getLockData(getLockDataZooCache, path, stat); | 1 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.security.SecurityUtil;
private static final String DEFAULT_ROOT_USER = "root";
opts.rootuser = getRootUser(opts);
private static String getRootUser(Opts opts) throws IOException {
if (opts.cliUser != null) {
return opts.cliUser;
}
String rootuser;
rootuser =... | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
* 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 java.util.Arrays;
import org.apache.accumulo.core.data.ArrayByteSequence;
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.commons.collections.map.LRUMap;
final LRUMap validVisibilities = new LRUMap(1000);
Boolean wasChecked = (Boolean) validVisibilities.get(key.... | 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]*$'. |
new TCredentials(getPrincipal(context), getTokenClass(context), ByteBuffer.wrap(getToken(context)), getInstance(context).getInstanceID()))
.isEmpty()) {
Class<?> c = InputFormatBase.class.getClassLoader().loadClass("org.apache.hadoop.mapreduce.JobContext");
return (Configuration) ... | 2 duplicated blocks of code must be removed. |
* 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.tabletserver.thrift.TabletClientService.Iface;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor;
private MasterClientService.Client masterConnection(String address) {
MasterClientService.Client client = ThriftUtil.getClient(new MasterClientService... | Immediately return this expression instead of assigning it to the temporary variable "client". |
import org.apache.accumulo.server.util.PortUtils;
proxyPort = PortUtils.getRandomFreePort(); | Either log or rethrow this exception. |
import org.apache.accumulo.trace.instrument.Span;
import org.apache.accumulo.trace.instrument.Trace;
import org.apache.accumulo.trace.instrument.Tracer;
import org.apache.accumulo.trace.thrift.TInfo;
SortedSet<Column> fetchedColumns, List<IterInfo> serverSideIteratorList, Map<String,Map<String,String>> serverSide... | Remove this unused method parameter "retry". |
* 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.server.master.state;
import java.util.HashMap;
import java.util.Map;
import org.apache.hadoop.io.Text;
public class TableStats {
private Map<Text, TableCounts> last = new HashMap<Text, TableCounts>();
private Map<Text, TableCounts> next;
private long startScan = 0... | Return empty string instead. |
import org.apache.accumulo.core.iterators.user.VersioningIterator;
try {
client.testTableClassLoad(creds, doesNotExist, VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName());
fail("exception not thrown");
} catch (TableNotFoundException ex) {}
assertFalse(client.testTa... | 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 org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
Level l = getLogLevel(attempt.getConfiguration());
log.setLevel(getLogLevel(attempt.getConfiguration()));
this.simulate = getSimulationMode(attempt.getConfiguration());
this.createTables = canCreateTables(attempt.getConfiguration());
String tname = getDefaultTableName(attempt.getConfigu... | 1 duplicated blocks of code must be removed. |
import java.util.HashSet;
import org.apache.accumulo.core.client.impl.Tables;
public MutationsRejectedException(Instance instance, List<ConstraintViolationSummary> cvsList, HashMap<KeyExtent,Set<SecurityErrorCode>> hashMap,
super("# constraint violations : " + cvsList.size() + " security codes: " + format(ha... | Either log or rethrow this exception. |
} else
continue;
if (ret != null)
store.setProperty(tid, RETURN_PROP, ret);
if (span != null)
span.stop();
if (autoCleanUp)
store.setProperty(tid, AUTO_CLEAN_PROP, new Boolean(autoCleanUp));
if (store.getStatus(tid... | Remove this call to "exit" or ensure it is really required. |
if (!(o instanceof ThriftTransportKey))
return false;
if (hash == -1)
hash = (location + Integer.toString(port) + Long.toString(timeout)).hashCode(); | Remove this call to "exit" or ensure it is really required. |
/**
* Closes up the instance to free up all associated resources. You should try to reuse an Instance as much as you can because there is some location caching
* stored which will enhance performance.
* @throws AccumuloException
*/
public abstract void close() throws AccumuloException; | Move this variable to comply with Java Code Conventions. |
String seqTableName;
@Override
public void setUp(State state) throws Exception {
Connector conn = state.getConnector();
Instance instance = state.getInstance();
String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
seqTableName = String.format("sequential_%... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, "0".getBytes(), existsPolicy); | Rename this package name to match the regular expression '^[a-z]+(\.[a-z][a-z0-9]*)*$'. |
* Autogenerated by Thrift Compiler (0.9.0)
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
private byte __isset_bitfield = 0;
__isset_bitfield = other.__isset_bitfield;
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfiel... | Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'. |
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.util.Properties;
import org.apache.accumulo.server.mini.MiniAccumuloCluster;
import com.google.common.io.Files; | Return empty string instead. |
if (!source.hasNext())
throw new NoSuchElementException(); | 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 u... | Replace all tab characters in this file by sequences of white-spaces. |
import java.util.Arrays;
throw new Exception("dir " + reportDir + " is not empty: " + Arrays.asList(files)); | Remove this unused private "appendProp" method. |
if (e.getAuthorizationFailuresMap().isEmpty() == false) {
for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : e.getAuthorizationFailuresMap().entrySet()) { | Remove the literal "false" boolean value. |
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
public void initialize(String instanceId, boolean initialize) { | Remove this call to "exit" or ensure it is really required. |
package org.apache.accumulo.examples.simple.filedata; | Rename "table" which hides the field declared at line 107. |
private static final long serialVersionUID = 1L;
private static String getTableName(Instance instance, String tableId) {
if (tableId == null) return " <unknown table> ";
try {
String tableName = Tables.getTableName(instance, tableId);
return tableName + " (" + tableId + ")";
} catch (T... | 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 ... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
sb.append("var jsonurl = '" + url + "json';\n");
sb.append("var statNames = {");
sb.append("'").append(st).append("': ").append(st.derived).append(",");
sb.append("};\n");
sb.append("var maxStatValues = {");
sb.append("'").append(st).append("': ").append(st.getMax()).append(", ");
sb.set... | Method has 11 parameters, which is greater than 7 authorized. |
/**
* An input stream that reads file data stored in one or more Accumulo values. Used by {@link ChunkInputFormat} to present input streams to a mapper.
*/ | 1 duplicated blocks of code must be removed. |
List<IteratorSetting> iters = IteratorUtil.decodeIteratorSettings(hex.decode(tokens[i].split("=")[1].getBytes())); | Remove this unused method parameter "ex". |
import org.apache.accumulo.core.iterators.system.SynchronizedIterator;
// wrap the source in a SynchronizedIterator in case any of the additional configured iterators want to use threading
SortedKeyValueIterator<K,V> prev = new SynchronizedIterator<K,V>(source); | Move this constructor to comply with Java Code Conventions. |
import java.io.IOException;
import jline.ConsoleReader;
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.Printer;
final ConsoleReader reader = shellState.getReader();
AccumuloVFSClassLoader.printClassPath(new Printer() {
@Override
public void print(String s) {
try {
... | Either log or rethrow this exception. |
import org.apache.accumulo.core.security.Authorizations;
Scanner indexScanner1 = state.getConnector().createScanner(tmpIndexTableName, Authorizations.EMPTY);
Scanner indexScanner2 = state.getConnector().createScanner(indexTableName, Authorizations.EMPTY); | Remove this unused method parameter "range". |
package org.apache.accumulo.core.iterators.aggregation;
import org.apache.accumulo.core.data.Value;
public class StringMin implements Aggregator {
long min = Long.MAX_VALUE;
public Value aggregate() {
return new Value(Long.toString(min).getBytes());
}
public void collect(Value value) {
long l = Long.parse... | Return empty string instead. |
if (files.size() == 0)
throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no files");
if (prevRow == null)
throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no prevrow");
if (per == null)
val = new Value(val.get(), true);
... | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.core.Constants;
public static final String ENCODING_DEFAULT = Constants.UTF8.name(); | Move this variable to comply with Java Code Conventions. |
package org.apache.accumulo.start.classloader.vfs.providers;
import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject;
import org.apache.accumulo.start.classloader.vfs.providers.ReadOnlyHdfsFileProvider; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
private final AccumuloConfiguration conf;
private final FileSystem fs;
GarbageCollectWriteAheadLogs(FileSystem fs, AccumuloConfiguration conf) {
this.fs = fs;
this.conf = conf;
}
public void collect(GCStatus status) {
count = remove... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties; | Override the "equals" method in this class. |
import org.apache.accumulo.server.cli.ClientOpts;
import com.beust.jcommander.Parameter;
static public class Opts extends ClientOpts {
@Parameter(names={"-r", "--row"}, required=true, description="find tablets that contain this row")
String row = null;
@Parameter(names="--tableId", required=true, desc... | Remove this unused private "appendProp" method. |
import static org.junit.Assert.assertEquals;
import java.io.File;
@Test
public void testRawDefaultValues() {
AccumuloConfiguration conf = AccumuloConfiguration.getDefaultConfiguration();
assertEquals("${java.io.tmpdir}" + File.separator + "accumulo-vfs-cache-${user.name}", Property.VFS_CLASSLOADER_CACHE_... | 1 duplicated blocks of code must be removed. |
SortedSet<String> getCandidates() throws Exception {
Scanner scanner = instance.getConnector(credentials).createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
| Immediately return this expression instead of assigning it to the temporary variable "result". |
/**
* @since 1.5.0
*/
public Mutation(byte[] row) {
this(row, 0, row.length);
/**
* @since 1.5.0
*/
public Mutation(byte[] row, int start, int length) {
System.arraycopy(row, start, this.row, 0, length);
/**
* @since 1.5.0
*/
/**
* @since 1.5.0
*/
/**
* @since 1.5.0
*... | Move this constructor to comply with Java Code Conventions. |
// Just logging a warning, if data is gone then our work here is done. | Make the "log" logger private static final and rename it to comply with the format "LOG(?:GER)?". |
} else if (tablet.getNumEntriesInMemory() > 0) { | Either log or rethrow this exception. |
out.printf("write rate %6.2f%n", vals.size() / ((t2 - t1) / 1000.0));
out.printf("random lookup rate : %6.2f%n", 5000 / ((t2 - t1) / 1000.0));
out.printf("existant lookup rate %6.2f%n", 500 / ((t2 - t1) / 1000.0)); | Use isEmpty() to check whether the collection is empty or not. |
classnameTypeOpt = new Option("class", "class-name", true, "a java class that implements SortedKeyValueIterator");
regexTypeOpt = new Option("regex", "regular-expression", false, "a regex matching iterator");
versionTypeOpt = new Option("vers", "version", false, "a versioning iterator");
reqvisTypeOpt =... | 2 duplicated blocks of code must be removed. |
* 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.proxy.thrift.UserPass;
protected static ByteBuffer userpass;
userpass = tpc.proxy().login(new UserPass("root", ByteBuffer.wrap("".getBytes()))); | Immediately return this expression instead of assigning it to the temporary variable "connector". |
import java.nio.charset.Charset;
AccumuloInputFormat.setConnectorInfo(job, args[0], args[1].getBytes(Charset.forName("UTF-8")));
AccumuloOutputFormat.setConnectorInfo(job, args[0], args[1].getBytes(Charset.forName("UTF-8"))); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
@Test(timeout = 4 * 60 * 1000) | 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.util.Collection;
import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.hadoop.io.Text;
SortedSet<Text> splits = new TreeSet<Text>();
public void addSplits(SortedSet<Text> partitionKeys) {
splits.addAll(partitionKeys);
}
public Collection<Text> getSplits() {
return spl... | Either log or rethrow this exception. |
if (chopped) {
if (state.equals(TabletState.HOSTED)) {
this.chopped++;
} else if (!hasWALs) {
this.chopped++;
}
}
log.info("Computing next merge state for " + info.getRange() + " which is presently " + state + " isDelete : " + info.isDelete());
log.info(... | Do not forget to remove this deprecated code someday. |
// combine all columns
is = new IteratorSetting(1, SummingCombiner.class);
LongCombiner.setEncodingType(is, SummingCombiner.Type.STRING);
Combiner.setCombineAllColumns(is, true);
ai.init(new SortedMapIterator(tm1), is.getProperties(), null);
ai.seek(new Range(), EMPTY_COL_FAMS, false);... | Move this variable to comply with Java Code Conventions. |
import org.apache.accumulo.core.iterators.system.ColumnQualifierFilter;
ColumnQualifierFilter cf = new ColumnQualifierFilter(null, columns);
ColumnQualifierFilter cf = new ColumnQualifierFilter(null, columns);
ColumnQualifierFilter cf = new ColumnQualifierFilter(null, columns); | Define a constant instead of duplicating this literal "org.apache.accumulo.core.iterators.WholeRowIterator" 4 times. |
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.iterators.user.VersioningIterator;
public static Map<String,String> generateAggTableProperties(List<? extends PerColumnIteratorConfig> aggregators) {
Map<String,Str... | Remove this unused private "match" method. |
import java.nio.charset.Charset;
AccumuloInputFormat.setConnectorInfo(job, user, pass.getBytes(Charset.forName("UTF-8")));
AccumuloInputFormat.setInputTableName(job, table); | Either log or rethrow this exception. |
String array[] = authorizations.toArray(new String[0]);
Authorizations auths = new Authorizations(array); | Remove this unused "seekTime" private field. |
/*
* 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 since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.LargeRowFilter} | Either log or rethrow this exception. |
TKeyValue _elem10; // required
TKeyValue _elem15; // required | Remove this unused method parameter "table". |
package org.apache.accumulo.test.randomwalk.security;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison. |
DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes());
DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes());
Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes()); | Remove this unused method parameter "ex". |
/*
* 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. |
// this is a tool because when you run a mapreduce, you will need to use the
// ToolRunner
// if you want libjars to be passed properly to the map and reduce tasks
// even though this class isn't a mapreduce
@Override
public int run(String[] args) throws Exception {
if (args.length != 5) {
System.... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.util.shell.Token; | Replace all tab characters in this file by sequences of white-spaces. |
import org.apache.hadoop.mapreduce.Job;
@Override
public static void setSplitFile(Job job, String file) {
public static void setNumSubBins(Job job, int num) { | 2 duplicated blocks of code must be removed. |
package org.apache.accumulo.examples.wikisearch.normalizer;
public class LcNoDiacriticsNormalizer implements org.apache.accumulo.examples.wikisearch.normalizer.Normalizer { | 2 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.trace.instrument.Span;
import org.apache.accumulo.trace.instrument.Trace;
import org.apache.accumulo.trace.instrument.thrift.TraceWrap;
import org.apache.accumulo.trace.thrift.TInfo;
@Override
public v... | Remove this call to "exit" or ensure it is really required. |
if (obj == null)
return false;
if (obj instanceof RemoteLogger)
return getFileName().equals(((RemoteLogger) obj).getFileName()); | Remove this call to "exit" or ensure it is really required. |
public AuthenticationToken login(String principal, Properties properties) throws AccumuloSecurityException { | Remove this unused method parameter "principal". |
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
/*
* 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 Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException {
String tableId = Tables.getTableId(instance, tableName);
// the following method throws AccumuloException for some conditions that should be retried
MetadataTable.getEntries(instance, c... | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
*
Property minThreadProperty,
Property timeBetweenThreadChecksProperty,
| Replace all tab characters in this file by sequences of white-spaces. |
@Test
public void commentTest() throws IOException {
Shell.log.debug("Starting comment test --------------------------");
exec("#", true, "Unknown command", false);
exec("# foo", true, "Unknown command", false);
exec("- foo", true, "Unknown command", true);
} | Define a constant instead of duplicating this literal "Unknown command" 3 times. |
import java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + id + Constants.ZTABLE_FLUSH_ID, "0".getBytes(utf8), NodeExistsPolicy.SKIP);
zoo.putPersistentData(ZooUtil.getRoot(instance) + C... | Move this variable to comply with Java Code Conventions. |
package org.apache.accumulo.examples.simple.mapreduce; | 2 duplicated blocks of code must be removed. |
import org.apache.accumulo.core.Constants;
private long readaheadThreshold = Constants.SCANNER_DEFAULT_READAHEAD_THRESHOLD;
this.readaheadThreshold = scanner.getReadaheadThreshold();
smi.scanner.setReadaheadThreshold(readaheadThreshold);
@Override
public long getReadaheadThreshold() {
return readahea... | Move this constructor to comply with Java Code Conventions. |
List<TRange> _val22; // required
List<TRange> _val43; // required | Rename this package name to match the regular expression '^[a-z]+(\.[a-z][a-z0-9]*)*$'. |
if (fn == null)
return name;
if (selected == null)
return;
if (args.length == 8)
rootpath = args[7]; | 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.