Repository: accumulo Updated Branches: refs/heads/master 44f72a847 -> f8ca8d34d
http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java index 81192bd..6955327 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java @@ -17,9 +17,9 @@ package org.apache.accumulo.test.randomwalk.security; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Map; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.security.SystemPermission; @@ -77,7 +77,7 @@ public class SecurityHelper { } public static void setSysUserPass(State state, byte[] sysUserPass) { - log.debug("Setting system user pass to " + new String(sysUserPass, Constants.UTF8)); + log.debug("Setting system user pass to " + new String(sysUserPass, StandardCharsets.UTF_8)); state.set(masterPass, sysUserPass); state.set(masterPass + "time", System.currentTimeMillis()); @@ -92,7 +92,7 @@ public class SecurityHelper { } public static void setTabUserPass(State state, byte[] tabUserPass) { - log.debug("Setting table user pass to " + new String(tabUserPass, Constants.UTF8)); + log.debug("Setting table user pass to " + new String(tabUserPass, StandardCharsets.UTF_8)); state.set(tUserPass, tabUserPass); state.set(tUserPass + "time", System.currentTimeMillis()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java index 1d7b8a1..ef4593c 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/TableOp.java @@ -16,6 +16,7 @@ */ package org.apache.accumulo.test.randomwalk.security; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.Map.Entry; import java.util.Properties; @@ -24,7 +25,6 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.UUID; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -92,7 +92,7 @@ public class TableOp extends Test { if (!canRead && !ambiguousZone) throw new AccumuloException("Was able to read when I shouldn't have had the perm with connection user " + conn.whoami() + " table " + tableName); for (Entry<String,Integer> entry : WalkingSecurity.get(state,env).getAuthsMap().entrySet()) { - if (auths.contains(entry.getKey().getBytes(Constants.UTF8))) + if (auths.contains(entry.getKey().getBytes(StandardCharsets.UTF_8))) seen = seen - entry.getValue(); } if (seen != 0 && !ambiguousAuths) @@ -149,7 +149,7 @@ public class TableOp extends Test { String key = WalkingSecurity.get(state,env).getLastKey() + "1"; Mutation m = new Mutation(new Text(key)); for (String s : WalkingSecurity.get(state,env).getAuthsArray()) { - m.put(new Text(), new Text(), new ColumnVisibility(s), new Value("value".getBytes(Constants.UTF8))); + m.put(new Text(), new Text(), new ColumnVisibility(s), new Value("value".getBytes(StandardCharsets.UTF_8))); } BatchWriter writer = null; try { @@ -207,7 +207,7 @@ public class TableOp extends Test { f.startDefaultLocalityGroup(); fs.mkdirs(fail); for (Key k : keys) - f.append(k, new Value("Value".getBytes(Constants.UTF8))); + f.append(k, new Value("Value".getBytes(StandardCharsets.UTF_8))); f.close(); try { conn.tableOperations().importDirectory(tableName, dir.toString(), fail.toString(), true); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/Write.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/Write.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/Write.java index 063caa8..a0fdd9d 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/Write.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/sequential/Write.java @@ -16,9 +16,9 @@ */ package org.apache.accumulo.test.randomwalk.sequential; +import java.nio.charset.StandardCharsets; import java.util.Properties; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; @@ -43,7 +43,7 @@ public class Write extends Test { state.set("totalWrites", totalWrites); Mutation m = new Mutation(new Text(String.format("%010d", totalWrites))); - m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes(Constants.UTF8))); + m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java index b6d064a..3b9a92a 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java @@ -19,12 +19,12 @@ package org.apache.accumulo.test.randomwalk.shard; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.PrintStream; +import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.List; import java.util.Properties; import java.util.Random; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.MutationsRejectedException; @@ -164,13 +164,13 @@ public class BulkInsert extends Test { private void sort(State state, Environment env, FileSystem fs, String tableName, String seqFile, String outputDir, String workDir, int maxSplits) throws Exception { - PrintStream out = new PrintStream(new BufferedOutputStream(fs.create(new Path(workDir + "/splits.txt"))), false, Constants.UTF8.name()); + PrintStream out = new PrintStream(new BufferedOutputStream(fs.create(new Path(workDir + "/splits.txt"))), false, StandardCharsets.UTF_8.name()); Connector conn = env.getConnector(); Collection<Text> splits = conn.tableOperations().listSplits(tableName, maxSplits); for (Text split : splits) - out.println(new String(Base64.encodeBase64(TextUtil.getBytes(split)), Constants.UTF8)); + out.println(new String(Base64.encodeBase64(TextUtil.getBytes(split)), StandardCharsets.UTF_8)); out.close(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/ExportIndex.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/ExportIndex.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/ExportIndex.java index 989dca9..f625870 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/ExportIndex.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/ExportIndex.java @@ -18,12 +18,12 @@ package org.apache.accumulo.test.randomwalk.shard; import java.io.BufferedReader; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.HashSet; import java.util.Map.Entry; import java.util.Properties; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.test.randomwalk.Environment; @@ -68,7 +68,7 @@ public class ExportIndex extends Test { long t3 = System.currentTimeMillis(); // copy files - BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(new Path(exportDir, "distcp.txt")), Constants.UTF8)); + BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(new Path(exportDir, "distcp.txt")), StandardCharsets.UTF_8)); String file = null; while ((file = reader.readLine()) != null) { Path src = new Path(file); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java b/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java index f4d1219..3abdef8 100644 --- a/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java +++ b/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java @@ -16,11 +16,11 @@ */ package org.apache.accumulo.test.scalability; +import java.nio.charset.StandardCharsets; import java.util.Random; import java.util.UUID; import java.util.concurrent.TimeUnit; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -102,7 +102,7 @@ public class Ingest extends ScaleTest { while (count < numIngestEntries) { count++; long rowId = ContinuousIngest.genLong(minRow, maxRow, r); - Mutation m = ContinuousIngest.genMutation(rowId, r.nextInt(maxColF), r.nextInt(maxColQ), cv, ingestInstanceId.getBytes(Constants.UTF8), count, null, r, false); + Mutation m = ContinuousIngest.genMutation(rowId, r.nextInt(maxColF), r.nextInt(maxColQ), cv, ingestInstanceId.getBytes(StandardCharsets.UTF_8), count, null, r, false); totalBytes += m.numBytes(); try { bw.addMutation(m); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java index dc44854..a4f0575 100644 --- a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java +++ b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java @@ -21,13 +21,13 @@ import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Map; import java.util.Set; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchScanner; @@ -104,7 +104,7 @@ public class AuditMessageIT extends ConfigurableMacIT { for (File file : getCluster().getConfig().getLogDir().listFiles()) { // We want to grab the files called .out if (file.getName().contains(".out") && file.isFile() && file.canRead()) { - LineIterator it = FileUtils.lineIterator(file, Constants.UTF8.name()); + LineIterator it = FileUtils.lineIterator(file, StandardCharsets.UTF_8.name()); try { while (it.hasNext()) { String line = it.nextLine(); @@ -275,7 +275,7 @@ public class AuditMessageIT extends ConfigurableMacIT { // We've exported the table metadata to the MiniAccumuloCluster root dir. Grab the .rf file path to re-import it File distCpTxt = new File(exportDir.toString() + "/distcp.txt"); File importFile = null; - LineIterator it = FileUtils.lineIterator(distCpTxt, Constants.UTF8.name()); + LineIterator it = FileUtils.lineIterator(distCpTxt, StandardCharsets.UTF_8.name()); // Just grab the first rf file, it will do for now. String filePrefix = "file:"; http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java b/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java index 10c7264..fdecf16 100644 --- a/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Collections; import java.util.EnumSet; @@ -33,7 +34,6 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -474,9 +474,9 @@ public class NamespacesIT extends SimpleMacIT { Mutation m1 = new Mutation("r1"); Mutation m2 = new Mutation("r2"); Mutation m3 = new Mutation("r3"); - m1.put("a", "b", new Value("abcde".getBytes(Constants.UTF8))); - m2.put("e", "f", new Value("123".getBytes(Constants.UTF8))); - m3.put("c", "d", new Value("zyxwv".getBytes(Constants.UTF8))); + m1.put("a", "b", new Value("abcde".getBytes(StandardCharsets.UTF_8))); + m2.put("e", "f", new Value("123".getBytes(StandardCharsets.UTF_8))); + m3.put("c", "d", new Value("zyxwv".getBytes(StandardCharsets.UTF_8))); BatchWriter bw = c.createBatchWriter(t1, new BatchWriterConfig()); bw.addMutations(Arrays.asList(m1, m2, m3)); try { http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/VolumeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java index ab6af14..b80c3de 100644 --- a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java @@ -23,6 +23,7 @@ import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -33,7 +34,6 @@ import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -461,7 +461,7 @@ public class VolumeIT extends ConfigurableMacIT { // check that root tablet is not on volume 1 String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH; ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null); - String rootTabletDir = new String(zookeeper.getData(zpath, false, null), Constants.UTF8); + String rootTabletDir = new String(zookeeper.getData(zpath, false, null), StandardCharsets.UTF_8); Assert.assertTrue(rootTabletDir.startsWith(v2.toString())); zookeeper.close(); @@ -523,7 +523,7 @@ public class VolumeIT extends ConfigurableMacIT { // check that root tablet is not on volume 1 or 2 String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH; ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null); - String rootTabletDir = new String(zookeeper.getData(zpath, false, null), Constants.UTF8); + String rootTabletDir = new String(zookeeper.getData(zpath, false, null), StandardCharsets.UTF_8); Assert.assertTrue(rootTabletDir.startsWith(v8.toString()) || rootTabletDir.startsWith(v9.toString())); zookeeper.close(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java index cc2285e..3d88d5d 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.Iterator; import java.util.Map.Entry; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -125,7 +125,7 @@ public class AddSplitIT extends SimpleMacIT { String row = String.format("%09d", i); Mutation m = new Mutation(new Text(row)); - m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i).getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java index a25e775..ea3d835 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java @@ -18,10 +18,10 @@ package org.apache.accumulo.test.functional; import static org.junit.Assert.assertEquals; +import java.nio.charset.StandardCharsets; import java.util.EnumSet; import java.util.Map.Entry; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -49,7 +49,7 @@ public class BadIteratorMincIT extends SimpleMacIT { BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig()); Mutation m = new Mutation(new Text("r1")); - m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(Constants.UTF8))); + m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); bw.close(); @@ -86,7 +86,7 @@ public class BadIteratorMincIT extends SimpleMacIT { c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.minc)); bw = c.createBatchWriter(tableName, new BatchWriterConfig()); m = new Mutation(new Text("r2")); - m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(Constants.UTF8))); + m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); bw.close(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java index 22f0d98..567a386 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java @@ -16,6 +16,7 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -23,7 +24,6 @@ import java.util.HashMap; import java.util.Map.Entry; import java.util.Random; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; @@ -59,7 +59,7 @@ public class BatchScanSplitIT extends ConfigurableMacIT { for (int i = 0; i < numRows; i++) { Mutation m = new Mutation(new Text(String.format("%09x", i))); - m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i).getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i).getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } @@ -83,7 +83,7 @@ public class BatchScanSplitIT extends ConfigurableMacIT { for (int i = 0; i < 100; i++) { int r = random.nextInt(numRows); Text row = new Text(String.format("%09x", r)); - expected.put(row, new Value(String.format("%016x", numRows - r).getBytes(Constants.UTF8))); + expected.put(row, new Value(String.format("%016x", numRows - r).getBytes(StandardCharsets.UTF_8))); ranges.add(new Range(row)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java index 34fb402..c76f65c 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.Map.Entry; import java.util.Random; import java.util.concurrent.TimeUnit; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -62,7 +62,7 @@ public class BatchWriterFlushIT extends SimpleMacIT { Scanner scanner = getConnector().createScanner(tableName, Authorizations.EMPTY); Mutation m = new Mutation(new Text(String.format("r_%10d", 1))); - m.put(new Text("cf"), new Text("cq"), new Value("1".getBytes(Constants.UTF8))); + m.put(new Text("cf"), new Text("cq"), new Value("1".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); UtilWaitThread.sleep(500); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java index 10fb7f4..e8e0793 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.conf.AccumuloConfiguration; @@ -108,7 +108,7 @@ public class BulkFileIT extends SimpleMacIT { private void writeData(FileSKVWriter w, int s, int e) throws Exception { for (int i = s; i <= e; i++) { - w.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i).getBytes(Constants.UTF8))); + w.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8))); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/ConcurrencyIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConcurrencyIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ConcurrencyIT.java index b2d16ad..99a9880 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ConcurrencyIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ConcurrencyIT.java @@ -16,10 +16,10 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.EnumSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -90,7 +90,7 @@ public class ConcurrencyIT extends ConfigurableMacIT { BatchWriter bw = c.createBatchWriter("cct", new BatchWriterConfig()); for (int i = 0; i < 50; i++) { Mutation m = new Mutation(new Text(String.format("%06d", i))); - m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } bw.flush(); @@ -106,7 +106,7 @@ public class ConcurrencyIT extends ConfigurableMacIT { for (int i = 0; i < 50; i++) { Mutation m = new Mutation(new Text(String.format("%06d", i))); - m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java index ef2212d..5b30ca5 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -67,7 +67,7 @@ public class ConstraintIT extends SimpleMacIT { BatchWriter bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig()); Mutation mut1 = new Mutation(new Text("r1")); - mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(Constants.UTF8))); + mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(StandardCharsets.UTF_8))); bw.addMutation(mut1); @@ -78,7 +78,7 @@ public class ConstraintIT extends SimpleMacIT { // create a mutation with a non numeric value Mutation mut2 = new Mutation(new Text("r1")); - mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a".getBytes(Constants.UTF8))); + mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a".getBytes(StandardCharsets.UTF_8))); bw.addMutation(mut2); @@ -121,7 +121,7 @@ public class ConstraintIT extends SimpleMacIT { Entry<Key,Value> entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } @@ -144,7 +144,7 @@ public class ConstraintIT extends SimpleMacIT { entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } @@ -161,7 +161,7 @@ public class ConstraintIT extends SimpleMacIT { bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig()); Mutation mut3 = new Mutation(new Text("r1")); - mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(Constants.UTF8))); + mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8))); bw.addMutation(mut3); @@ -184,7 +184,7 @@ public class ConstraintIT extends SimpleMacIT { entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } @@ -207,7 +207,7 @@ public class ConstraintIT extends SimpleMacIT { entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("foo".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("foo".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } @@ -219,7 +219,7 @@ public class ConstraintIT extends SimpleMacIT { private Mutation newMut(String row, String cf, String cq, String val) { Mutation mut1 = new Mutation(new Text(row)); - mut1.put(new Text(cf), new Text(cq), new Value(val.getBytes(Constants.UTF8))); + mut1.put(new Text(cf), new Text(cq), new Value(val.getBytes(StandardCharsets.UTF_8))); return mut1; } @@ -291,14 +291,14 @@ public class ConstraintIT extends SimpleMacIT { Entry<Key,Value> entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } entry = iter.next(); if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1")) - || !entry.getKey().getColumnQualifier().equals(new Text("cq4")) || !entry.getValue().equals(new Value("789".getBytes(Constants.UTF8)))) { + || !entry.getKey().getColumnQualifier().equals(new Text("cq4")) || !entry.getValue().equals(new Value("789".getBytes(StandardCharsets.UTF_8)))) { throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java index 3dbf5ce..ab0a240 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; @@ -57,7 +57,7 @@ public class CreateAndUseIT extends SimpleMacIT { for (int i = 1; i < 257; i++) { Mutation m = new Mutation(new Text(String.format("%08x", (i << 8) - 16))); - m.put(cf, cq, new Value(Integer.toString(i).getBytes(Constants.UTF8))); + m.put(cf, cq, new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java index e251157..8b44252 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java @@ -18,10 +18,10 @@ package org.apache.accumulo.test.functional; import static org.junit.Assert.*; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.Map.Entry; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -51,7 +51,7 @@ public class DeleteEverythingIT extends ConfigurableMacIT { c.tableOperations().create("de"); BatchWriter bw = getConnector().createBatchWriter("de", new BatchWriterConfig()); Mutation m = new Mutation(new Text("foo")); - m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(Constants.UTF8))); + m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); bw.flush(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java index 0a0b0b9..2179ca3 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java @@ -18,6 +18,7 @@ package org.apache.accumulo.test.functional; import static org.junit.Assert.assertTrue; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -25,7 +26,6 @@ import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Scanner; @@ -47,9 +47,9 @@ public class DeleteRowsSplitIT extends SimpleMacIT { static final SortedSet<Text> SPLITS = new TreeSet<Text>(); static final List<String> ROWS = new ArrayList<String>(); static { - for (byte b : LETTERS.getBytes(Constants.UTF8)) { + for (byte b : LETTERS.getBytes(StandardCharsets.UTF_8)) { SPLITS.add(new Text(new byte[] {b})); - ROWS.add(new String(new byte[] {b}, Constants.UTF8)); + ROWS.add(new String(new byte[] {b}, StandardCharsets.UTF_8)); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java index 31783c4..0358138 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.Map.Entry; import java.util.Random; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -108,7 +108,7 @@ public class LargeRowIT extends ConfigurableMacIT { TestIngest.toPrintableChars(rowData); Mutation mut = new Mutation(new Text(rowData)); - mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(Constants.UTF8))); + mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8))); bw.addMutation(mut); } @@ -156,7 +156,7 @@ public class LargeRowIT extends ConfigurableMacIT { if (!entry.getKey().getRow().equals(new Text(rowData))) { throw new Exception("verification failed, unexpected row i =" + i); } - if (!entry.getValue().equals(Integer.toString(i).getBytes(Constants.UTF8))) { + if (!entry.getValue().equals(Integer.toString(i).getBytes(StandardCharsets.UTF_8))) { throw new Exception("verification failed, unexpected value i =" + i + " value = " + entry.getValue()); } count++; http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java index 3102f59..0512998 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -59,7 +60,7 @@ public class NativeMapIT { } private Value nv(int v) { - return new Value(String.format("r%09d", v).getBytes(Constants.UTF8)); + return new Value(String.format("r%09d", v).getBytes(StandardCharsets.UTF_8)); } public static File nativeMapLocation() { @@ -127,12 +128,12 @@ public class NativeMapIT { for (int l = 0; l < num; l++) { for (int ts = 0; ts < num; ts++) { Key key = nk(i, j, k, l, ts, true); - Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(Constants.UTF8)); + Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8)); nm.put(key, value); key = nk(i, j, k, l, ts, false); - value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(Constants.UTF8)); + value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8)); nm.put(key, value); } @@ -149,7 +150,7 @@ public class NativeMapIT { for (int l = 0; l < num; l++) { for (int ts = num - 1; ts >= 0; ts--) { Key key = nk(i, j, k, l, ts, true); - Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(Constants.UTF8)); + Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8)); assertTrue(iter.hasNext()); Entry<Key,Value> entry = iter.next(); @@ -157,7 +158,7 @@ public class NativeMapIT { assertEquals(value, entry.getValue()); key = nk(i, j, k, l, ts, false); - value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(Constants.UTF8)); + value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8)); assertTrue(iter.hasNext()); entry = iter.next(); @@ -177,7 +178,7 @@ public class NativeMapIT { for (int l = 0; l < num; l++) { for (int ts = 0; ts < num; ts++) { Key key = nk(i, j, k, l, ts, true); - Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(Constants.UTF8)); + Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8)); assertEquals(value, nm.get(key)); @@ -188,7 +189,7 @@ public class NativeMapIT { assertEquals(value, entry.getValue()); key = nk(i, j, k, l, ts, false); - value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(Constants.UTF8)); + value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8)); assertEquals(value, nm.get(key)); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java index c62592b..bab7492 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java @@ -16,12 +16,12 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Map.Entry; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; @@ -49,8 +49,8 @@ public class ScanIteratorIT extends SimpleMacIT { for (int i = 0; i < 1000; i++) { Mutation m = new Mutation(new Text(String.format("%06d", i))); - m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(Constants.UTF8))); - m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(StandardCharsets.UTF_8))); + m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java index 818cf92..1ee3a42 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java @@ -16,10 +16,10 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Map.Entry; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -224,7 +224,7 @@ public class ScanRangeIT extends SimpleMacIT { for (int j = 0; j < CF_LIMIT; j++) { for (int k = 0; k < CQ_LIMIT; k++) { for (int t = 0; t < TS_LIMIT; t++) { - m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(Constants.UTF8))); + m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(StandardCharsets.UTF_8))); } } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java index 693a67d..0496d1b 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java @@ -16,11 +16,11 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.Iterator; import java.util.Map.Entry; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -53,7 +53,7 @@ public class ScanSessionTimeOutIT extends ConfigurableMacIT { for (int i = 0; i < 100000; i++) { Mutation m = new Mutation(new Text(String.format("%08d", i))); for (int j = 0; j < 3; j++) - m.put(new Text("cf1"), new Text("cq" + j), new Value((i + "_" + j).getBytes(Constants.UTF8))); + m.put(new Text("cf1"), new Text("cq" + j), new Value((i + "_" + j).getBytes(StandardCharsets.UTF_8))); bw.addMutation(m); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java index d9de5d1..6d9e3ef 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java @@ -18,6 +18,7 @@ package org.apache.accumulo.test.functional; import static org.junit.Assert.assertEquals; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -89,7 +90,7 @@ public class SplitRecoveryIT extends ConfigurableMacIT { public void unableToMonitorLockNode(Throwable e) { System.exit(-1); } - }, "foo".getBytes(Constants.UTF8)); + }, "foo".getBytes(StandardCharsets.UTF_8)); if (!gotLock) { System.err.println("Failed to get lock " + zPath); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java index 9f7333d..670649d 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java @@ -18,12 +18,12 @@ package org.apache.accumulo.test.functional; import static org.junit.Assert.assertEquals; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; @@ -77,7 +77,7 @@ public class TabletIT extends ConfigurableMacIT { // populate for (int i = 0; i < N; i++) { Mutation m = new Mutation(new Text(String.format("%05d", i))); - m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(Constants.UTF8))); + m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(StandardCharsets.UTF_8))); b.addMutation(m); } b.close(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f8ca8d34/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java b/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java index 044a29d..55fd767 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java @@ -16,6 +16,7 @@ */ package org.apache.accumulo.test.functional; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -28,7 +29,6 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; @@ -77,12 +77,12 @@ public class VisibilityIT extends SimpleMacIT { } private void mput(Mutation m, String cf, String cq, String cv, String val) { - ColumnVisibility le = new ColumnVisibility(cv.getBytes(Constants.UTF8)); - m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(Constants.UTF8))); + ColumnVisibility le = new ColumnVisibility(cv.getBytes(StandardCharsets.UTF_8)); + m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(StandardCharsets.UTF_8))); } private void mputDelete(Mutation m, String cf, String cq, String cv) { - ColumnVisibility le = new ColumnVisibility(cv.getBytes(Constants.UTF8)); + ColumnVisibility le = new ColumnVisibility(cv.getBytes(StandardCharsets.UTF_8)); m.putDelete(new Text(cf), new Text(cq), le); } @@ -259,7 +259,7 @@ public class VisibilityIT extends SimpleMacIT { private ByteArraySet nbas(Set<String> auths) { ByteArraySet bas = new ByteArraySet(); for (String auth : auths) { - bas.add(auth.getBytes(Constants.UTF8)); + bas.add(auth.getBytes(StandardCharsets.UTF_8)); } return bas; }