Diff
stringlengths
10
2k
Message
stringlengths
28
159
/* * 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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Replace all tab characters in this file by sequences of white-spaces.
import org.apache.accumulo.core.client.IteratorSetting; private static final String MAX_COLUMNS = "max_columns"; /** * A convenience method for setting the maximum number of columns to keep. * * @param is * IteratorSetting object to configure. * @param maxColumns * number of columns to keep. */ public static void setMaxColumns(IteratorSetting is, int maxColumns) { is.addOption(MAX_COLUMNS, Integer.toString(maxColumns)); }
Remove the literal "true" boolean value.
import org.apache.accumulo.core.metadata.schema.DataFileValue;
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
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.
out(4, "Major Compacting %d", info.majors == null ? 0 : info.majors.running); out(4, "Queued for Major Compaction %d", info.majors == null ? 0 : info.majors.queued); out(4, "Minor Compacting %d", info.minors == null ? 0 : info.minors.running); out(4, "Queued for Minor Compaction %d", info.minors == null ? 0 : info.minors.queued);
Refactor the code to remove this label and the need for it.
shellState.getReader().println("Only letters, numbers and underscores are allowed for use in table names.");
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
UtilWaitThread.sleep(10*1000);
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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @SuppressWarnings("all") public class TConditionalSession implements org.apache.thrift.TBase<TConditionalSession, TConditionalSession._Fields>, java.io.Serializable, Cloneable { @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
320 duplicated blocks of code must be removed.
import com.google.common.net.HostAndPort; HostAndPort address = null; String monitorAddress = HostAndPort.fromParts(hostname, server.getPort()).toString();
Remove this unused method parameter "threadName".
if (mark != 0) throw new IllegalStateException(); if (skipped != pos) throw new IOException(); if (position >= buf.length) throw new IllegalArgumentException(); if (position + length > buf.length) throw new IllegalArgumentException(); if (length > buffer.length) throw new IllegalArgumentException(); if (reader.getFirstKey().compareTo(lastKey) > 0) throw new RuntimeException("First key out of order " + reader.getFirstKey() + " " + lastKey); if (lastKey.compareTo(indexIter.getTopKey()) > 0) throw new RuntimeException("Indext out of order " + lastKey + " " + indexIter.getTopKey()); if (startDLG) writer.startDefaultLocalityGroup(); if (m10 == 3 || m10 == 5 || m10 == 7) continue; if (m == 3) assertEquals(2, trf.reader.getNumLocalityGroupsSeeked()); else assertEquals(3, trf.reader.getNumLocalityGroupsSeeked()); if (i % 10 == m) continue; if (start == 0) reader.seek(new Range(), ncfs(nf("cf_", cf)), true); else reader.seek(new Range(nf("r_", start), null), ncfs(nf("cf_", cf)), true); if (start == 0) reader.seek(new Range(), ncfs(), false); else reader.seek(new Range(nf("r_", start), null), ncfs(), false);
Remove this call to "exit" or ensure it is really required.
package org.apache.accumulo.examples.wikisearch.iterator;
Rename "table" which hides the field declared at line 107.
public FileDataQuery(String instanceName, String zooKeepers, String user, byte[] password, String tableName, Authorizations auths) throws AccumuloException, conn = instance.getConnector(user, password);
Remove this call to "exit" or ensure it is really required.
package org.apache.accumulo.server.monitor.util.celltypes; import java.util.Map; import org.apache.accumulo.core.client.impl.Tables; import org.apache.accumulo.server.client.HdfsZooInstance; public class TableLinkType extends CellType<String> { private Map<String, String> tidToNameMap; public TableLinkType() { tidToNameMap = Tables.getIdToNameMap(HdfsZooInstance.getInstance()); } @Override public String format(Object obj) { if (obj == null) return "-"; String tableId = (String) obj; return String.format("<a href='/tables?t=%s'>%s</a>", tableId, displayName(tableId)); } private String displayName(String tableId) { if (tableId == null) return "-"; return Tables.getPrintableTableNameFromId(tidToNameMap, tableId); } @Override public int compare(String o1, String o2) { return displayName(o1).compareTo(displayName(o2)); } @Override public String alignment() { return "left"; } }
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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ final Map<String,MockTable> tables = new HashMap<String,MockTable>(); final Map<String,String> systemProperties = new HashMap<String,String>(); Map<String,MockUser> users = new HashMap<String,MockUser>(); MockUser root = new MockUser("root", new byte[] {}, Constants.NO_AUTHS); createTable("root", Constants.METADATA_TABLE_NAME, true, TimeType.LOGICAL); public void addAggregators(String tableName, List<? extends PerColumnIteratorConfig> aggregators) { tables.get(tableName).addAggregators(aggregators); public void createTable(String username, String tableName, boolean useVersions, TimeType timeType) { MockTable t = new MockTable(useVersions, timeType); }
Rename this local variable to match the regular expression '^[a-z][a-zA-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_bitfield, __ESTIMATEDSIZE_ISSET_ID); return EncodingUtils.testBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID); __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID, value); // check for sub-struct validity __isset_bitfield = 0;
Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'.
if (tableExists != cloudTableExists) throw new AccumuloException("Table existance out of sync"); if (tableUserExists != cloudTableUserExists) throw new AccumuloException("Table User existance out of sync"); if (tabUserExists) throw new AccumuloException("Got user DNE error when they should", ae); else continue; } else throw new AccumuloException("Unexpected exception!", ae); if (hasSp != accuHasSp) throw new AccumuloException(user + " existance out of sync for system perm " + sp + " hasSp/CloudhasSP " + hasSp + " " + accuHasSp); if (tabUserExists) throw new AccumuloException("Got user DNE error when they should", ae); else continue; if (tableExists) throw new AccumuloException("Got table DNE when it should", ae); else continue; } else throw new AccumuloException("Unexpected exception!", ae); if (hasTp != accuHasTp) throw new AccumuloException(user + " existance out of sync for table perm " + tp + " hasTp/CloudhasTP " + hasTp + " " + accuHasTp); if (tabUserExists) throw new AccumuloException("Table user didn't exist when they should.", ae); else return; if (!auths.equals(accuAuths)) throw new AccumuloException("Table User authorizations out of sync");
Remove this call to "exit" or ensure it is really required.
} catch (AccumuloSecurityException e) { throw e.asThriftException(); } catch (AccumuloSecurityException e) { throw e.asThriftException(); } catch (AccumuloSecurityException e) { throw e.asThriftException(); } catch (AccumuloSecurityException e) { throw e.asThriftException();
Either log or rethrow this exception.
import static org.junit.Assert.assertEquals; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.TreeMap; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.iterators.user.RegExFilter; import org.apache.accumulo.proxy.thrift.BatchScanOptions; import org.apache.accumulo.proxy.thrift.ColumnUpdate; import org.apache.accumulo.proxy.thrift.IteratorSetting; import org.apache.accumulo.proxy.thrift.Key; import org.apache.accumulo.proxy.thrift.KeyValue; import org.apache.accumulo.proxy.thrift.MutationsRejectedException; import org.apache.accumulo.proxy.thrift.Range; import org.apache.accumulo.proxy.thrift.ScanColumn; import org.apache.accumulo.proxy.thrift.ScanOptions; import org.apache.accumulo.proxy.thrift.ScanResult; import org.apache.accumulo.proxy.thrift.TimeType; import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.server.TServer; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; prop.setProperty("useMockInstance", "true");
Either log or rethrow this exception.
if (b) data[offset++] = 1; else data[offset++] = 0; if (buffer == null) throw new IllegalStateException("Can not add to mutation after serializing it"); if (values == null) values = new ArrayList<byte[]>(); if (len == 0) return EMPTY_BYTES; if (values == null) return 0; if (values == null) out.writeBoolean(false); if (o instanceof Mutation) return equals((Mutation) o); if (values == null && m.values == null) return true; if (!Arrays.equals(values.get(i), m.values.get(i))) return false;
Remove this call to "exit" or ensure it is really required.
MasterMonitorInfo stats = client.getMasterStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(opts.getInstance()));
Immediately return this expression instead of assigning it to the temporary variable "onlineTabletsForTable".
import java.util.ArrayList; import java.util.List; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.iterators.SortedKeyValueIterator; import org.apache.accumulo.core.security.Authorizations; throws AccumuloException, AccumuloSecurityException, ShellCommandException, TableNotFoundException { // instead of setting table properties, just put the options in a list to use at scan time List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.get(tableName); if (tableScanIterators == null) { tableScanIterators = new ArrayList<IteratorSetting>(); shellState.scanIteratorOptions.put(tableName, tableScanIterators); } IteratorSetting setting = new IteratorSetting(priority, name, classname); setting.addOptions(options); // initialize a scanner to ensure the new setting does not conflict with existing settings String user = shellState.getConnector().whoami(); Authorizations auths = shellState.getConnector().securityOperations().getUserAuthorizations(user); Scanner scanner = shellState.getConnector().createScanner(tableName, auths); for (IteratorSetting s : tableScanIterators) { scanner.addScanIterator(s); scanner.addScanIterator(setting); // if no exception has been thrown, it's safe to add it to the list tableScanIterators.add(setting); Shell.log.debug("Scan iterators :" + shellState.scanIteratorOptions.get(tableName));
Either log or rethrow this exception.
if (shellState.getConnector().whoami().equals(user)) throw new BadArgumentException("You cannot delete yourself", fullCommand, fullCommand.indexOf(user));
Remove this call to "exit" or ensure it is really required.
Thread thread = new Daemon(new LoggingRunnable(log, new TransactionRunner()), "Repo runner " + i); store.setProperty(tid, DEBUG_PROP, repo.getDescription());
Rename this package name to match the regular expression '^[a-z]+(\.[a-z][a-z0-9]*)*$'.
final byte[] inputBytes = input.getBytes();
Remove this unused private "appendProp" method.
return impl.getFileStatus(src).getReplication();
Define a constant instead of duplicating this literal "org.apache.accumulo.core.iterators.WholeRowIterator" 4 times.
import org.apache.accumulo.core.client.BatchWriterConfig; bw = connector.createBatchWriter(table, new BatchWriterConfig());
Remove this unused method parameter "e".
import java.util.Set; import java.util.TreeMap; Map<String,Set<Text>> localityGroups = new TreeMap<String, Set<Text>>(); public void setLocalityGroups(Map<String,Set<Text>> groups) { localityGroups = groups; } public Map<String,Set<Text>> getLocalityGroups() { return localityGroups; }
Use "Integer.toString" instead.
import org.apache.accumulo.core.cli.ClientOnRequiredTable; import com.beust.jcommander.Parameter; static class Opts extends ClientOnRequiredTable { @Parameter(names="--vis") String visibilities = ""; } Opts opts = new Opts(); opts.parseArgs(CharacterHistogram.class.getName(), args); opts.setAccumuloConfigs(job); job.getConfiguration().set(VIS, opts.visibilities.toString());
Remove this unused private "appendProp" method.
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
1 duplicated blocks of code must be removed.
@Test(timeout = 2 * 60 * 1000)
Either log or rethrow this exception.
@SuppressWarnings("all") public class Compacting implements org.apache.thrift.TBase<Compacting, Compacting._Fields>, java.io.Serializable, Cloneable {
13 duplicated blocks of code must be removed.
package org.apache.accumulo.test.randomwalk.bulk; import org.apache.accumulo.test.randomwalk.State;
Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison.
* 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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public String normalizeFieldValue(String field, Object value) { if (NumberUtils.isNumber(value.toString())) { Number n = NumberUtils.createNumber(value.toString()); if (n instanceof Integer) return NumericUtils.intToPrefixCoded((Integer) n); else if (n instanceof Long) return NumericUtils.longToPrefixCoded((Long) n); else if (n instanceof Float) return NumericUtils.floatToPrefixCoded((Float) n); else if (n instanceof Double) return NumericUtils.doubleToPrefixCoded((Double) n); else throw new IllegalArgumentException("Unhandled numeric type: " + n.getClass()); } else { throw new IllegalArgumentException("Value is not a number: " + value); } }
Immediately return this expression instead of assigning it to the temporary variable "r".
// Read password if the user explicitly asked for it, or didn't specify anything at all if ("stdin".equals(password) || password == null) {
Make the "log" logger private static final and rename it to comply with the format "LOG(?:GER)?".
// these are functions to delay loading the Accumulo configuration unless we must public static String getBaseDir() { return ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_DIR); } public static String getTablesDir() { return getBaseDir() + "/tables"; } public static String getRecoveryDir() { return getBaseDir() + "/recovery"; } public static Path getInstanceIdLocation() { return new Path(getBaseDir() + "/instance_id"); } public static Path getDataVersionLocation() { return new Path(getBaseDir() + "/version"); } public static String getMetadataTableDir() { return getTablesDir() + "/" + METADATA_TABLE_ID; } public static String getRootTabletDir() { return getMetadataTableDir() + ZROOT_TABLET; }
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
import org.apache.accumulo.server.ServerConstants; String baseDir = ServerConstants.getBaseDir(); opts.servers += "/accumulo/" + instance.getInstanceID(); org.apache.zookeeper.ZooKeeperMain.main(new String[] {"-server", opts.servers, "-timeout", "" + (opts.timeout * 1000)});
Make the "audit" 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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Replace all tab characters in this file by sequences of white-spaces.
if (!extent.getTableId().equals(range.getTableId())) return false; if (isDelete()) return extent.getPrevEndRow() != null && extent.getPrevEndRow().equals(range.getEndRow()); else return this.range.overlaps(extent); if (!result && needsToBeChopped(extent)) return true; if (!state.equals(MergeState.NONE)) return "Merge " + operation.toString() + " of " + range + " State: " + state;
Remove this call to "exit" or ensure it is really required.
import org.apache.accumulo.core.security.tokens.SecurityToken; * <li>{@link AccumuloRowInputFormat#setConnectorInfo(JobConf, SecurityToken)} OR {@link AccumuloRowInputFormat#setConnectorInfo(JobConf, Path)}
Either log or rethrow this exception.
private static final Logger log = Logger.getLogger(Proxy.class); String useMini = opts.prop.getProperty(api + ".useMiniAccumulo");
Replace all tab characters in this file by sequences of white-spaces.
boolean hasNext = false; if (hasNext) while (true) { try { return hasNext = true; if (!hasNext && !hasNext()) hasNext = false;
Extract the assignment out of this expression.
@Test(timeout = 2 * 60 * 1000) @Test(timeout = 4 * 60 * 1000)
Either log or rethrow this exception.
public List<ByteBuffer> listSplits(ByteBuffer login, String tableName, int maxSplits) throws TException { Collection<Text> splits = getConnector(login).tableOperations().listSplits(tableName, maxSplits);
Either log or rethrow this exception.
@Override public RecordReader<Text,PeekingIterator<Entry<Key,Value>>> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { return new RecordReaderBase<Text,PeekingIterator<Entry<Key,Value>>>() { RowIterator rowIterator; @Override public void initialize(InputSplit inSplit, TaskAttemptContext attempt) throws IOException { super.initialize(inSplit, attempt); rowIterator = new RowIterator(scannerIterator); currentK = new Text(); currentV = null; } @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (!rowIterator.hasNext()) return false; currentV = new PeekingIterator<Entry<Key,Value>>(rowIterator.next()); numKeysRead = rowIterator.getKVCount(); currentKey = currentV.peek().getKey(); currentK = new Text(currentKey.getRow()); return true; } }; }
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).
/* * 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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Replace all tab characters in this file by sequences of white-spaces.
// TODO: add the entries only if there are no !METADATA table references - ACCUMULO-1308
Make the "log" logger private static final and rename it to comply with the format "LOG(?:GER)?".
import org.apache.accumulo.server.tabletserver.compaction.MajorCompactionReason;
2 duplicated blocks of code must be removed.
this.password = password.getBytes();
Remove this unused private "appendProp" method.
import org.apache.accumulo.core.client.BatchWriterConfig; MultiTableBatchWriter mtbw = connector.createMultiTableBatchWriter(new BatchWriterConfig());
Remove this unused method parameter "e".
public class MiniAccumuloConfig { * An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in. Creating the directory is left to the user. Java 7, Guava, * and Junit provide methods for creating temporary directories. public MiniAccumuloConfig(File dir, String rootPassword) { public MiniAccumuloConfig setNumTservers(int numTservers) { public MiniAccumuloConfig setSiteConfig(Map<String,String> siteConfig) { }
Return empty string instead.
Connector conn = mi.getConnector("root", "");
2 duplicated blocks of code must be removed.
import org.apache.accumulo.trace.instrument.TraceRunnable;
Remove the redundant '!unknownSymbol!' thrown exception declaration(s).
package org.apache.accumulo.test.functional;
Move the "org.apache.accumulo.test.randomwalk.unit.CreateTable" string literal on the left side of this string comparison.
import org.apache.accumulo.core.util.UtilWaitThread; public TabletServerResourceManager(FileSystem fs) { fileManager = new FileManager(fs, maxOpenFiles, _dCache, _iCache);
Remove this unused method parameter "hostname".
/** * @param args */ public static void main(String[] args) throws Exception { String tserverPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTSERVERS; if (args.length == 1 && args[0].equals("-list")) { ZooReaderWriter zoo = ZooReaderWriter.getInstance(); List<String> tabletServers = zoo.getChildren(tserverPath); for (String tabletServer : tabletServers) { byte[] lockData = ZooLock.getLockData(tserverPath + "/" + tabletServer); String holder = null; if (lockData != null) { holder = new String(lockData); System.out.printf("%32s %16s\n", tabletServer, holder); } } else if (args.length == 2 && args[0].equals("-delete")) { ZooLock.deleteLock(tserverPath + "/" + args[1]); } else { System.out.println("Usage : " + TabletServerLocks.class.getName() + " -list|-delete <tserver lock>"); }
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
@Override public void visit(State state, Properties props) throws Exception { @SuppressWarnings("unchecked") ArrayList<String> tables = (ArrayList<String>) state.get("tableList"); if (tables.isEmpty()) { log.debug("No tables to ingest into"); return; Random rand = new Random(); String tableName = tables.get(rand.nextInt(tables.size())); BatchWriter bw = null; try { bw = state.getMultiTableBatchWriter().getBatchWriter(tableName); } catch (TableNotFoundException e) { log.error("Table " + tableName + " not found!"); return; } Text meta = new Text("meta"); String uuid = UUID.randomUUID().toString(); Mutation m = new Mutation(new Text(uuid)); // create a fake payload between 4KB and 16KB int numBytes = rand.nextInt(12000) + 4000; byte[] payloadBytes = new byte[numBytes]; rand.nextBytes(payloadBytes); m.put(meta, new Text("payload"), new Value(payloadBytes)); // store size m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes())); // store hash MessageDigest alg = MessageDigest.getInstance("SHA-1"); alg.update(payloadBytes); m.put(meta, new Text("sha1"), new Value(alg.digest())); // add mutation bw.addMutation(m); state.set("numWrites", state.getInteger("numWrites") + 1); }
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
String table = getTableNames(1)[0]; for (@SuppressWarnings("unused") Entry<Key,Value> unused : scanner) {
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
package org.apache.accumulo.core.util.shell.commands; import java.io.IOException; import org.apache.accumulo.core.util.shell.Shell; import org.apache.accumulo.core.util.shell.Shell.Command; import org.apache.commons.cli.CommandLine; public class WhoAmICommand extends Command { @Override public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException { shellState.getReader().printString(shellState.getConnector().whoami() + "\n"); return 0; } @Override public String description() { return "reports the current user name"; } @Override public int numArgs() { return 0; } }
Return empty string instead.
package org.apache.accumulo.server.tabletserver; import java.util.List; import org.apache.accumulo.core.data.KeyExtent; public class MemoryManagementActions { public List<KeyExtent> tabletsToMinorCompact; }
Return empty string instead.
@Override public IteratorOptions describeOptions() { IteratorOptions io = super.describeOptions(); io.setName("max"); io.setDescription("MaxCombiner interprets Values as Longs and finds their maximum. A variety of encodings (variable length, fixed length, or string) are available"); return io; }
Move this variable to comply with Java Code Conventions.
* @deprecated since 1.5.0; use {@link #listSplits(String)} instead. @Deprecated * @return the split points (end-row names) for the table's current split profile * @throws TableNotFoundException * if the table does not exist * @throws AccumuloException * if a general error occurs * @throws AccumuloSecurityException * if the user does not have permission * @since 1.5 */ public Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException, AccumuloException; /** * @param tableName * the name of the table * @deprecated since 1.5.0; use {@link #listSplits(String, int))} instead. @Deprecated * @param tableName * the name of the table * @param maxSplits * specifies the maximum number of splits to return * @throws AccumuloException * if a general error occurs * @throws AccumuloSecurityException * if the user does not have permission * @return the split points (end-row names) for the table's current split profile, grouped into fewer splits so as not to exceed maxSplits * @throws TableNotFoundException */ public Collection<Text> listSplits(String tableName, int maxSplits) throws TableNotFoundException, AccumuloSecurityException, AccumuloException; /**
Either log or rethrow this exception.
public Connector getConnector() throws AccumuloException, AccumuloSecurityException {
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
log.error(String.format("Accumulo configuration file contained a cipher, \"%s\" with a padding that was not recognized by any providers", cipherSuite));
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
import org.apache.accumulo.core.util.shell.Shell.PrintFile; private Option tableOpt, deleteOpt, setOpt, filterOpt, disablePaginationOpt, outputFileOpt; public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException, ClassNotFoundException { } } } final String outputFile = cl.getOptionValue(outputFileOpt.getOpt()); final PrintFile printFile = outputFile == null ? null : new PrintFile(outputFile); shellState.printLines(output.iterator(), !cl.hasOption(disablePaginationOpt.getOpt()), printFile); if (printFile != null) { printFile.close(); } outputFileOpt = new Option("o", "output", true, "local file to write the scan output to"); outputFileOpt.setArgName("file"); o.addOption(outputFileOpt);
Remove the redundant '!unknownSymbol!' thrown exception declaration(s).
case INVALID_TOKEN: return "The configured authenticator does not accept this type of token"; case AUTHENTICATOR_FAILED: return "The configured authenticator failed for some reason"; case AUTHORIZOR_FAILED: return "The configured authorizor failed for some reason"; case PERMISSIONHANDLER_FAILED: return "The configured permission handler failed for some reason"; case TOKEN_EXPIRED: return "The supplied token expired, please update and try again"; return "Error " + errorCode + " for user " + user + " - " + super.getMessage();
Remove this call to "exit" or ensure it is really required.
import java.util.TreeMap; @SuppressWarnings("serial") userpass = tpc.proxy().login("root", new TreeMap<String, String>() {{put("password",""); }});
Remove this hard-coded password.
return getTransport(String.format("%s:%d", addr.getAddress().getHostAddress(), addr.getPort()), conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)); public TTransport getTransport(String location, long milliseconds) throws TTransportException { return getTransport(new ThriftTransportKey(location, milliseconds)); private TTransport getTransport(ThriftTransportKey cacheKey) throws TTransportException { synchronized (this) { // atomically reserve location if it exist in cache List<CachedConnection> ccl = cache.get(cacheKey); if (ccl == null) { ccl = new LinkedList<CachedConnection>(); cache.put(cacheKey, ccl); } for (CachedConnection cachedConnection : ccl) { if (!cachedConnection.isReserved()) { cachedConnection.setReserved(true); if (log.isTraceEnabled()) log.trace("Using existing connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort()); return cachedConnection.transport; } } } return createNewTransport(cacheKey);
Immediately return this expression instead of assigning it to the temporary variable "client".
VARLEN, FIXEDLEN, STRING case VARLEN: case FIXEDLEN: io.setName("longcombiner"); io.setDescription("LongCombiner can interpret Values as Longs in a variety of encodings (variable length, fixed length, or string) before combining"); io.addNamedOption(TYPE, "<VARLEN|FIXEDLEN|STRING|fullClassName>");
Refactor this method to throw at most one checked exception instead of: java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException
import java.util.EnumSet; import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; conn.tableOperations().checkIteratorConflicts(t, null, EnumSet.allOf(IteratorScope.class));
This block of commented-out lines of code should be removed.
@SuppressWarnings("all") public enum MasterState implements org.apache.thrift.TEnum {
300 duplicated blocks of code must be removed.
TabletServerMutations<T> tsm = new TabletServerMutations<T>("5");
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
Server server = null; SocketConnector sock; ContextHandlerCollection handler; Context root; boolean usingSsl; public EmbeddedWebServer() { this("0.0.0.0", 0); public EmbeddedWebServer(String host, int port) { server = new Server(); handler = new ContextHandlerCollection(); root = new Context(handler, "/", new SessionHandler(), null, null, null); if (Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE) == "" || Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS) == "" || Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE) == "" || Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTOREPASS) == "") { sock = new SocketConnector(); usingSsl = false; } else { sock = new SslSocketConnector(); ((SslSocketConnector) sock).setKeystore(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE)); ((SslSocketConnector) sock).setKeyPassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS)); ((SslSocketConnector) sock).setTruststore(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE)); ((SslSocketConnector) sock).setTrustPassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTOREPASS)); usingSsl = true; } sock.setHost(host); sock.setPort(port); public void addServlet(Class<? extends HttpServlet> klass, String where) { root.addServlet(klass, where); } return sock.getLocalPort(); public void start() { try { server.addConnector(sock); server.setHandler(handler); server.start(); } catch (Exception e) { stop(); throw new RuntimeException(e); } public void stop() { try { server.stop(); } catch (Exception e) { throw new RuntimeException(e); public boolean isUsingSsl() { return usingSsl; }
Remove this unused private "appendProp" method.
package org.apache.accumulo.server.master.state; public class DistributedStoreException extends Exception { private static final long serialVersionUID = 1L; public DistributedStoreException(String why) { super(why); } public DistributedStoreException(Exception cause) { super(cause); } public DistributedStoreException(String why, Exception cause) { super(why, cause); } }
Return empty string instead.
if (!hasNext) throw new NoSuchElementException(); if (topKey == null) return super.getTopKey(); if (topKey == null) return super.getTopValue(); if (workKey.isDeleted()) return;
Remove this call to "exit" or ensure it is really required.
@Override public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException { for (String p : TablePermission.printableValues()) shellState.getReader().printString(p + "\n"); return 0; } @Override public String description() { return "displays a list of valid table permissions"; } @Override public int numArgs() { return 0; }
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
@SuppressWarnings("all") public class LoggerClosedException extends Exception implements org.apache.thrift.TBase<LoggerClosedException, LoggerClosedException._Fields>, java.io.Serializable, Cloneable {
13 duplicated blocks of code must be removed.
System.out.println("SAFEMODE: There are " + candidates.size() + " data file candidates marked for deletion.%n" + " Examine the log files to identify them.%n" + " They can be removed by executing: bin/accumulo gc --offline%n" + "WARNING: Do not run the garbage collector in offline mode unless you are positive%n" + " that the accumulo METADATA table is in a clean state, or that accumulo%n"
Use isEmpty() to check whether the collection is empty or not.
if (state == MergeState.NONE) return state; log.info("Computing next merge state for " + info.getRange() + " which is presently " + state); Range range = new Range(first, false, null, true); KeyExtent prevExtent = null; if (prevExtent == null) { // this is the first tablet observed, it must be offline and its prev row must be less than the start of the merge range if (tls.extent.getPrevEndRow() != null && tls.extent.getPrevEndRow().compareTo(start) > 0) { return false; } if (tls.getState(master.onlineTabletServers()) != TabletState.UNASSIGNED) return false; } else if (!tls.extent.isPreviousExtent(prevExtent)) { } prevExtent = tls.extent; verify.update(tls.extent, tls.getState(master.onlineTabletServers()), tls.chopped);
Either log or rethrow this exception.
package org.apache.accumulo.core.client.mock; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.client.impl.TabletLocator; import org.apache.accumulo.core.data.KeyExtent; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Range; import org.apache.hadoop.io.Text; public class MockTabletLocator extends TabletLocator { public MockTabletLocator() {} @Override public TabletLocation locateTablet(Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { throw new UnsupportedOperationException(); } @Override public void binMutations(List<Mutation> mutations, Map<String, TabletServerMutations> binnedMutations, List<Mutation> failures) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { TabletServerMutations tsm = new TabletServerMutations(); for (Mutation m : mutations) tsm.addMutation(new KeyExtent(), m); binnedMutations.put("", tsm); } @Override public List<Range> binRanges(List<Range> ranges, Map<String, Map<KeyExtent, List<Range>>> binnedRanges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { binnedRanges.put("", Collections.singletonMap(new KeyExtent(new Text(), null, null), ranges)); return Collections.emptyList(); } @Override public void invalidateCache(KeyExtent failedExtent) { } @Override public void invalidateCache(Collection<KeyExtent> keySet) { } @Override public void invalidateCache() { } @Override public void invalidateCache(String server) { } }
Return empty string instead.
import org.apache.accumulo.core.cli.ClientOnRequiredTable; import com.beust.jcommander.Parameter; static class Opts extends ClientOnRequiredTable { @Parameter(names="--output", description="output directory") String output; @Parameter(names="--reducers", description="number of reducers to use", required=true) int reducers; @Parameter(names="--offline", description="run against an offline table") boolean offline = false; } Opts opts = new Opts(); opts.parseArgs(UniqueColumns.class.getName(), args); String clone = opts.tableName; if (opts.offline) { conn = opts.getConnector(); clone = opts.tableName + "_" + jobName; conn.tableOperations().clone(opts.tableName, clone, true, new HashMap<String,String>(), new HashSet<String>()); opts.setAccumuloConfigs(job); job.setNumReduceTasks(opts.reducers); TextOutputFormat.setOutputPath(job, new Path(opts.output)); if (opts.offline) {
Remove this unused private "appendProp" method.
System.out.println("accumulo init | master | tserver | monitor | shell | admin | gc | classpath | rfile-info | login-info | tracer | minicluster | proxy | zookeeper | create-token | <accumulo class> args");
Replace this use of System.out or System.err by a logger.
public class WriteLotsIT extends SimpleMacIT { final String tableName = makeTableName(); c.tableOperations().create(tableName); opts.tableName = tableName; vopts.tableName = tableName;
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
import org.apache.accumulo.server.tabletserver.TabletTime; BatchWriter bw = null; bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000000L, 1000L, 1); ColumnFQ.fetch(scanner, Constants.METADATA_TIME_COLUMN); String maxLogicalTime = null; } else if (Constants.METADATA_TIME_COLUMN.hasColumns(key)) { maxLogicalTime = TabletTime.maxMetadataTime(maxLogicalTime, value.toString()); } } // read the logical time from the last tablet in the merge range, it is not included in // the loop above scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS); scanner.setRange(new Range(stopRow)); ColumnFQ.fetch(scanner, Constants.METADATA_TIME_COLUMN); for (Entry<Key,Value> entry : scanner) { if (Constants.METADATA_TIME_COLUMN.hasColumns(entry.getKey())) { maxLogicalTime = TabletTime.maxMetadataTime(maxLogicalTime, entry.getValue().toString()); if (maxLogicalTime != null) ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(maxLogicalTime.getBytes())); } finally { if (bw != null) try { bw.close(); } catch (Exception ex) { throw new AccumuloException(ex); }
At most one statement is allowed per line, but 2 statements were found on this line.
import java.util.TreeSet; import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter bw = getConnector().createBatchWriter("foo", new BatchWriterConfig());
Remove this unused method parameter "e".
* @since 1.5.0 public org.apache.accumulo.core.client.security.SecurityErrorCode getSecurityErrorCode() { return org.apache.accumulo.core.client.security.SecurityErrorCode.valueOf(errorCode.name()); } /** * @return the specific reason for this exception * * @deprecated since 1.5.0; Use {@link #getSecurityErrorCode()} instead. */ public org.apache.accumulo.core.security.thrift.SecurityErrorCode getErrorCode() { return org.apache.accumulo.core.security.thrift.SecurityErrorCode.valueOf(errorCode.name());
Do not forget to remove this deprecated code someday.
* @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.IndexedDocIterator}
Do not forget to remove this deprecated code someday.
final static Random random = new Random(); final long frequency; long count = random.nextLong(); public CountSampler(long frequency) { this.frequency = frequency; } @Override public boolean next() { return (count++ % frequency) == 0; }
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
addData(data, "d", "~chunk", 100, 0, "A&B", ""); addData(data, "e", "~chunk", 100, 0, "A&B", "asdfjkl;"); addData(data, "e", "~chunk", 100, 1, "A&B", ""); addData(baddata, "f", "~chunk", 100, 2, "K", "asdfjkl;"); addData(baddata, "g", "~chunk", 100, 0, "L", ""); } catch (IOException e) { cis.setSource(pi); assertEquals(read = cis.read(b), 5); assertEquals(new String(b, 0, read), "asdfj"); assertEquals(read = cis.read(b), 3); assertEquals(new String(b, 0, read), "kl;"); assertEquals(read = cis.read(b), -1); cis.close(); cis.setSource(pi); assertEquals(read = cis.read(b), 8); assertEquals(new String(b, 0, read), "asdfjkl;"); assertEquals(read = cis.read(b), -1); cis.close(); cis.setSource(pi); assertEquals(read = cis.read(b), 8); assertEquals(new String(b, 0, read), "asdfjkl;"); assertEquals(read = cis.read(b), -1); cis.close(); try { cis.setSource(pi); assertNotNull(null); } catch (IOException e) { assertNull(null); } assumeExceptionOnClose(cis); assertEquals(cis.getVisibilities().toString(), "[K]"); cis.setSource(pi); assertEquals(read = cis.read(b), -1); assertEquals(cis.getVisibilities().toString(), "[L]"); cis.close(); try { cis.setSource(pi); assertNotNull(null); } catch (IOException e) { assertNull(null); } assertEquals(cis.getVisibilities().toString(), "[K]"); cis.setSource(pi); assertEquals(read = cis.read(b), -1); assertEquals(cis.getVisibilities().toString(), "[L]"); cis.close();
Either log or rethrow this exception.
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
1 duplicated blocks of code must be removed.
if (r.nextDouble() < percentage) keys.add(new Key(key)); if (mmfi.getTopKey().compareTo(key) != 0) misses++;
Remove this call to "exit" or ensure it is really required.
import org.apache.accumulo.core.file.keyfunctor.ColumnFamilyFunctor; import org.apache.accumulo.core.file.keyfunctor.ColumnQualifierFunctor; import org.apache.accumulo.core.file.keyfunctor.RowFunctor; write(c, "bt1", 1, 0, 1000000000, 500); write(c, "bt2", 2, 0, 1000000000, 500); write(c, "bt3", 3, 0, 1000000000, 500); long t1 = query(c, "bt1", 1, 0, 1000000000, 100000, 500); long t2 = query(c, "bt2", 2, 0, 1000000000, 100000, 500); long t3 = query(c, "bt3", 3, 0, 1000000000, 100000, 500); c.tableOperations().setProperty("bt1", Property.TABLE_BLOOM_KEY_FUNCTOR.getKey(), RowFunctor.class.getName()); c.tableOperations().setProperty("bt2", Property.TABLE_BLOOM_KEY_FUNCTOR.getKey(), ColumnFamilyFunctor.class.getName()); c.tableOperations().setProperty("bt3", Property.TABLE_BLOOM_KEY_FUNCTOR.getKey(), ColumnQualifierFunctor.class.getName()); c.tableOperations().setProperty("bt4", Property.TABLE_BLOOM_KEY_FUNCTOR.getKey(), RowFunctor.class.getName()); long tb1 = query(c, "bt1", 1, 0, 1000000000, 100000, 500); long tb2 = query(c, "bt2", 2, 0, 1000000000, 100000, 500); long tb3 = query(c, "bt3", 3, 0, 1000000000, 100000, 500);
Either log or rethrow this exception.
if (cv.length() == 0) return; if (depth < 0) throw new IllegalArgumentException("Invalid vis " + cv); if (depth != 0) throw new IllegalArgumentException("Invalid vis " + cv); if (cvs.charAt(0) != '(') cvs = "(" + cvs + ")"; if (depth == 0) depthZeroCloses++; if (depthZeroCloses > 1) cvs = "(" + cvs + ")";
Remove this call to "exit" or ensure it is really required.
package org.apache.accumulo.cloudtrace.instrument.receivers;
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
import org.apache.accumulo.core.security.tokens.AuthenticationToken; @Deprecated this.acu.users.put(user, new MockUser(user, new PasswordToken(password), authorizations)); public void createUser(String user, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException { @Override @Deprecated return authenticateUser(name, new PasswordToken(password)); public boolean authenticateUser(String name, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException { public void changeLoginInfo(String name, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException { @Deprecated changeLoginInfo(name, new PasswordToken(password));
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
for (String classpath : cp.toString().split(",")) { addUrl(replaceEnvVars(classpath, System.getenv()), urls); for (String classpath : cp.toString().split(",")) { if (classpath == null) continue; for (String classpath : cp.split(",")) { addUrl(replaceEnvVars(classpath, System.getenv()), urls); if (classpath == null) return; return null; if (monitoredDirs.size() != 0) myListener.waitForFirstCall();
Use isEmpty() to check whether the collection is empty or not.
/* * 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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Replace all tab characters in this file by sequences of white-spaces.
/** * Provides a GUI for browsing the file system information stored in Accumulo. See docs/examples/README.dirlist for instructions. */
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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @SuppressWarnings("all") public class AccumuloSecurityException extends TException implements org.apache.thrift.TBase<AccumuloSecurityException, AccumuloSecurityException._Fields>, java.io.Serializable, Cloneable { @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
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 use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.