Diff stringlengths 10 2k | Message stringlengths 28 159 |
|---|---|
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.accumulo.core.security.thrift;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
public enum SecurityErrorCode implements org.apache.thrift.TEnum {
DEFAULT_SECU... | Return empty string instead. |
import org.apache.accumulo.core.security.SystemPermission;
Connector conn = SecurityHelper.getSystemConnector(state);
String tableName = SecurityHelper.getTableName(state);
boolean exists = SecurityHelper.getTableExists(state);
boolean hasPermission = false;
if (SecurityHelper.getSysPerm(state, Secu... | Either log or rethrow this exception. |
connector.securityOperations().changeUserAuthorizations(username, labelAuths);
| Rename the "log" logger 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. |
/*
* 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.thrift.Credential;
import org.apache.accumulo.core.security.thrift.tokens.NullToken;
import org.apache.accumulo.core.security.thrift.tokens.SecurityToken;
public class InsecureAuthenticator extends org.apache.accumulo.core.security.handler.InsecureAuthenticator implements Authen... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.test.continuous.ContinuousIngest;
import org.apache.accumulo.test.continuous.ContinuousVerify; | Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison. |
import org.apache.accumulo.core.security.tokens.UserPassToken;
import org.junit.Assert;
return instance.getConnector(new UserPassToken("user", "pass")).tableOperations();
Connector c = instance.getConnector(new UserPassToken("user", "pass".getBytes())); | 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.LinkedHashMap;
/**
* The OptionDescriber interface allows you to set up iterator properties interactively in the accumulo shell. If your iterator and/or filter must implement
* this interface for the interactive part. The alternative would be to manually set configuration options with the config -t t... | 1 duplicated blocks of code must be removed. |
package org.apache.accumulo.examples.simple.dirlist;
import org.apache.accumulo.examples.simple.filedata.FileDataIngest; | Rename "table" which hides the field declared at line 107. |
private static final Logger log = Logger.getLogger(UtilWaitThread.class);
public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
} | 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. |
filter.init(new SortedMapIterator(tm), is.getOptions(), null);
filter.init(new SortedMapIterator(tm), is.getOptions(), null);
filter2.init(filter, is.getOptions(), null);
filter.init(new SortedMapIterator(tm), is.getOptions(), null);
a.init(new SortedMapIterator(tm), is.getOptions(), null);
a.in... | Refactor this code to not nest more than 3 if/for/while/switch/try statements. |
import java.nio.ByteBuffer;
import org.apache.accumulo.core.security.thrift.Credentials;
public static final String SYSTEM_PRINCIPAL = "!SYSTEM";
private static final byte[] SYSTEM_TOKEN = makeSystemPassword();
private static final Credentials systemCredentials = new Credentials(SYSTEM_PRINCIPAL, ByteBuffer.wrap(... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.security.tokens.NullToken;
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 not u... | Replace all tab characters in this file by sequences of white-spaces. |
// 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);... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.client.BatchWriterConfig;
public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config)
throws TableNotFoundException {
return createBatchDeleter(tableName, authori... | Remove this unused method parameter "e". |
package org.apache.accumulo.test; | Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison. |
if (!caught)
throw new Exception("Scan did not fail");
if (!caught)
throw new Exception("batch scan did not fail");
if (!caught)
throw new Exception("Scan did not fail"); | Remove this call to "exit" or ensure it is really required. |
if (initialSize == 0)
initialSize++; | Remove this call to "exit" or ensure it is really required. |
*
*
*
*
*
*
*
*
*
*
*
*
| Replace all tab characters in this file by sequences of white-spaces. |
* This iterator facilitates document-partitioned indexing. It involves grouping a set of documents together and indexing those documents into a single row of
* an Accumulo table. This allows a tablet server to perform boolean AND operations on terms in the index.
*
* The table structure should have the following f... | 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]*$'. |
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.fetch(scanner);
if (!TabletsSection.TabletColumnFamily... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
import org.apache.accumulo.core.client.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
if (scope == IteratorScope.majc)
throw new IllegalArgumentException("must set if compaction is full");
if (scope == IteratorScope.majc)
throw new IllegalArgumentException("must set if compaction is full");
if (scope != IteratorScope.majc)
throw new IllegalArgumentException("Tried to set ma... | Remove this call to "exit" or ensure it is really required. |
final Map<Path,List<KeyExtent>> assignmentFailures; | Move this variable to comply with Java Code Conventions. |
import org.apache.accumulo.core.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.security.tokens.PasswordToken; | 1 duplicated blocks of code must be removed. |
import org.apache.accumulo.trace.thrift.RemoteSpan; | Define a constant instead of duplicating this literal "sender" 20 times. |
import org.apache.accumulo.fate.zookeeper.ZooCache; | Remove this call to "exit" or ensure it is really required. |
package org.apache.accumulo.server.data;
import org.apache.accumulo.core.data.ColumnUpdate;
public class ServerColumnUpdate extends ColumnUpdate {
ServerMutation parent;
public ServerColumnUpdate(ColumnUpdate update, ServerMutation serverMutation) {
super(update.getColumnFamily(), update.getColumnQualifie... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.server.security.SystemCredentials;
MetaDataTableScanner s = new MetaDataTableScanner(zki, SystemCredentials.get().getAsThrift(), tableRange); | Move this constructor to comply with Java Code Conventions. |
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
ClassLoader cl = AccumuloVFSClassLoader.getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
runTMP = AccumuloVFSClassLoader.loadClass("org.apache.accumulo.server.master.Master");
runTMP = AccumuloVFSClas... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.server.conf.ServerConfiguration;
ServerConfiguration conf = new ServerConfiguration(instance);
gc.init(fs, conf, auth); | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.util.MapCounter; | Cast one of the operands of this multiplication operation to a "long". |
* Autogenerated by Thrift Compiler (0.9.0)
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
@SuppressWarnings("all") public class ThriftSecurityException extends TException implements org.apache.thrift.TBase<ThriftSecurityException, Thri... | Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.server.cli;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.server.client.HdfsZooInstance;
public class ClientOpts extends org.apache.accumulo.cor... | Remove this call to "exit" or ensure it is really required. |
auditConnector.tableOperations().clone(OLD_TEST_TABLE_NAME, NEW_TEST_TABLE_NAME, true, Collections.<String,String>emptyMap(), Collections.<String>emptySet()); | 2 duplicated blocks of code must be removed. |
@Test(timeout = 10 * 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 org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
if (TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.equals(new Text(cu.getColumnFamily()), new Text(cu.getColumnQualifier())) && !cu.isDeleted()) { | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
* Initiate a flush of a table's data that is in memory
* Flush a table's data that is currently in memory.
* Sets a property on a table. Note that it may take a short period of time (a second) to propagate the change everywhere.
* Removes a property from a table. Note that it may take a short period of tim... | Move the "500M" string literal on the left side of this string comparison. |
/**
package org.apache.accumulo.core.util;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
*
*/
public class SimpleThreadPool extends ThreadPoolExecutor {
public SimpleThreadPool(int max, final String name) {
super(0... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
private Option nameOpt, allOpt;
String tableName = OptUtil.configureTableOpt(cl, shellState);
o.addOption(OptUtil.tableOpt("table to delete scan iterators from")); | Reduce this switch case number of lines from 8 to at most 5, for example by extracting code into methods. |
import org.apache.accumulo.core.security.thrift.Credentials;
void send(Credentials info, String serverName, MasterClientService.Iface client) throws TException, ThriftSecurityException; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
public static synchronized TabletLocator getInstance(Instance instance, InstanceTokenWrapper credentials, Text tableId) { | Immediately return this expression instead of assigning it to the temporary variable "ret". |
client = MasterClient.getConnectionWithRetry(HdfsZooInstance.getInstance()); | Refactor this code to not nest more than 3 if/for/while/switch/try statements. |
package org.apache.accumulo.server.tabletserver.compaction;
import java.io.IOException;
import java.util.List;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.file.FileSKVWriter;
/**
* The interface for customizing major compactions.
*/
public i... | Immediately return this expression instead of assigning it to the temporary variable "openReader". |
public Instance instance;
public String username;
public byte[] password;
public InstanceUserPassword(Instance instance, String username, String password) {
this.instance = instance;
this.username = username;
this.password = password.getBytes();
} | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
public abstract byte byteAt(int i);
public abstract int length();
public abstract ByteSequence subSequence(int start, int end);
// may copy data
public abstract byte[] toArray();
public abstract boolean isBackedByArray();
public abstract byte[] getBackingArray();
public abstract int... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.examples.wikisearch.aggregator;
import org.apache.accumulo.examples.wikisearch.aggregator.TextIndexAggregator;
import org.apache.accumulo.examples.wikisearch.protobuf.TermWeight;
import org.apache.accumulo.examples.wikisearch.protobuf.TermWeight.Info.Builder; | Rename "table" which hides the field declared at line 107. |
import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.cli.BatchScannerOpts;
import org.apache.accumulo.core.cli.ClientOnRequiredTable;
import com.beust.jcommander.Parameter;
public static class Opts extends ClientOnRequiredTable {
@Parameter(names="--min", description="miniumum row that will be ... | Remove this unused private "appendProp" method. |
package org.apache.accumulo.server.test.randomwalk.concurrent;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.server.test.randomwalk.State;
impor... | Return empty string instead. |
Map<String,List<Long>> cleanedUp = new HashMap<String,List<Long>>();
txids = cleanedUp.get(txType);
if (txids == null)
txids = new ArrayList<Long>();
if (txids.contains(txid))
throw new IllegalStateException("transaction was started but not cleaned up");
txids.add(txi... | Return empty string instead. |
import org.apache.accumulo.server.util.AddressUtil; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
return null;
return k.getColumnFamily().toString();
idx = sKey.indexOf("\0");
log.debug("overallRange " + overallRange + " topKey " + this.root.getTopKey() + " contains " + overallRange.contains(this.root.getTopKey()));
| Remove this unused "seekTime" private field. |
/**
* @deprecated since 1.4
* @use org.apache.accumulo.core.iterators.user.MaxCombiner with MaxCombiner.Type.STRING
*/ | Either log or rethrow this exception. |
private final ServerConfiguration conf;
* @param instance
FileManager(ServerConfiguration conf, FileSystem fs, int maxOpen, BlockCache dataCache, BlockCache indexCache) {
this.conf = conf;
this.maxIdleTime = conf.getConfiguration().getTimeInMillis(Property.TSERV_MAX_IDLE);
FileSKVIterator read... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; | 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... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.core.iterators.filter;
import java.util.HashSet;
import junit.framework.TestCase;
import org.apache.accumulo.core.data.Column;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.filter.ColumnQualifierFilter;
impo... | Return empty string instead. |
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions())); | Remove this unused private "appendProp" method. |
byte[] nid = zoo.mutate(ntp, "0".getBytes(), ZooUtil.PUBLIC, new Mutator() {
return nextId.toString(Character.MAX_RADIX).getBytes();
String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/" + new String(Base64.encodeBase64(directory.getBytes()));
String resvPath = ZooUtil... | Remove this unused private "appendProp" method. |
import org.apache.http.annotation.ThreadSafe;
@ThreadSafe | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
column.fetch(scanner);
Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner); | Replace all tab characters in this file by sequences of white-spaces. |
org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin();
struct.properties = new HashMap<String,String>(2*_map52.size);
for (int _i53 = 0; _i53 < _map52.size; ++_i53)
String _key54; // required
String _val55; // required
... | 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. |
datafileManager.bringMajorCompactionOnline(smallestFiles, compactTmpName, fileName,
filesToCompact.size() == 0 && compactionId != null ? compactionId.getFirst() : null, | Define and throw a dedicated exception instead of using a generic one. |
/*
* 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 ... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.util.Arrays;
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
/**
* Mock Accumulo provides an in memory implementation of the Accumulo client API. It is possible that the behavior of this implementation may differ subtly from
* the behavior of Accumulo. This could result in unit tests th... | Remove this unused private "appendProp" method. |
import java.util.Iterator;
import org.apache.accumulo.core.util.PeekingIterator;
public static void checkLists(List<Entry<Key,Value>> a, Iterator<Entry<Key,Value>> b) {
int i = 0;
while (b.hasNext()) {
Entry<Key,Value> e = b.next();
assertEquals(a.get(i).getKey(),e.getKey());
assertEquals(a.get(i).getValu... | Either log or rethrow this exception. |
* this iterator. For example, if this method returns ROW_COLFAM, then {@link #transformKeys()} may be changing the column qualifier, column visibility, or | 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. |
/*
* 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. |
package org.apache.accumulo.cloudtrace.thrift; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
package org.apache.accumulo.server.mini; | Either log or rethrow this exception. |
public static final String CHARSET = "ISO-8859-1";
public int getExitCode() {
return exitCode;
}
public void resetExitCode() {
exitCode = 0;
}
| Either log or rethrow this exception. |
Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner); | Replace all tab characters in this file by sequences of white-spaces. |
return getConnector(principal, getAuthenticator().login(principal, props)); | Remove this unused method parameter "principal". |
opts.password = new Opts.Password(""); | Remove this hard-coded password. |
TimestampFilter copy = (TimestampFilter) super.deepCopy(env);
copy.hasStart = hasStart;
copy.start = start;
copy.startInclusive = startInclusive;
copy.hasEnd = hasEnd;
copy.end = end;
copy.endInclusive = endInclusive;
return copy; | Define and throw a dedicated exception instead of using a generic one. |
final private long traceId;
return new MilliSpan(description, next.nextLong(), traceId, this);
public MilliSpan(String description, long id, long traceId, Span parent) {
this.traceId = traceId;
return traceId; | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
if (!parser.matches())
throw new IllegalArgumentException("Unable to parse: " + everything + " as a version");
if (parser.group(1) != null)
package_ = parser.group(2);
if (parser.group(5) != null)
minor = Integer.valueOf(parser.group(5));
if (parser.group(7) != null)
release = In... | Remove this call to "exit" or ensure it is really required. |
package org.apache.accumulo.core.iterators.user;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.Filter;
import org.apache.accumulo.core.iterators.OptionDescriber;
import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import or... | Return empty string instead. |
if (splitLine.length == 1 && line.endsWith("="))
config.put(splitLine[0], "");
else
config.put(splitLine[0], splitLine[1]);
if (count == null)
count = 0; | Remove this call to "exit" or ensure it is really required. |
import org.apache.accumulo.core.security.tokens.SecurityToken;
public boolean authenticateUser(SecurityToken user) {
public void createUser(SecurityToken token) throws AccumuloSecurityException {
public void changePassword(SecurityToken user) throws AccumuloSecurityException { | Either log or rethrow this exception. |
import org.apache.accumulo.core.security.tokens.TokenHelper;
import org.apache.hadoop.filecache.DistributedCache;
import org.apache.hadoop.fs.Path;
* <p>
* <b>WARNING:</b> The serialized token is stored in the configuration and shared with all MapReduce tasks. It is BASE64 encoded to provide a charset safe
* c... | Define and throw a dedicated exception instead of using a generic one. |
public Repo<Master> call(long tid, Master master) throws Exception {
Instance instance = master.getInstance();
return newTableName.getBytes(); | Remove this unused private "appendProp" method. |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.accumulo.core.client.impl.thrift;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
public enum ConfigurationType implements org.apache.thrift.TEnum {
CURRENT(0... | Return empty string instead. |
import org.apache.accumulo.core.security.Credentials;
private Credentials credentials;
public InstanceOperationsImpl(Instance instance, Credentials credentials) {
client.setSystemProperty(Tracer.traceInfo(), credentials.toThrift(instance), property, value);
client.removeSystemProperty(Tracer.traceIn... | 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. |
if (!shellState.getConnector().tableOperations().exists(tableName))
throw new TableNotFoundException(null, tableName, null);
if (cl.hasOption(optStartRow.getOpt()))
startRow = new Text(cl.getOptionValue(optStartRow.getOpt()));
if (cl.hasOption(optEndRow.getOpt()))
endRow = new Text(cl.... | Remove this call to "exit" or ensure it is really required. |
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;
if (key.getColumnFamily().equals(DataFileColumnFamily.NAME)) {
if (k... | Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'. |
import java.net.InetAddress;
String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
String pid = state.getPid();
tableName = String.format("bulk_%s_%s_%d", hostname, pid, System.currentTimeMillis()); | Define and throw a dedicated exception instead of using a generic one. |
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
public static void run(String instanceName, String zookeepers, AuthenticationToken token, String args[]) throws Exception {
Connector conn = instance.getConnector("root", token); | Remove this unused method parameter "args". |
/**
* @deprecated Use {@link #createUser(String,byte[])} instead
*/
@Override
public void createUser(String user, byte[] password) throws AccumuloException, AccumuloSecurityException {
createUser(user, password, new Authorizations());
} | Remove the redundant '!unknownSymbol!' thrown exception declaration(s). |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.