ctubbsii closed pull request #619: Remove warnings URL: https://github.com/apache/accumulo/pull/619
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java index 25f9d73731..cfa4d73279 100644 --- a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java +++ b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java @@ -124,7 +124,6 @@ public IndexReaderBuilder newIndexReaderBuilder() { * .build(); * </pre> */ - @SuppressWarnings("unchecked") public ScanReaderBuilder newScanReaderBuilder() { return new ScanReaderBuilder(); } @@ -350,6 +349,7 @@ public WriterTableConfiguration forFile(String filename, FileSystem fs, Configur return this; } + @Override public WriterBuilder withTableConfiguration(AccumuloConfiguration tableConfiguration) { tableConfiguration(tableConfiguration); return this; @@ -398,6 +398,7 @@ public ReaderTableConfiguration forFile(String filename, FileSystem fs, Configur return this; } + @Override public ReaderBuilder withTableConfiguration(AccumuloConfiguration tableConfiguration) { tableConfiguration(tableConfiguration); return this; @@ -489,6 +490,7 @@ public IndexReaderTableConfiguration forFile(String filename, FileSystem fs, return this; } + @Override public IndexReaderBuilder withTableConfiguration(AccumuloConfiguration tableConfiguration) { tableConfiguration(tableConfiguration); return this; @@ -515,6 +517,7 @@ public ScanReaderTableConfiguration forFile(String filename, FileSystem fs, return this; } + @Override public ScanReaderBuilder withTableConfiguration(AccumuloConfiguration tableConfiguration) { tableConfiguration(tableConfiguration); return this; diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java index 4b68600320..060ac00320 100644 --- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java +++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java @@ -17,8 +17,6 @@ package org.apache.accumulo.core.file.rfile.bcfile; -import static org.apache.accumulo.core.security.crypto.impl.CryptoEnvironmentImpl.Scope; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.Closeable; @@ -46,6 +44,7 @@ import org.apache.accumulo.core.security.crypto.impl.CryptoEnvironmentImpl; import org.apache.accumulo.core.security.crypto.impl.NoFileDecrypter; import org.apache.accumulo.core.spi.crypto.CryptoEnvironment; +import org.apache.accumulo.core.spi.crypto.CryptoEnvironment.Scope; import org.apache.accumulo.core.spi.crypto.CryptoService; import org.apache.accumulo.core.spi.crypto.FileDecrypter; import org.apache.accumulo.core.spi.crypto.FileEncrypter; @@ -487,10 +486,10 @@ public void register(long raw, long begin, long end) { BoundedRangeFileInputStream boundedRangeFileInputStream = new BoundedRangeFileInputStream( fsin, this.region.getOffset(), this.region.getCompressedSize()); - InputStream inputStreamToBeCompressed = boundedRangeFileInputStream; try { - inputStreamToBeCompressed = decrypter.decryptStream(inputStreamToBeCompressed); + InputStream inputStreamToBeCompressed = decrypter + .decryptStream(boundedRangeFileInputStream); this.in = compressAlgo.createDecompressionStream(inputStreamToBeCompressed, decompressor, getFSInputBufferSize(conf)); } catch (IOException e) { diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java index b63aa485b9..93a8b36d22 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java +++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java @@ -71,7 +71,6 @@ public static synchronized SecurityOperation getInstance(ServerContext context) public static synchronized SecurityOperation getInstance(ServerContext context, boolean initialize) { if (instance == null) { - String instanceId = context.getInstanceID(); instance = new AuditedSecurityOperation(context, getAuthorizor(context, initialize), getAuthenticator(context, initialize), getPermHandler(context, initialize)); } diff --git a/test/src/main/java/org/apache/accumulo/test/UnusedWALIT.java b/test/src/main/java/org/apache/accumulo/test/UnusedWALIT.java index 7d4fe6d7a7..52b5b0c981 100644 --- a/test/src/main/java/org/apache/accumulo/test/UnusedWALIT.java +++ b/test/src/main/java/org/apache/accumulo/test/UnusedWALIT.java @@ -52,7 +52,10 @@ // It would be useful to have an IT that will test this situation. public class UnusedWALIT extends ConfigurableMacBase { - private ZooReaderWriter zk; + @Override + protected int defaultTimeoutSeconds() { + return 120; + } @Override protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { @@ -65,7 +68,7 @@ protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSit hadoopCoreSite.set("fs.namenode.fs-limits.min-block-size", Long.toString(logSize)); } - @Test(timeout = 2 * 60 * 1000) + @Test public void test() throws Exception { // don't want this bad boy cleaning up walog entries getCluster().getClusterControl().stop(ServerType.GARBAGE_COLLECTOR); @@ -79,7 +82,7 @@ public void test() throws Exception { c.tableOperations().create(lilTable); ServerContext context = getServerContext(); - zk = new ZooReaderWriter(c.info().getZooKeepers(), c.info().getZooKeepersSessionTimeOut(), ""); + new ZooReaderWriter(c.info().getZooKeepers(), c.info().getZooKeepersSessionTimeOut(), ""); // put some data in a log that should be replayed for both tables writeSomeData(c, bigTable, 0, 10, 0, 10); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services