You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2019/11/07 23:56:44 UTC
[accumulo] branch master updated: Stopped calling getBytes() on
strings passed to Value (#1412)
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push:
new 6b54a5d Stopped calling getBytes() on strings passed to Value (#1412)
6b54a5d is described below
commit 6b54a5d89aa10103105db1a6c6c88903fcaa90e6
Author: Keith Turner <kt...@apache.org>
AuthorDate: Thu Nov 7 18:56:35 2019 -0500
Stopped calling getBytes() on strings passed to Value (#1412)
Recently while fixing an IT I noticed it was doing new
Value(X.getBytes()). The Value constructor has accepted strings for a
while. I automatically fixed this with the following commands.
```bash
# replace code like new Value((X).getBytes()) with new Value(X)
find . -name "*.java" | xargs sed -r -i 's/new\s+Value\(\((.*)\)[.]getBytes\((UTF_8)?\)\)/new Value\(\1\)/'
# replace code like new Value(X.getBytes()) with new Value(X)
find . -name "*.java" | xargs sed -r -i 's/(new\s+Value\(.*)[.]getBytes\((UTF_8)?\)\)/\1\)
```
---
.../accumulo/core/file/BloomFilterLayer.java | 6 +-
.../core/iterators/ColumnFamilyCounter.java | 4 +-
.../core/iterators/user/LargeRowFilter.java | 4 +-
.../core/iterators/user/RowDeletingIterator.java | 4 +-
.../core/metadata/schema/RootTabletMetadata.java | 2 +-
.../accumulo/core/tabletserver/log/LogEntry.java | 4 +-
.../accumulo/core/client/RowIteratorTest.java | 2 +-
.../core/client/rfile/RFileClientTest.java | 38 ++++++-------
.../core/clientImpl/TabletLocatorImplTest.java | 4 +-
.../accumulo/core/conf/IterConfigUtilTest.java | 4 +-
.../apache/accumulo/core/data/MutationTest.java | 8 +--
.../org/apache/accumulo/core/data/ValueTest.java | 2 +-
.../core/file/BloomFilterLayerLookupTest.java | 4 +-
.../core/file/rfile/CreateCompatTestFile.java | 2 +-
.../core/file/rfile/MultiThreadedRFileTest.java | 2 +-
.../accumulo/core/file/rfile/RFileMetricsTest.java | 6 +-
.../apache/accumulo/core/file/rfile/RFileTest.java | 26 ++++-----
.../iterators/FirstEntryInRowIteratorTest.java | 2 +-
.../core/iterators/FirstEntryInRowTest.java | 4 +-
.../system/ColumnFamilySkippingIteratorTest.java | 4 +-
.../iterators/system/DeletingIteratorTest.java | 8 +--
.../core/iterators/system/MultiIteratorTest.java | 2 +-
.../system/SourceSwitchingIteratorTest.java | 2 +-
.../iterators/system/TimeSettingIteratorTest.java | 20 +++----
.../core/iterators/user/ColumnSliceFilterTest.java | 2 +-
.../accumulo/core/iterators/user/CombinerTest.java | 16 +++---
.../core/iterators/user/GrepIteratorTest.java | 28 ++++-----
.../iterators/user/IndexedDocIteratorTest.java | 2 +-
.../core/iterators/user/LargeRowFilterTest.java | 3 +-
.../core/iterators/user/RegExFilterTest.java | 4 +-
.../iterators/user/RowDeletingIteratorTest.java | 2 +-
.../iterators/user/TransformingIteratorTest.java | 8 +--
.../iterators/user/VersioningIteratorTest.java | 8 +--
.../user/WholeColumnFamilyIteratorTest.java | 25 ++++----
.../core/iterators/user/WholeRowIteratorTest.java | 27 +++++----
.../core/util/format/DefaultFormatterTest.java | 2 +-
.../ShardedTableDistributionFormatterTest.java | 7 +--
.../hadoop/its/mapred/AccumuloInputFormatIT.java | 4 +-
.../hadoop/its/mapred/AccumuloOutputFormatIT.java | 5 +-
.../hadoop/its/mapred/MultiTableInputFormatIT.java | 4 +-
.../accumulo/hadoop/its/mapred/TokenFileIT.java | 2 +-
.../its/mapreduce/AccumuloInputFormatIT.java | 10 ++--
.../its/mapreduce/AccumuloOutputFormatIT.java | 2 +-
.../its/mapreduce/MultiTableInputFormatIT.java | 4 +-
.../accumulo/hadoop/its/mapreduce/TokenFileIT.java | 2 +-
.../iteratortest/framework/JUnitFrameworkTest.java | 6 +-
.../apache/accumulo/server/init/Initialize.java | 2 +-
.../server/master/state/TServerInstance.java | 2 +-
.../accumulo/server/util/MetadataTableUtil.java | 7 +--
.../constraints/MetadataConstraintsTest.java | 66 +++++++++-------------
.../accumulo/server/data/ServerMutationTest.java | 4 +-
.../iterators/MetadataBulkLoadFilterTest.java | 6 +-
.../org/apache/accumulo/tracer/TraceServer.java | 2 +-
.../accumulo/tserver/CheckTabletMetadataTest.java | 2 +-
.../accumulo/tserver/CountingIteratorTest.java | 4 +-
.../apache/accumulo/tserver/InMemoryMapTest.java | 14 ++---
.../apache/accumulo/tserver/log/LogEntryTest.java | 2 +-
.../tserver/log/SortedLogRecoveryTest.java | 6 +-
.../accumulo/tserver/logger/LogFileTest.java | 8 +--
.../shell/format/DeleterFormatterTest.java | 8 +--
.../org/apache/accumulo/test/BatchWriterIT.java | 2 +-
.../accumulo/test/BatchWriterInTabletServerIT.java | 2 +-
.../apache/accumulo/test/BatchWriterIterator.java | 4 +-
.../java/org/apache/accumulo/test/CloneIT.java | 14 ++---
.../apache/accumulo/test/ConditionalWriterIT.java | 5 +-
.../accumulo/test/GenerateSequentialRFile.java | 5 +-
.../org/apache/accumulo/test/HardListIterator.java | 6 +-
.../org/apache/accumulo/test/InMemoryMapIT.java | 34 +++++------
.../org/apache/accumulo/test/NamespacesIT.java | 9 ++-
.../test/RecoveryCompactionsAreFlushesIT.java | 2 +-
.../java/org/apache/accumulo/test/SampleIT.java | 16 +++---
.../org/apache/accumulo/test/ShellServerIT.java | 2 +-
.../org/apache/accumulo/test/SplitRecoveryIT.java | 8 +--
.../apache/accumulo/test/TableOperationsIT.java | 2 +-
.../org/apache/accumulo/test/TestBinaryRows.java | 2 +-
.../apache/accumulo/test/TestMultiTableIngest.java | 4 +-
.../accumulo/test/functional/AddSplitIT.java | 3 +-
.../test/functional/BadIteratorMincIT.java | 5 +-
.../test/functional/BadLocalityGroupMincIT.java | 3 +-
.../accumulo/test/functional/BatchScanSplitIT.java | 6 +-
.../test/functional/BatchWriterFlushIT.java | 7 +--
.../accumulo/test/functional/BloomFilterIT.java | 8 +--
.../apache/accumulo/test/functional/BulkNewIT.java | 3 +-
.../apache/accumulo/test/functional/BulkOldIT.java | 5 +-
.../accumulo/test/functional/ConcurrencyIT.java | 5 +-
.../accumulo/test/functional/ConstraintIT.java | 21 ++++---
.../accumulo/test/functional/CreateAndUseIT.java | 3 +-
.../test/functional/DeleteEverythingIT.java | 3 +-
.../test/functional/FunctionalTestUtils.java | 2 +-
.../accumulo/test/functional/KerberosIT.java | 2 +-
.../accumulo/test/functional/LargeRowIT.java | 5 +-
.../accumulo/test/functional/NativeMapIT.java | 2 +-
.../accumulo/test/functional/PermissionsIT.java | 6 +-
.../accumulo/test/functional/ReadWriteIT.java | 2 +-
.../apache/accumulo/test/functional/ScanIdIT.java | 7 +--
.../accumulo/test/functional/ScanIteratorIT.java | 9 +--
.../accumulo/test/functional/ScanRangeIT.java | 4 +-
.../test/functional/ScanSessionTimeOutIT.java | 3 +-
.../test/functional/SessionBlockVerifyIT.java | 3 +-
.../apache/accumulo/test/functional/TabletIT.java | 3 +-
.../functional/TabletStateChangeIteratorIT.java | 5 +-
.../accumulo/test/functional/VisibilityIT.java | 2 +-
.../test/mapred/AccumuloInputFormatIT.java | 4 +-
.../mapred/AccumuloMultiTableInputFormatIT.java | 6 +-
.../test/mapred/AccumuloOutputFormatIT.java | 5 +-
.../apache/accumulo/test/mapred/TokenFileIT.java | 2 +-
.../test/mapreduce/AccumuloInputFormatIT.java | 2 +-
.../mapreduce/AccumuloMultiTableInputFormatIT.java | 4 +-
.../test/mapreduce/AccumuloOutputFormatIT.java | 2 +-
.../accumulo/test/mapreduce/TokenFileIT.java | 2 +-
.../apache/accumulo/test/master/MergeStateIT.java | 12 ++--
.../UnusedWalDoesntCloseReplicationStatusIT.java | 2 +-
.../org/apache/accumulo/test/util/SlowOps.java | 5 +-
.../constraints/AlphaNumKeyConstraintTest.java | 4 +-
.../constraints/NumericValueConstraintTest.java | 6 +-
.../apache/accumulo/test/iterator/RegExTest.java | 2 +-
.../test/iterator/SummingCombinerTest.java | 4 +-
.../test/iterator/WholeRowIteratorTest.java | 60 ++++++++++----------
118 files changed, 382 insertions(+), 454 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
index 6e150e5..43da90f 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
@@ -18,8 +18,6 @@
package org.apache.accumulo.core.file;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@@ -485,9 +483,9 @@ public class BloomFilterLayer {
for (Integer i : vals) {
String fi = String.format("%010d", i);
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")),
- new Value(("v" + fi).getBytes(UTF_8)));
+ new Value("v" + fi));
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")),
- new Value(("v" + fi).getBytes(UTF_8)));
+ new Value("v" + fi));
}
long t2 = System.currentTimeMillis();
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java b/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
index 5fa3d92..0e47b45 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.core.iterators;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
@@ -62,7 +60,7 @@ public class ColumnFamilyCounter implements SortedKeyValueIterator<Key,Value> {
}
this.key = new Key(currentRow.toArray(), currentColf.toArray(), new byte[0], new byte[0], ts);
- this.value = new Value(Integer.toString(count).getBytes(UTF_8));
+ this.value = new Value(Integer.toString(count));
} else {
this.key = null;
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
index fc2863f..61de6aa 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.core.iterators.user;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@@ -48,7 +46,7 @@ import org.apache.hadoop.io.Text;
*/
public class LargeRowFilter implements SortedKeyValueIterator<Key,Value>, OptionDescriber {
- public static final Value SUPPRESS_ROW_VALUE = new Value("SUPPRESS_ROW".getBytes(UTF_8));
+ public static final Value SUPPRESS_ROW_VALUE = new Value("SUPPRESS_ROW");
private static final ByteSequence EMPTY = new ArrayByteSequence(new byte[] {});
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
index ade411a..7bf6794 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.core.iterators.user;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
@@ -52,7 +50,7 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
*/
public class RowDeletingIterator implements SortedKeyValueIterator<Key,Value> {
- public static final Value DELETE_ROW_VALUE = new Value("DEL_ROW".getBytes(UTF_8));
+ public static final Value DELETE_ROW_VALUE = new Value("DEL_ROW");
private SortedKeyValueIterator<Key,Value> source;
private boolean propogateDeletes;
private ByteSequence currentRow;
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/schema/RootTabletMetadata.java b/core/src/main/java/org/apache/accumulo/core/metadata/schema/RootTabletMetadata.java
index c5a02df..462f1df 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/schema/RootTabletMetadata.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/schema/RootTabletMetadata.java
@@ -181,7 +181,7 @@ public class RootTabletMetadata {
public static byte[] getInitialJson(String dirName, String file) {
ServerColumnFamily.validateDirCol(dirName);
Mutation mutation = RootTable.EXTENT.getPrevRowUpdateMutation();
- ServerColumnFamily.DIRECTORY_COLUMN.put(mutation, new Value(dirName.getBytes(UTF_8)));
+ ServerColumnFamily.DIRECTORY_COLUMN.put(mutation, new Value(dirName));
mutation.put(DataFileColumnFamily.STR_NAME, file, new DataFileValue(0, 0).encodeAsValue());
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
index ed0bdc3..51f3ea1 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.core.tabletserver.log;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.IOException;
import java.util.Arrays;
@@ -117,6 +115,6 @@ public class LogEntry {
}
public Value getValue() {
- return new Value(filename.getBytes(UTF_8));
+ return new Value(filename);
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
index 9d27db8..cf04b4e 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
@@ -40,7 +40,7 @@ public class RowIteratorTest {
for (String s : args) {
final String[] parts = s.split("[ \t]");
final Key key = new Key(parts[0], parts[1], parts[2]);
- final Value value = new Value(parts[3].getBytes());
+ final Value value = new Value(parts[3]);
result.put(key, value);
}
return result.entrySet().iterator();
diff --git a/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileClientTest.java b/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileClientTest.java
index dec5a2c..cd1c414 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileClientTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileClientTest.java
@@ -110,7 +110,7 @@ public class RFileClientTest {
String qual = colStr(q);
for (String v : vis) {
Key k = new Key(row, fam, qual, v);
- testData.put(k, new Value((k.hashCode() + "").getBytes()));
+ testData.put(k, new Value(k.hashCode() + ""));
}
}
}
@@ -324,9 +324,9 @@ public class RFileClientTest {
Key k2 = new Key("r1", "f1", "q2", "A");
Key k3 = new Key("r1", "f1", "q3");
- Value v1 = new Value("p".getBytes());
- Value v2 = new Value("c".getBytes());
- Value v3 = new Value("t".getBytes());
+ Value v1 = new Value("p");
+ Value v2 = new Value("c");
+ Value v3 = new Value("t");
writer.append(k1, v1);
writer.append(k2, v2);
@@ -365,8 +365,8 @@ public class RFileClientTest {
k2.setTimestamp(6);
k2.setDeleted(true);
- Value v1 = new Value("p".getBytes());
- Value v2 = new Value("".getBytes());
+ Value v1 = new Value("p");
+ Value v2 = new Value("");
writer.append(k2, v2);
writer.append(k1, v1);
@@ -430,8 +430,8 @@ public class RFileClientTest {
Key k2 = new Key("r1", "f1", "q1");
k2.setTimestamp(6);
- Value v1 = new Value("p".getBytes());
- Value v2 = new Value("q".getBytes());
+ Value v1 = new Value("p");
+ Value v2 = new Value("q");
writer.append(k2, v2);
writer.append(k1, v1);
@@ -693,10 +693,10 @@ public class RFileClientTest {
public void testOutOfOrder() throws Exception {
// test that exception declared in API is thrown
Key k1 = new Key("r1", "f1", "q1");
- Value v1 = new Value("1".getBytes());
+ Value v1 = new Value("1");
Key k2 = new Key("r2", "f1", "q1");
- Value v2 = new Value("2".getBytes());
+ Value v2 = new Value("2");
LocalFileSystem localFs = FileSystem.getLocal(new Configuration());
String testFile = createTmpTestFile();
@@ -710,10 +710,10 @@ public class RFileClientTest {
public void testOutOfOrderIterable() throws Exception {
// test that exception declared in API is thrown
Key k1 = new Key("r1", "f1", "q1");
- Value v1 = new Value("1".getBytes());
+ Value v1 = new Value("1");
Key k2 = new Key("r2", "f1", "q1");
- Value v2 = new Value("2".getBytes());
+ Value v2 = new Value("2");
ArrayList<Entry<Key,Value>> data = new ArrayList<>();
data.add(new AbstractMap.SimpleEntry<>(k2, v2));
@@ -735,7 +735,7 @@ public class RFileClientTest {
try (RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).build()) {
writer.startDefaultLocalityGroup();
Key k1 = new Key("r1", "f1", "q1", "(A&(B");
- writer.append(k1, new Value("".getBytes()));
+ writer.append(k1, new Value(""));
}
}
@@ -747,7 +747,7 @@ public class RFileClientTest {
try (RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).build()) {
writer.startDefaultLocalityGroup();
Key k1 = new Key("r1", "f1", "q1", "(A&(B");
- Entry<Key,Value> entry = new AbstractMap.SimpleEntry<>(k1, new Value("".getBytes()));
+ Entry<Key,Value> entry = new AbstractMap.SimpleEntry<>(k1, new Value(""));
writer.append(Collections.singletonList(entry));
}
}
@@ -767,7 +767,7 @@ public class RFileClientTest {
LocalFileSystem localFs = FileSystem.getLocal(new Configuration());
String testFile = createTmpTestFile();
try (RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).build()) {
- writer.append(new Key("r1", "f1", "q1"), new Value("1".getBytes()));
+ writer.append(new Key("r1", "f1", "q1"), new Value("1"));
writer.startDefaultLocalityGroup();
}
}
@@ -778,7 +778,7 @@ public class RFileClientTest {
String testFile = createTmpTestFile();
try (RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).build()) {
Key k1 = new Key("r1", "f1", "q1");
- writer.append(k1, new Value("".getBytes()));
+ writer.append(k1, new Value(""));
writer.startNewLocalityGroup("lg1", "fam1");
}
}
@@ -791,7 +791,7 @@ public class RFileClientTest {
writer.startNewLocalityGroup("lg1", "fam1");
Key k1 = new Key("r1", "f1", "q1");
// should not be able to append the column family f1
- writer.append(k1, new Value("".getBytes()));
+ writer.append(k1, new Value(""));
}
}
@@ -802,11 +802,11 @@ public class RFileClientTest {
try (RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).build()) {
writer.startNewLocalityGroup("lg1", "fam1");
Key k1 = new Key("r1", "fam1", "q1");
- writer.append(k1, new Value("".getBytes()));
+ writer.append(k1, new Value(""));
writer.startDefaultLocalityGroup();
// should not be able to append the column family fam1 to default locality group
Key k2 = new Key("r1", "fam1", "q2");
- writer.append(k2, new Value("".getBytes()));
+ writer.append(k2, new Value(""));
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java b/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
index 0ac7e4c..91bd45f 100644
--- a/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
@@ -226,7 +226,7 @@ public class TabletLocatorImplTest {
String[] cvp = element.split("=");
String[] cols = cvp[0].split(":");
- mut.put(new Text(cols[0]), new Text(cols[1]), new Value(cvp[1].getBytes()));
+ mut.put(new Text(cols[0]), new Text(cols[1]), new Value(cvp[1]));
}
return mut;
@@ -579,7 +579,7 @@ public class TabletLocatorImplTest {
if (instance == null)
instance = "";
Key lk = new Key(mr, TabletsSection.CurrentLocationColumnFamily.NAME, new Text(instance));
- tabletData.put(lk, new Value(location.getBytes()));
+ tabletData.put(lk, new Value(location));
}
Key pk = new Key(mr, TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(),
diff --git a/core/src/test/java/org/apache/accumulo/core/conf/IterConfigUtilTest.java b/core/src/test/java/org/apache/accumulo/core/conf/IterConfigUtilTest.java
index 4973a62..bfbb1e9 100644
--- a/core/src/test/java/org/apache/accumulo/core/conf/IterConfigUtilTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/conf/IterConfigUtilTest.java
@@ -104,7 +104,7 @@ public class IterConfigUtilTest {
int orig = Integer.parseInt(val.toString());
- return new Value(((orig + amount) + "").getBytes());
+ return new Value((orig + amount) + "");
}
@Override
@@ -127,7 +127,7 @@ public class IterConfigUtilTest {
int orig = Integer.parseInt(val.toString());
- return new Value(((orig * orig) + "").getBytes());
+ return new Value((orig * orig) + "");
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java b/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
index f7dce23..06ba13d 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
@@ -64,7 +64,7 @@ public class MutationTest {
@Test
public void test1() {
Mutation m = new Mutation(new Text("r1"));
- m.put(new Text("cf1"), new Text("cq1"), new Value("v1".getBytes()));
+ m.put(new Text("cf1"), new Text("cq1"), new Value("v1"));
List<ColumnUpdate> updates = m.getUpdates();
@@ -82,8 +82,8 @@ public class MutationTest {
@Test
public void test2() throws IOException {
Mutation m = new Mutation(new Text("r1"));
- m.put(new Text("cf1"), new Text("cq1"), new Value("v1".getBytes()));
- m.put(new Text("cf2"), new Text("cq2"), 56, new Value("v2".getBytes()));
+ m.put(new Text("cf1"), new Text("cq1"), new Value("v1"));
+ m.put(new Text("cf2"), new Text("cq2"), 56, new Value("v2"));
List<ColumnUpdate> updates = m.getUpdates();
@@ -183,7 +183,7 @@ public class MutationTest {
}
private Value nv(String s) {
- return new Value(s.getBytes());
+ return new Value(s);
}
@Test
diff --git a/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java b/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java
index 849c106..a8b6ba4 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java
@@ -206,7 +206,7 @@ public class ValueTest {
@Test
public void testText() {
Value v1 = new Value(new Text("abc"));
- Value v2 = new Value("abc".getBytes(UTF_8));
+ Value v2 = new Value("abc");
assertEquals(v2, v1);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
index b81ff18..94d3d65 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
@@ -93,8 +93,8 @@ public class BloomFilterLayerLookupTest {
bmfw.startDefaultLocalityGroup();
for (Integer i : vals) {
String fi = String.format("%010d", i);
- bmfw.append(new Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes()));
- bmfw.append(new Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes()));
+ bmfw.append(new Key(new Text("r" + fi), new Text("cf1")), new Value("v" + fi));
+ bmfw.append(new Key(new Text("r" + fi), new Text("cf2")), new Value("v" + fi));
}
long t2 = System.currentTimeMillis();
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
index d04c9a5..342c71a 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
@@ -49,7 +49,7 @@ public class CreateCompatTestFile {
}
private static Value newValue(String val) {
- return new Value(val.getBytes());
+ return new Value(val);
}
private static String formatStr(String prefix, int i) {
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
index 6e9827b..7c26456 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
@@ -214,7 +214,7 @@ public class MultiThreadedRFileTest {
}
static Value newValue(String val) {
- return new Value(val.getBytes());
+ return new Value(val);
}
public AccumuloConfiguration conf = null;
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
index ac36add..dbdd570 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
@@ -519,8 +519,8 @@ public class RFileMetricsTest {
for (int row = 0; row < 1100; row++) {
String rs = String.format("%06x", row);
- trf.writer.append(new Key(rs, fam1, "q4", "A", 42L), new Value("v".getBytes()));
- trf.writer.append(new Key(rs, fam2, "q4", "A|B", 42L), new Value("v".getBytes()));
+ trf.writer.append(new Key(rs, fam1, "q4", "A", 42L), new Value("v"));
+ trf.writer.append(new Key(rs, fam2, "q4", "A|B", 42L), new Value("v"));
}
trf.writer.startDefaultLocalityGroup();
@@ -532,7 +532,7 @@ public class RFileMetricsTest {
String rs = String.format("%06x", row);
for (int v = 0; v < 5; v++) {
String fs = String.format("%06x", fam++);
- trf.writer.append(new Key(rs, fs, "q4", vis[v], 42L), new Value("v".getBytes()));
+ trf.writer.append(new Key(rs, fs, "q4", vis[v], 42L), new Value("v"));
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
index 65b1aff..2511eab 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
@@ -335,7 +335,7 @@ public class RFileTest {
}
static Value newValue(String val) {
- return new Value(val.getBytes());
+ return new Value(val);
}
static String formatString(String prefix, int i) {
@@ -1957,9 +1957,9 @@ public class RFileTest {
private Value newValue(int r, int c) {
switch (c) {
case 0:
- return new Value(("123" + r + " west st").getBytes());
+ return new Value("123" + r + " west st");
case 1:
- return new Value(("bob" + r).getBytes());
+ return new Value("bob" + r);
default:
throw new IllegalArgumentException();
}
@@ -2169,9 +2169,9 @@ public class RFileTest {
Key k2 = new Key(row, "metaB", "q8", 7);
Key k3 = new Key(row, "metaB", "qA", 7);
- Value v1 = new Value(("" + r).getBytes());
- Value v2 = new Value(("" + r * 93).getBytes());
- Value v3 = new Value(("" + r * 113).getBytes());
+ Value v1 = new Value("" + r);
+ Value v2 = new Value("" + r * 93);
+ Value v3 = new Value("" + r * 113);
if (sampler.accept(k1)) {
sampleDataLG1.add(new AbstractMap.SimpleImmutableEntry<>(k1, v1));
@@ -2190,7 +2190,7 @@ public class RFileTest {
String row = String.format("r%06d", r);
Key k1 = new Key(row, "dataA", "q9", 7);
- Value v1 = new Value(("" + r).getBytes());
+ Value v1 = new Value("" + r);
if (sampler.accept(k1)) {
sampleDataLG2.add(new AbstractMap.SimpleImmutableEntry<>(k1, v1));
@@ -2264,7 +2264,7 @@ public class RFileTest {
trf.openWriter();
for (Key k : keys) {
- trf.writer.append(k, new Value((k.hashCode() + "").getBytes()));
+ trf.writer.append(k, new Value(k.hashCode() + ""));
}
trf.writer.close();
@@ -2284,7 +2284,7 @@ public class RFileTest {
trf.reader.seek(new Range(key, null), EMPTY_COL_FAMS, false);
assertTrue(trf.reader.hasTop());
assertEquals(key, trf.reader.getTopKey());
- assertEquals(new Value((key.hashCode() + "").getBytes()), trf.reader.getTopValue());
+ assertEquals(new Value(key.hashCode() + ""), trf.reader.getTopValue());
}
}
@@ -2339,13 +2339,13 @@ public class RFileTest {
Key tableDirKey =
new Key(tableExtent, TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
- mfw.append(tableDirKey, new Value(/* TABLE_TABLETS_TABLET_DIR */"/table_info".getBytes()));
+ mfw.append(tableDirKey, new Value(/* TABLE_TABLETS_TABLET_DIR */"/table_info"));
// table tablet time
Key tableTimeKey =
new Key(tableExtent, TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
- mfw.append(tableTimeKey, new Value((/* TabletTime.LOGICAL_TIME_ID */'L' + "0").getBytes()));
+ mfw.append(tableTimeKey, new Value(/* TabletTime.LOGICAL_TIME_ID */'L' + "0"));
// table tablet's prevRow
Key tablePrevRowKey =
@@ -2360,13 +2360,13 @@ public class RFileTest {
Key defaultDirKey =
new Key(defaultExtent, TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
- mfw.append(defaultDirKey, new Value(ServerColumnFamily.DEFAULT_TABLET_DIR_NAME.getBytes()));
+ mfw.append(defaultDirKey, new Value(ServerColumnFamily.DEFAULT_TABLET_DIR_NAME));
// default's time
Key defaultTimeKey =
new Key(defaultExtent, TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
- mfw.append(defaultTimeKey, new Value((/* TabletTime.LOGICAL_TIME_ID */'L' + "0").getBytes()));
+ mfw.append(defaultTimeKey, new Value(/* TabletTime.LOGICAL_TIME_ID */'L' + "0"));
// default's prevRow
Key defaultPrevRowKey =
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
index 315485c..4d2e67d 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
@@ -53,7 +53,7 @@ public class FirstEntryInRowIteratorTest {
@Test
public void test() throws IOException {
TreeMap<Key,Value> sourceMap = new TreeMap<>();
- Value emptyValue = new Value("".getBytes());
+ Value emptyValue = new Value("");
IteratorSetting iteratorSetting = new IteratorSetting(1, FirstEntryInRowIterator.class);
FirstEntryInRowIterator.setNumScansBeforeSeek(iteratorSetting, 10);
assertTrue(
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowTest.java
index b158a9d..3a8f420 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowTest.java
@@ -51,11 +51,11 @@ public class FirstEntryInRowTest {
}
private void put(TreeMap<Key,Value> tm, String row, String cf, String cq, long time, String val) {
- put(tm, row, cf, cq, time, new Value(val.getBytes()));
+ put(tm, row, cf, cq, time, new Value(val));
}
private void put(TreeMap<Key,Value> tm, int row, int cf, int cq, long time, int val) {
- tm.put(newKey(row, cf, cq, time), new Value((val + "").getBytes()));
+ tm.put(newKey(row, cf, cq, time), new Value(val + ""));
}
private void testAndCallNext(FirstEntryInRowIterator rdi, String row, String cf, String cq,
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFamilySkippingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFamilySkippingIteratorTest.java
index 48a5544..774b68d 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFamilySkippingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFamilySkippingIteratorTest.java
@@ -53,11 +53,11 @@ public class ColumnFamilySkippingIteratorTest {
}
void put(TreeMap<Key,Value> tm, String row, String cf, String cq, long time, String val) {
- put(tm, row, cf, cq, time, new Value(val.getBytes()));
+ put(tm, row, cf, cq, time, new Value(val));
}
void put(TreeMap<Key,Value> tm, int row, int cf, int cq, long time, int val) {
- tm.put(newKey(row, cf, cq, time), new Value((val + "").getBytes()));
+ tm.put(newKey(row, cf, cq, time), new Value(val + ""));
}
private void testAndCallnext(ColumnFamilySkippingIterator rdi, String row, String cf, String cq,
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/DeletingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/DeletingIteratorTest.java
index d5ac50b..bd2c4dd 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/DeletingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/DeletingIteratorTest.java
@@ -46,9 +46,9 @@ public class DeletingIteratorTest {
public void test1() {
Text colf = new Text("a");
Text colq = new Text("b");
- Value dvOld = new Value("old".getBytes());
- Value dvDel = new Value("old".getBytes());
- Value dvNew = new Value("new".getBytes());
+ Value dvOld = new Value("old");
+ Value dvDel = new Value("old");
+ Value dvNew = new Value("new");
TreeMap<Key,Value> tm = new TreeMap<>();
Key k;
@@ -267,6 +267,6 @@ public class DeletingIteratorTest {
String val) {
Key k = newKey(row, ts);
k.setDeleted(deleted);
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/MultiIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/MultiIteratorTest.java
index e9b6546..f55bcfa 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/MultiIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/MultiIteratorTest.java
@@ -55,7 +55,7 @@ public class MultiIteratorTest {
String val) {
Key k = newKey(row, ts);
k.setDeleted(deleted);
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
}
public static Text newRow(int row) {
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
index fe070a5..41bc3b9 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/SourceSwitchingIteratorTest.java
@@ -59,7 +59,7 @@ public class SourceSwitchingIteratorTest {
}
void put(TreeMap<Key,Value> tm, String row, String cf, String cq, long time, String val) {
- put(tm, row, cf, cq, time, new Value(val.getBytes()));
+ put(tm, row, cf, cq, time, new Value(val));
}
private void testAndCallNext(SortedKeyValueIterator<Key,Value> rdi, String row, String cf,
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/TimeSettingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/TimeSettingIteratorTest.java
index 45bc108..14d8eee 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/TimeSettingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/TimeSettingIteratorTest.java
@@ -40,11 +40,11 @@ public class TimeSettingIteratorTest {
public void test1() throws Exception {
TreeMap<Key,Value> tm1 = new TreeMap<>();
- tm1.put(new Key("r0", "cf1", "cq1", 9L), new Value("v0".getBytes()));
- tm1.put(new Key("r1", "cf1", "cq1", Long.MAX_VALUE), new Value("v1".getBytes()));
- tm1.put(new Key("r1", "cf1", "cq1", 90L), new Value("v2".getBytes()));
- tm1.put(new Key("r1", "cf1", "cq1", 0L), new Value("v3".getBytes()));
- tm1.put(new Key("r2", "cf1", "cq1", 6L), new Value("v4".getBytes()));
+ tm1.put(new Key("r0", "cf1", "cq1", 9L), new Value("v0"));
+ tm1.put(new Key("r1", "cf1", "cq1", Long.MAX_VALUE), new Value("v1"));
+ tm1.put(new Key("r1", "cf1", "cq1", 90L), new Value("v2"));
+ tm1.put(new Key("r1", "cf1", "cq1", 0L), new Value("v3"));
+ tm1.put(new Key("r2", "cf1", "cq1", 6L), new Value("v4"));
TimeSettingIterator tsi = new TimeSettingIterator(new SortedMapIterator(tm1), 50);
@@ -100,7 +100,7 @@ public class TimeSettingIteratorTest {
TreeMap<Key,Value> tm1 = new TreeMap<>();
final Key k = new Key("r0", "cf1", "cq1", 9L);
- tm1.put(k, new Value("v0".getBytes()));
+ tm1.put(k, new Value("v0"));
TimeSettingIterator tsi = new TimeSettingIterator(new SortedMapIterator(tm1), 50);
@@ -126,10 +126,10 @@ public class TimeSettingIteratorTest {
for (boolean inclusiveEndRange : new boolean[] {true, false}) {
TreeMap<Key,Value> sources = new TreeMap<>();
sources.put(new Key(row.getBytes(), colf.getBytes(), colq.getBytes(), cv.getBytes(),
- Long.MIN_VALUE, true), new Value("00".getBytes()));
+ Long.MIN_VALUE, true), new Value("00"));
sources.put(
new Key(row.getBytes(), colf.getBytes(), colq.getBytes(), cv.getBytes(), Long.MIN_VALUE),
- new Value("11".getBytes()));
+ new Value("11"));
TimeSettingIterator it = new TimeSettingIterator(new SortedMapIterator(sources), 111L);
IteratorSetting is = new IteratorSetting(1, TimeSettingIterator.class);
@@ -141,11 +141,11 @@ public class TimeSettingIteratorTest {
it.seek(testRange, new HashSet<>(), false);
assertTrue(it.hasTop());
- assertEquals(it.getTopValue(), new Value("00".getBytes()));
+ assertEquals(it.getTopValue(), new Value("00"));
assertEquals(111L, it.getTopKey().getTimestamp());
it.next();
assertTrue(it.hasTop());
- assertEquals(it.getTopValue(), new Value("11".getBytes()));
+ assertEquals(it.getTopValue(), new Value("11"));
assertEquals(111L, it.getTopKey().getTimestamp());
it.next();
assertFalse(it.hasTop());
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilterTest.java
index 69fa96f..8880fc1 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilterTest.java
@@ -59,7 +59,7 @@ public class ColumnSliceFilterTest {
private static Key newKeyValue(SortedMap<Key,Value> tm, String row, String cf, String cq,
String val) {
Key k = newKey(row, cf, cq);
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
return k;
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
index 22477b1..2d0b7c7 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
@@ -592,8 +592,8 @@ public class CombinerTest {
@Test
public void valueIteratorTest() throws IOException {
TreeMap<Key,Value> tm = new TreeMap<>();
- tm.put(new Key("r", "f", "q", 1), new Value("1".getBytes()));
- tm.put(new Key("r", "f", "q", 2), new Value("2".getBytes()));
+ tm.put(new Key("r", "f", "q", 1), new Value("1"));
+ tm.put(new Key("r", "f", "q", 2), new Value("2"));
SortedMapIterator smi = new SortedMapIterator(tm);
smi.seek(new Range(), EMPTY_COL_FAMS, false);
ValueIterator iter = new ValueIterator(smi);
@@ -605,12 +605,12 @@ public class CombinerTest {
@Test
public void sumAllColumns() throws IOException {
TreeMap<Key,Value> tm = new TreeMap<>();
- tm.put(new Key("r", "count", "a", 1), new Value("1".getBytes()));
- tm.put(new Key("r", "count", "a", 2), new Value("1".getBytes()));
- tm.put(new Key("r", "count", "b", 3), new Value("1".getBytes()));
- tm.put(new Key("r", "count", "b", 4), new Value("1".getBytes()));
- tm.put(new Key("r", "count", "b", 5), new Value("1".getBytes()));
- tm.put(new Key("r", "count", "c", 6), new Value("1".getBytes()));
+ tm.put(new Key("r", "count", "a", 1), new Value("1"));
+ tm.put(new Key("r", "count", "a", 2), new Value("1"));
+ tm.put(new Key("r", "count", "b", 3), new Value("1"));
+ tm.put(new Key("r", "count", "b", 4), new Value("1"));
+ tm.put(new Key("r", "count", "b", 5), new Value("1"));
+ tm.put(new Key("r", "count", "c", 6), new Value("1"));
SortedMapIterator smi = new SortedMapIterator(tm);
Combiner iter = new SummingCombiner();
IteratorSetting s = new IteratorSetting(10, "s", SummingCombiner.class);
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/GrepIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/GrepIteratorTest.java
index b780d80..207ba22 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/GrepIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/GrepIteratorTest.java
@@ -46,26 +46,26 @@ public class GrepIteratorTest {
public void init() {
input = new TreeMap<>();
output = new TreeMap<>();
- input.put(new Key("abcdef", "xyz", "xyz", 0), new Value("xyz".getBytes()));
- output.put(new Key("abcdef", "xyz", "xyz", 0), new Value("xyz".getBytes()));
+ input.put(new Key("abcdef", "xyz", "xyz", 0), new Value("xyz"));
+ output.put(new Key("abcdef", "xyz", "xyz", 0), new Value("xyz"));
- input.put(new Key("bdf", "ace", "xyz", 0), new Value("xyz".getBytes()));
- input.put(new Key("bdf", "abcdef", "xyz", 0), new Value("xyz".getBytes()));
- output.put(new Key("bdf", "abcdef", "xyz", 0), new Value("xyz".getBytes()));
- input.put(new Key("bdf", "xyz", "xyz", 0), new Value("xyz".getBytes()));
+ input.put(new Key("bdf", "ace", "xyz", 0), new Value("xyz"));
+ input.put(new Key("bdf", "abcdef", "xyz", 0), new Value("xyz"));
+ output.put(new Key("bdf", "abcdef", "xyz", 0), new Value("xyz"));
+ input.put(new Key("bdf", "xyz", "xyz", 0), new Value("xyz"));
- input.put(new Key("ceg", "xyz", "abcdef", 0), new Value("xyz".getBytes()));
- output.put(new Key("ceg", "xyz", "abcdef", 0), new Value("xyz".getBytes()));
- input.put(new Key("ceg", "xyz", "xyz", 0), new Value("xyz".getBytes()));
+ input.put(new Key("ceg", "xyz", "abcdef", 0), new Value("xyz"));
+ output.put(new Key("ceg", "xyz", "abcdef", 0), new Value("xyz"));
+ input.put(new Key("ceg", "xyz", "xyz", 0), new Value("xyz"));
- input.put(new Key("dfh", "xyz", "xyz", 0), new Value("abcdef".getBytes()));
- output.put(new Key("dfh", "xyz", "xyz", 0), new Value("abcdef".getBytes()));
- input.put(new Key("dfh", "xyz", "xyz", 1), new Value("xyz".getBytes()));
+ input.put(new Key("dfh", "xyz", "xyz", 0), new Value("abcdef"));
+ output.put(new Key("dfh", "xyz", "xyz", 0), new Value("abcdef"));
+ input.put(new Key("dfh", "xyz", "xyz", 1), new Value("xyz"));
Key k = new Key("dfh", "xyz", "xyz", 1);
k.setDeleted(true);
- input.put(k, new Value("xyz".getBytes()));
- output.put(k, new Value("xyz".getBytes()));
+ input.put(k, new Value("xyz"));
+ output.put(k, new Value("xyz"));
}
public static void checkEntries(SortedKeyValueIterator<Key,Value> skvi, SortedMap<Key,Value> map)
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
index a0376c6..cc51d4a 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
@@ -130,7 +130,7 @@ public class IndexedDocIteratorTest {
}
sb.append(" docID=").append(doc);
Key k = new Key(row, docColf, new Text(String.format("%010d", docid).getBytes()));
- map.put(k, new Value(sb.toString().getBytes()));
+ map.put(k, new Value(sb.toString()));
}
}
return map;
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/LargeRowFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/LargeRowFilterTest.java
index bd89277..318624b 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/LargeRowFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/LargeRowFilterTest.java
@@ -48,8 +48,7 @@ public class LargeRowFilterTest {
private void genRow(TreeMap<Key,Value> testData, int row, int startCQ, int stopCQ) {
for (int cq = startCQ; cq < stopCQ; cq++) {
- testData.put(new Key(genRow(row), "cf001", genCQ(cq), 5),
- new Value(("v" + row + "_" + cq).getBytes()));
+ testData.put(new Key(genRow(row), "cf001", genCQ(cq), 5), new Value("v" + row + "_" + cq));
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
index cbd99c2..cd1eb65 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
@@ -42,7 +42,7 @@ public class RegExFilterTest {
private Key newKeyValue(TreeMap<Key,Value> tm, String row, String cf, String cq, String val) {
Key k = newKey(row, cf, cq);
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
return k;
}
@@ -225,7 +225,7 @@ public class RegExFilterTest {
String multiByteRegex = new String(".*" + "\u6F68" + ".*");
Key k4 = new Key("boo4".getBytes(), "hoo".getBytes(), "20080203".getBytes(), "".getBytes(), 1L);
- Value inVal = new Value(multiByteText.getBytes(UTF_8));
+ Value inVal = new Value(multiByteText);
tm.put(k4, inVal);
is.clearOptions();
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowDeletingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowDeletingIteratorTest.java
index a1467ad..a065f8a 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowDeletingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowDeletingIteratorTest.java
@@ -68,7 +68,7 @@ public class RowDeletingIteratorTest {
}
void put(TreeMap<Key,Value> tm, String row, String cf, String cq, long time, String val) {
- put(tm, row, cf, cq, time, new Value(val.getBytes()));
+ put(tm, row, cf, cq, time, new Value(val));
}
private void testAssertions(RowDeletingIterator rdi, String row, String cf, String cq, long time,
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
index b6d10b4..cfc844b 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
@@ -293,7 +293,7 @@ public class TransformingIteratorTest {
data.clear();
- Value ev = new Value("".getBytes());
+ Value ev = new Value("");
data.put(new Key("shard001", "foo", "doc02", vis1, 78), ev);
data.put(new Key("shard001", "dog", "doc02", vis3, 78), ev);
@@ -359,7 +359,7 @@ public class TransformingIteratorTest {
String cv = "badvis";
long ts = 100 * cfID + 10 * cqID + cvID;
String val = "val" + ts;
- expected.put(new Key(row, cf, cq, cv, ts), new Value(val.getBytes()));
+ expected.put(new Key(row, cf, cq, cv, ts), new Value(val));
}
}
}
@@ -495,7 +495,7 @@ public class TransformingIteratorTest {
}
}
- expected.put(new Key(row, cf, cq, cv, ts), new Value(val.getBytes()));
+ expected.put(new Key(row, cf, cq, cv, ts), new Value(val));
}
private static Text transform(Text val) {
@@ -520,7 +520,7 @@ public class TransformingIteratorTest {
String val = "val" + ts;
Key k = new Key(row, cf, cq, cv, ts);
- Value v = new Value(val.getBytes());
+ Value v = new Value(val);
data.put(k, v);
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
index b52230c..727e09a 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
@@ -270,8 +270,8 @@ public class VersioningIteratorTest {
Text cv = new Text();
TreeMap<Key,Value> tm = new TreeMap<>();
- tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE), new Value("00".getBytes()));
- tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE - 1), new Value("11".getBytes()));
+ tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE), new Value("00"));
+ tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE - 1), new Value("11"));
VersioningIterator it = new VersioningIterator();
IteratorSetting is = new IteratorSetting(1, VersioningIterator.class);
@@ -293,8 +293,8 @@ public class VersioningIteratorTest {
Text cv = new Text();
TreeMap<Key,Value> tm = new TreeMap<>();
- tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE), new Value("00".getBytes()));
- tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE - 1), new Value("11".getBytes()));
+ tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE), new Value("00"));
+ tm.put(new Key(row, colf, colq, cv, Long.MAX_VALUE - 1), new Value("11"));
VersioningIterator it = new VersioningIterator();
IteratorSetting is = new IteratorSetting(1, VersioningIterator.class);
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeColumnFamilyIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeColumnFamilyIteratorTest.java
index 1048495..e826622 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeColumnFamilyIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeColumnFamilyIteratorTest.java
@@ -61,27 +61,27 @@ public class WholeColumnFamilyIteratorTest {
SortedMap<Key,Value> map2 = new TreeMap<>();
final Map<Text,Boolean> toInclude = new HashMap<>();
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 1L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq2"), new Text("cv1"), 2L),
- new Value("val2".getBytes()));
+ new Value("val2"));
map.put(new Key(new Text("r2"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 3L),
- new Value("val3".getBytes()));
+ new Value("val3"));
map.put(new Key(new Text("r2"), new Text("cf2"), new Text("cq1"), new Text("cv1"), 4L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r3"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 5L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r3"), new Text("cf1"), new Text("cq1"), new Text("cv2"), 6L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 7L),
- new Value("".getBytes()));
+ new Value(""));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text("cq1"), new Text(""), 8L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text(""), new Text("cv1"), 9L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r4"), new Text(""), new Text("cq1"), new Text("cv1"), 10L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text(""), new Text("cf1"), new Text("cq1"), new Text("cv1"), 11L),
- new Value("val1".getBytes()));
+ new Value("val1"));
boolean b = true;
int trueCount = 0;
for (Key k : map.keySet()) {
@@ -138,8 +138,7 @@ public class WholeColumnFamilyIteratorTest {
private void pkv(SortedMap<Key,Value> map, String row, String cf, String cq, String cv, long ts,
String val) {
- map.put(new Key(new Text(row), new Text(cf), new Text(cq), new Text(cv), ts),
- new Value(val.getBytes()));
+ map.put(new Key(new Text(row), new Text(cf), new Text(cq), new Text(cv), ts), new Value(val));
}
@Test
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeRowIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeRowIteratorTest.java
index 591d940..7eefc6d 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeRowIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/WholeRowIteratorTest.java
@@ -43,7 +43,7 @@ public class WholeRowIteratorTest {
@Test(expected = IOException.class)
public void testBadDecodeRow() throws IOException {
Key k = new Key(new Text("r1"), new Text("cf1234567890"));
- Value v = new Value("v1".getBytes());
+ Value v = new Value("v1");
Value encoded = WholeRowIterator.encodeRow(List.of(k), List.of(v));
encoded.set(Arrays.copyOfRange(encoded.get(), 0, 10)); // truncate to 10 bytes only
WholeRowIterator.decodeRow(k, encoded);
@@ -55,27 +55,27 @@ public class WholeRowIteratorTest {
SortedMap<Key,Value> map2 = new TreeMap<>();
final Map<Text,Boolean> toInclude = new HashMap<>();
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 1L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r1"), new Text("cf1"), new Text("cq2"), new Text("cv1"), 2L),
- new Value("val2".getBytes()));
+ new Value("val2"));
map.put(new Key(new Text("r2"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 3L),
- new Value("val3".getBytes()));
+ new Value("val3"));
map.put(new Key(new Text("r2"), new Text("cf2"), new Text("cq1"), new Text("cv1"), 4L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r3"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 5L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r3"), new Text("cf1"), new Text("cq1"), new Text("cv2"), 6L),
- new Value("val4".getBytes()));
+ new Value("val4"));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text("cq1"), new Text("cv1"), 7L),
- new Value("".getBytes()));
+ new Value(""));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text("cq1"), new Text(""), 8L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r4"), new Text("cf1"), new Text(""), new Text("cv1"), 9L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text("r4"), new Text(""), new Text("cq1"), new Text("cv1"), 10L),
- new Value("val1".getBytes()));
+ new Value("val1"));
map.put(new Key(new Text(""), new Text("cf1"), new Text("cq1"), new Text("cv1"), 11L),
- new Value("val1".getBytes()));
+ new Value("val1"));
boolean b = true;
int trueCount = 0;
for (Key k : map.keySet()) {
@@ -129,8 +129,7 @@ public class WholeRowIteratorTest {
private void pkv(SortedMap<Key,Value> map, String row, String cf, String cq, String cv, long ts,
String val) {
- map.put(new Key(new Text(row), new Text(cf), new Text(cq), new Text(cv), ts),
- new Value(val.getBytes()));
+ map.put(new Key(new Text(row), new Text(cf), new Text(cq), new Text(cv), ts), new Value(val));
}
@Test
diff --git a/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java b/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
index 1f75dde..ad299b5 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
@@ -70,7 +70,7 @@ public class DefaultFormatterTest {
public void testFormatEntry() {
final long timestamp = 0;
Map<Key,Value> map = new TreeMap<>();
- map.put(new Key("a", "ab", "abc", timestamp), new Value("abcd".getBytes()));
+ map.put(new Key("a", "ab", "abc", timestamp), new Value("abcd"));
FormatterConfig config;
String answer;
diff --git a/core/src/test/java/org/apache/accumulo/core/util/format/ShardedTableDistributionFormatterTest.java b/core/src/test/java/org/apache/accumulo/core/util/format/ShardedTableDistributionFormatterTest.java
index 778de12..06c71ad 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/format/ShardedTableDistributionFormatterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/format/ShardedTableDistributionFormatterTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.core.util.format;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -54,9 +53,9 @@ public class ShardedTableDistributionFormatterTest {
@Test
public void testAggregate() {
- data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(UTF_8)));
- data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(UTF_8)));
- data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(UTF_8)));
+ data.put(new Key("t", "~tab", "loc"), new Value("srv1"));
+ data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1"));
+ data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2"));
formatter.initialize(data.entrySet(), new FormatterConfig());
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloInputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloInputFormatIT.java
index dc55a8c..23059dc 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloInputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloInputFormatIT.java
@@ -159,7 +159,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(table, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
@@ -187,7 +187,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(TEST_TABLE_3, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloOutputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloOutputFormatIT.java
index 483d8fc..9060304 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloOutputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/AccumuloOutputFormatIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.hadoop.its.mapred;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -92,7 +91,7 @@ public class AccumuloOutputFormatIT extends ConfigurableMacBase {
for (int i = 0; i < 3; 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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq" + j), new Value(i + "_" + j));
}
writer.write(new Text(testName.getMethodName()), m);
}
@@ -210,7 +209,7 @@ public class AccumuloOutputFormatIT extends ConfigurableMacBase {
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/MultiTableInputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/MultiTableInputFormatIT.java
index cca51c8..5d0eb27 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/MultiTableInputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/MultiTableInputFormatIT.java
@@ -135,10 +135,10 @@ public class MultiTableInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw2 = c.createBatchWriter(table2, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation t1m = new Mutation(new Text(String.format("%s_%09x", table1, i + 1)));
- t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i).getBytes()));
+ t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i)));
bw.addMutation(t1m);
Mutation t2m = new Mutation(new Text(String.format("%s_%09x", table2, i + 1)));
- t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i).getBytes()));
+ t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i)));
bw2.addMutation(t2m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/TokenFileIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/TokenFileIT.java
index 65ab8aa..0d2a1fe 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/TokenFileIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapred/TokenFileIT.java
@@ -156,7 +156,7 @@ public class TokenFileIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloInputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloInputFormatIT.java
index 9ba172b..01cfd08 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloInputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloInputFormatIT.java
@@ -222,7 +222,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
String row = String.format("%09d", i);
Mutation m = new Mutation(new Text(row));
- m.put(new Text("cf1"), new Text("cq1"), ts, new Value(("" + i).getBytes()));
+ m.put(new Text("cf1"), new Text("cq1"), ts, new Value("" + i));
bw.addMutation(m);
}
bw.close();
@@ -335,7 +335,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = client.createBatchWriter(TEST_TABLE_1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
@@ -359,7 +359,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = client.createBatchWriter(TEST_TABLE_3, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
@@ -390,7 +390,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = client.createBatchWriter(TEST_TABLE_2, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
@@ -443,7 +443,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = client.createBatchWriter(table, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloOutputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloOutputFormatIT.java
index 24a2290..d8642ad 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloOutputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloOutputFormatIT.java
@@ -134,7 +134,7 @@ public class AccumuloOutputFormatIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/MultiTableInputFormatIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/MultiTableInputFormatIT.java
index 814e0d9..e94d8e8 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/MultiTableInputFormatIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/MultiTableInputFormatIT.java
@@ -135,10 +135,10 @@ public class MultiTableInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw2 = c.createBatchWriter(table2, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation t1m = new Mutation(new Text(String.format("%s_%09x", table1, i + 1)));
- t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i).getBytes()));
+ t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i)));
bw.addMutation(t1m);
Mutation t2m = new Mutation(new Text(String.format("%s_%09x", table2, i + 1)));
- t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i).getBytes()));
+ t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i)));
bw2.addMutation(t2m);
}
bw.close();
diff --git a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/TokenFileIT.java b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/TokenFileIT.java
index 5479018..8c0c68d 100644
--- a/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/TokenFileIT.java
+++ b/hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/TokenFileIT.java
@@ -150,7 +150,7 @@ public class TokenFileIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java b/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
index 92b1807..817dbe1 100644
--- a/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
+++ b/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
@@ -67,9 +67,9 @@ public class JUnitFrameworkTest extends BaseJUnit4IteratorTest {
private static TreeMap<Key,Value> createData() {
TreeMap<Key,Value> data = new TreeMap<>();
- data.put(new Key("1", "a", ""), new Value("1a".getBytes()));
- data.put(new Key("2", "a", ""), new Value("2a".getBytes()));
- data.put(new Key("3", "a", ""), new Value("3a".getBytes()));
+ data.put(new Key("1", "a", ""), new Value("1a"));
+ data.put(new Key("2", "a", ""), new Value("2a"));
+ data.put(new Key("3", "a", ""), new Value("3a"));
return data;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 55dc77c..415b842 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -582,7 +582,7 @@ public class Initialize implements KeywordExecutable {
private static void createEntriesForTablet(TreeMap<Key,Value> map, Tablet tablet) {
Value EMPTY_SIZE = new DataFileValue(0, 0).encodeAsValue();
Text extent = new Text(TabletsSection.getRow(tablet.tableId, tablet.endRow));
- addEntry(map, extent, DIRECTORY_COLUMN, new Value(tablet.dirName.getBytes(UTF_8)));
+ addEntry(map, extent, DIRECTORY_COLUMN, new Value(tablet.dirName));
addEntry(map, extent, TIME_COLUMN, new Value(new MetadataTime(0, TimeType.LOGICAL).encode()));
addEntry(map, extent, PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(tablet.prevEndRow));
for (String file : tablet.files) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
index c36748a..c734c67 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
@@ -141,7 +141,7 @@ public class TServerInstance implements Ample.TServer, Comparable<TServerInstanc
}
private Value asMutationValue() {
- return new Value(getLocation().toString().getBytes(UTF_8));
+ return new Value(getLocation().toString());
}
@Override
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index 9641913..7e5b5bf 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.server.util;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.CLONED;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.DIR;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES;
@@ -129,7 +128,7 @@ public class MetadataTableUtil {
public static void putLockID(ServerContext context, ZooLock zooLock, Mutation m) {
TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m,
- new Value(zooLock.getLockID().serialize(context.getZooKeeperRoot() + "/").getBytes(UTF_8)));
+ new Value(zooLock.getLockID().serialize(context.getZooKeeperRoot() + "/")));
}
private static void update(ServerContext context, Mutation m, KeyExtent extent) {
@@ -238,7 +237,7 @@ public class MetadataTableUtil {
Mutation m = extent.getPrevRowUpdateMutation(); //
TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m,
- new Value(Double.toString(splitRatio).getBytes(UTF_8)));
+ new Value(Double.toString(splitRatio)));
TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m,
KeyExtent.encodePrevEndRow(oldPrevEndRow));
@@ -588,7 +587,7 @@ public class MetadataTableUtil {
} else {
// write out marker that this tablet was successfully cloned
Mutation m = new Mutation(cloneTablet.getExtent().getMetadataEntry());
- m.put(ClonedColumnFamily.NAME, new Text(""), new Value("OK".getBytes(UTF_8)));
+ m.put(ClonedColumnFamily.NAME, new Text(""), new Value("OK"));
bw.addMutation(m);
}
}
diff --git a/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java b/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
index 8deefae..cc21880 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
@@ -67,7 +67,7 @@ public class MetadataConstraintsTest {
@Test
public void testCheck() {
Mutation m = new Mutation(new Text("0;foo"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1foo".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1foo"));
MetadataConstraints mc = new MetadataConstraints();
@@ -78,7 +78,7 @@ public class MetadataConstraintsTest {
assertEquals(Short.valueOf((short) 3), violations.get(0));
m = new Mutation(new Text("0:foo"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1poo".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1poo"));
violations = mc.check(createEnv(), m);
@@ -87,7 +87,7 @@ public class MetadataConstraintsTest {
assertEquals(Short.valueOf((short) 4), violations.get(0));
m = new Mutation(new Text("0;foo"));
- m.put(new Text("bad_column_name"), new Text(""), new Value("e".getBytes()));
+ m.put(new Text("bad_column_name"), new Text(""), new Value("e"));
violations = mc.check(createEnv(), m);
@@ -96,7 +96,7 @@ public class MetadataConstraintsTest {
assertEquals(Short.valueOf((short) 2), violations.get(0));
m = new Mutation(new Text("!!<"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1poo".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1poo"));
violations = mc.check(createEnv(), m);
@@ -106,7 +106,7 @@ public class MetadataConstraintsTest {
assertEquals(Short.valueOf((short) 5), violations.get(1));
m = new Mutation(new Text("0;foo"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value(""));
violations = mc.check(createEnv(), m);
@@ -115,21 +115,21 @@ public class MetadataConstraintsTest {
assertEquals(Short.valueOf((short) 6), violations.get(0));
m = new Mutation(new Text("0;foo"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar"));
violations = mc.check(createEnv(), m);
assertNull(violations);
m = new Mutation(new Text("!0<"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar"));
violations = mc.check(createEnv(), m);
assertNull(violations);
m = new Mutation(new Text("!1<"));
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar"));
violations = mc.check(createEnv(), m);
@@ -147,8 +147,7 @@ public class MetadataConstraintsTest {
// inactive txid
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("12345".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("12345"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
violations = mc.check(createEnv(), m);
@@ -158,8 +157,7 @@ public class MetadataConstraintsTest {
// txid that throws exception
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("9".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("9"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
violations = mc.check(createEnv(), m);
@@ -169,8 +167,7 @@ public class MetadataConstraintsTest {
// active txid w/ file
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
violations = mc.check(createEnv(), m);
@@ -178,8 +175,7 @@ public class MetadataConstraintsTest {
// active txid w/o file
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
violations = mc.check(createEnv(), m);
assertNotNull(violations);
assertEquals(1, violations.size());
@@ -187,12 +183,10 @@ public class MetadataConstraintsTest {
// two active txids w/ files
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"),
- new Value("7".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"), new Value("7"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile2"),
new DataFileValue(1, 1).encodeAsValue());
violations = mc.check(createEnv(), m);
@@ -202,12 +196,10 @@ public class MetadataConstraintsTest {
// two files w/ one active txid
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"), new Value("5"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile2"),
new DataFileValue(1, 1).encodeAsValue());
violations = mc.check(createEnv(), m);
@@ -215,12 +207,10 @@ public class MetadataConstraintsTest {
// two loaded w/ one active txid and one file
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
m.put(DataFileColumnFamily.NAME, new Text("/someFile"),
new DataFileValue(1, 1).encodeAsValue());
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile2"), new Value("5"));
violations = mc.check(createEnv(), m);
assertNotNull(violations);
assertEquals(1, violations.size());
@@ -228,35 +218,31 @@ public class MetadataConstraintsTest {
// active txid, mutation that looks like split
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("/t1".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("/t1"));
violations = mc.check(createEnv(), m);
assertNull(violations);
// inactive txid, mutation that looks like split
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("12345".getBytes()));
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("/t1".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("12345"));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("/t1"));
violations = mc.check(createEnv(), m);
assertNull(violations);
// active txid, mutation that looks like a load
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("5".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5"));
m.put(TabletsSection.CurrentLocationColumnFamily.NAME, new Text("789"),
- new Value("127.0.0.1:9997".getBytes()));
+ new Value("127.0.0.1:9997"));
violations = mc.check(createEnv(), m);
assertNull(violations);
// inactive txid, mutation that looks like a load
m = new Mutation(new Text("0;foo"));
- m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"),
- new Value("12345".getBytes()));
+ m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("12345"));
m.put(TabletsSection.CurrentLocationColumnFamily.NAME, new Text("789"),
- new Value("127.0.0.1:9997".getBytes()));
+ new Value("127.0.0.1:9997"));
violations = mc.check(createEnv(), m);
assertNull(violations);
diff --git a/server/base/src/test/java/org/apache/accumulo/server/data/ServerMutationTest.java b/server/base/src/test/java/org/apache/accumulo/server/data/ServerMutationTest.java
index 416855d..c614ec7 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/data/ServerMutationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/data/ServerMutationTest.java
@@ -34,8 +34,8 @@ public class ServerMutationTest {
@Test
public void test() throws Exception {
ServerMutation m = new ServerMutation(new Text("r1"));
- m.put(new Text("cf1"), new Text("cq1"), new Value("v1".getBytes()));
- m.put(new Text("cf2"), new Text("cq2"), 56, new Value("v2".getBytes()));
+ m.put(new Text("cf1"), new Text("cq1"), new Value("v1"));
+ m.put(new Text("cf2"), new Text("cq2"), 56, new Value("v2"));
m.setSystemTimestamp(42);
List<ColumnUpdate> updates = m.getUpdates();
diff --git a/server/base/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java b/server/base/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
index b70acc8..16b9603 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
@@ -62,16 +62,16 @@ public class MetadataBulkLoadFilterTest {
private static void put(TreeMap<Key,Value> tm, String row, ColumnFQ cfq, String val) {
Key k = new Key(new Text(row), cfq.getColumnFamily(), cfq.getColumnQualifier());
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
}
private static void put(TreeMap<Key,Value> tm, String row, Text cf, String cq, String val) {
Key k = new Key(new Text(row), cf, new Text(cq));
if (val == null) {
k.setDeleted(true);
- tm.put(k, new Value("".getBytes()));
+ tm.put(k, new Value(""));
} else
- tm.put(k, new Value(val.getBytes()));
+ tm.put(k, new Value(val));
}
@Test
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
index 5c13f7a..0e6aae3 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
@@ -145,7 +145,7 @@ public class TraceServer implements Watcher, AutoCloseable {
Mutation indexMutation = new Mutation(new Text("idx:" + s.svc + ":" + startString));
long diff = s.stop - s.start;
indexMutation.put(new Text(s.description), new Text(s.sender),
- new Value((idString + ":" + Long.toHexString(diff)).getBytes(UTF_8)));
+ new Value(idString + ":" + Long.toHexString(diff)));
ByteArrayTransport transport = new ByteArrayTransport();
TCompactProtocol protocol = new TCompactProtocol(transport);
s.write(protocol);
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/CheckTabletMetadataTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/CheckTabletMetadataTest.java
index 26236ab..bded018 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/CheckTabletMetadataTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/CheckTabletMetadataTest.java
@@ -54,7 +54,7 @@ public class CheckTabletMetadataTest {
private static void put(TreeMap<Key,Value> tabletMeta, String row, Text cf, String cq,
String val) {
Key k = new Key(new Text(row), cf, new Text(cq));
- tabletMeta.put(k, new Value(val.getBytes()));
+ tabletMeta.put(k, new Value(val));
}
private static void assertFail(TreeMap<Key,Value> tabletMeta, KeyExtent ke, TServerInstance tsi) {
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/CountingIteratorTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/CountingIteratorTest.java
index 6f60b89..0ba3b24 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/CountingIteratorTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/CountingIteratorTest.java
@@ -36,8 +36,8 @@ public class CountingIteratorTest {
public void testDeepCopyCount() throws IOException {
TreeMap<Key,Value> tm = new TreeMap<>();
- tm.put(new Key("r1", "cf1", "cq1"), new Value("data1".getBytes()));
- tm.put(new Key("r2", "cf1", "cq1"), new Value("data2".getBytes()));
+ tm.put(new Key("r1", "cf1", "cq1"), new Value("data1"));
+ tm.put(new Key("r2", "cf1", "cq1"), new Value("data2"));
SortedMapIterator smi = new SortedMapIterator(tm);
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
index 31ce3f3..6650c05 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
@@ -124,7 +124,7 @@ public class InMemoryMapTest {
public void mutate(InMemoryMap imm, String row, String column, long ts, String value) {
Mutation m = new Mutation(new Text(row));
String[] sa = column.split(":");
- m.put(new Text(sa[0]), new Text(sa[1]), ts, new Value(value.getBytes()));
+ m.put(new Text(sa[0]), new Text(sa[1]), ts, new Value(value));
imm.mutate(Collections.singletonList(m), 1);
}
@@ -138,7 +138,7 @@ public class InMemoryMapTest {
int ts, String val) throws IOException {
assertTrue(dc.hasTop());
assertEquals(newKey(row, column, ts), dc.getTopKey());
- assertEquals(new Value(val.getBytes()), dc.getTopValue());
+ assertEquals(new Value(val), dc.getTopValue());
dc.next();
}
@@ -147,7 +147,7 @@ public class InMemoryMapTest {
int ts, String val) {
assertTrue(dc.hasTop());
assertEquals(newKey(row, column, ts), dc.getTopKey());
- assertEquals(new Value(val.getBytes()), dc.getTopValue());
+ assertEquals(new Value(val), dc.getTopValue());
}
@@ -488,8 +488,8 @@ public class InMemoryMapTest {
InMemoryMap imm = newInMemoryMap(false, tempFolder.newFolder().getAbsolutePath());
Mutation m = new Mutation(new Text("r1"));
- m.put(new Text("foo"), new Text("cq"), 3, new Value("v1".getBytes()));
- m.put(new Text("foo"), new Text("cq"), 3, new Value("v2".getBytes()));
+ m.put(new Text("foo"), new Text("cq"), 3, new Value("v1"));
+ m.put(new Text("foo"), new Text("cq"), 3, new Value("v2"));
imm.mutate(Collections.singletonList(m), 2);
MemoryIterator skvi1 = imm.skvIterator(null);
@@ -708,9 +708,9 @@ public class InMemoryMapTest {
mutate(imm, row, cols, ts, val);
Key k1 = newKey(row, cols, ts);
if (sampler.accept(k1)) {
- expectedSample.put(k1, new Value(val.getBytes()));
+ expectedSample.put(k1, new Value(val));
}
- expectedAll.put(k1, new Value(val.getBytes()));
+ expectedAll.put(k1, new Value(val));
}
@Test(expected = SampleNotPresentException.class)
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LogEntryTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LogEntryTest.java
index 6cb8a65..11d17d0 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LogEntryTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LogEntryTest.java
@@ -51,7 +51,7 @@ public class LogEntryTest {
assertEquals(entry.timestamp, copy2.timestamp);
assertEquals("foo", entry.getUniqueID());
assertEquals("localhost:1234/default/foo", entry.getName());
- assertEquals(new Value("default/foo".getBytes()), entry.getValue());
+ assertEquals(new Value("default/foo"), entry.getValue());
}
}
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
index 7a9cdf1..bd2b49e 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
@@ -67,7 +67,7 @@ public class SortedLogRecoveryTest {
static final KeyExtent extent = new KeyExtent(TableId.of("table"), null, null);
static final Text cf = new Text("cf");
static final Text cq = new Text("cq");
- static final Value value = new Value("value".getBytes());
+ static final Value value = new Value("value");
@Rule
public ExpectedException thrown = ExpectedException.none();
@@ -396,7 +396,7 @@ public class SortedLogRecoveryTest {
Mutation m = new ServerMutation(new Text("row1"));
m.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
- m2.put(cf, cq, new Value("123".getBytes()));
+ m2.put(cf, cq, new Value("123"));
KeyValue[] entries =
{createKeyValue(OPEN, 0, -1, "1"), createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"),
@@ -423,7 +423,7 @@ public class SortedLogRecoveryTest {
Mutation m = new ServerMutation(new Text("row1"));
m.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
- m2.put(cf, cq, new Value("123".getBytes()));
+ m2.put(cf, cq, new Value("123"));
KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(COMPACTION_FINISH, 2, 1, null),
createKeyValue(COMPACTION_START, 4, 1, "/t1/f1"),
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/logger/LogFileTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/logger/LogFileTest.java
index 48c2f6f..4db3cd1 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/logger/LogFileTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/logger/LogFileTest.java
@@ -89,17 +89,15 @@ public class LogFileTest {
assertEquals(key.tabletId, 6);
assertEquals(key.tablet, tablet);
Mutation m = new ServerMutation(new Text("row"));
- m.put(new Text("cf"), new Text("cq"), new Value("value".getBytes()));
+ m.put(new Text("cf"), new Text("cq"), new Value("value"));
readWrite(MUTATION, 7, 8, null, null, new Mutation[] {m}, key, value);
assertEquals(key.event, MUTATION);
assertEquals(key.seq, 7);
assertEquals(key.tabletId, 8);
assertEquals(value.mutations, Arrays.asList(m));
m = new ServerMutation(new Text("row"));
- m.put(new Text("cf"), new Text("cq"), new ColumnVisibility("vis"), 12345,
- new Value("value".getBytes()));
- m.put(new Text("cf"), new Text("cq"), new ColumnVisibility("vis2"),
- new Value("value".getBytes()));
+ m.put(new Text("cf"), new Text("cq"), new ColumnVisibility("vis"), 12345, new Value("value"));
+ m.put(new Text("cf"), new Text("cq"), new ColumnVisibility("vis2"), new Value("value"));
m.putDelete(new Text("cf"), new Text("cq"), new ColumnVisibility("vis2"));
readWrite(MUTATION, 8, 9, null, null, new Mutation[] {m}, key, value);
assertEquals(key.event, MUTATION);
diff --git a/shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java b/shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
index e0caf57..5a937bb 100644
--- a/shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
+++ b/shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
@@ -95,7 +95,7 @@ public class DeleterFormatterTest {
replay(writer, exceptionWriter, shellState);
data = new TreeMap<>();
- data.put(new Key("r", "cf", "cq"), new Value("value".getBytes(UTF_8)));
+ data.put(new Key("r", "cf", "cq"), new Value("value"));
}
@Test
@@ -119,7 +119,7 @@ public class DeleterFormatterTest {
@Test
public void testNo() throws IOException {
input.set("no\n");
- data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
+ data.put(new Key("z"), new Value("v2"));
formatter = new DeleterFormatter(writer, data.entrySet(),
new FormatterConfig().setPrintTimestamps(true), shellState, false);
@@ -134,7 +134,7 @@ public class DeleterFormatterTest {
@Test
public void testNoConfirmation() throws IOException {
input.set("");
- data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
+ data.put(new Key("z"), new Value("v2"));
formatter = new DeleterFormatter(writer, data.entrySet(),
new FormatterConfig().setPrintTimestamps(true), shellState, false);
@@ -149,7 +149,7 @@ public class DeleterFormatterTest {
@Test
public void testYes() throws IOException {
input.set("y\nyes\n");
- data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
+ data.put(new Key("z"), new Value("v2"));
formatter = new DeleterFormatter(writer, data.entrySet(),
new FormatterConfig().setPrintTimestamps(true), shellState, false);
diff --git a/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java b/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java
index 968b2d7..678f0cc 100644
--- a/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java
@@ -42,7 +42,7 @@ public class BatchWriterIT extends AccumuloClusterHarness {
config.setMaxMemory(0);
try (BatchWriter writer = c.createBatchWriter(table, config)) {
Mutation m = new Mutation("row");
- m.put("cf", "cq", new Value("value".getBytes()));
+ m.put("cf", "cq", new Value("value"));
writer.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/BatchWriterInTabletServerIT.java b/test/src/main/java/org/apache/accumulo/test/BatchWriterInTabletServerIT.java
index 47a6e3a..061d74f 100644
--- a/test/src/main/java/org/apache/accumulo/test/BatchWriterInTabletServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/BatchWriterInTabletServerIT.java
@@ -95,7 +95,7 @@ public class BatchWriterInTabletServerIT extends AccumuloClusterHarness {
// Write an entry to t1
c.tableOperations().create(t1);
Key k = new Key(new Text("row"), new Text("cf"), new Text("cq"));
- Value v = new Value("1".getBytes());
+ Value v = new Value("1");
BatchWriterConfig config = new BatchWriterConfig();
config.setMaxMemory(0);
try (BatchWriter writer = c.createBatchWriter(t1, config)) {
diff --git a/test/src/main/java/org/apache/accumulo/test/BatchWriterIterator.java b/test/src/main/java/org/apache/accumulo/test/BatchWriterIterator.java
index 53916d5..5276474 100644
--- a/test/src/main/java/org/apache/accumulo/test/BatchWriterIterator.java
+++ b/test/src/main/java/org/apache/accumulo/test/BatchWriterIterator.java
@@ -79,7 +79,7 @@ public class BatchWriterIterator extends WrappingIterator {
private static final String AUTHENTICATION_TOKEN_CLASS = "authenticationTokenClass";
private static final String SUCCESS_STRING = "success";
- public static final Value SUCCESS_VALUE = new Value(SUCCESS_STRING.getBytes());
+ public static final Value SUCCESS_VALUE = new Value(SUCCESS_STRING);
private Map<String,String> originalOptions; // remembered for deepCopy
@@ -229,7 +229,7 @@ public class BatchWriterIterator extends WrappingIterator {
log.error("Problem while BatchWriting to target table " + tableName, e);
failure = e.getClass().getSimpleName() + ": " + e.getMessage();
}
- topValue = failure == null ? SUCCESS_VALUE : new Value(failure.getBytes());
+ topValue = failure == null ? SUCCESS_VALUE : new Value(failure);
}
@Override
diff --git a/test/src/main/java/org/apache/accumulo/test/CloneIT.java b/test/src/main/java/org/apache/accumulo/test/CloneIT.java
index 49b801e..bf92a5b 100644
--- a/test/src/main/java/org/apache/accumulo/test/CloneIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CloneIT.java
@@ -53,9 +53,8 @@ public class CloneIT extends AccumuloClusterHarness {
KeyExtent ke = new KeyExtent(TableId.of("0"), null, null);
Mutation mut = ke.getPrevRowUpdateMutation();
- TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0".getBytes()));
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut,
- new Value("/default_tablet".getBytes()));
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0"));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value("/default_tablet"));
try (BatchWriter bw1 = client.createBatchWriter(tableName)) {
bw1.addMutation(mut);
@@ -81,9 +80,8 @@ public class CloneIT extends AccumuloClusterHarness {
KeyExtent ke = new KeyExtent(TableId.of("0"), null, null);
Mutation mut = ke.getPrevRowUpdateMutation();
- TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0".getBytes()));
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut,
- new Value("/default_tablet".getBytes()));
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0"));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value("/default_tablet"));
mut.put(DataFileColumnFamily.NAME.toString(), "/default_tablet/0_0.rf",
new DataFileValue(1, 200).encodeAsString());
@@ -237,8 +235,8 @@ public class CloneIT extends AccumuloClusterHarness {
prevRow == null ? null : new Text(prevRow));
Mutation mut = ke.getPrevRowUpdateMutation();
- TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0".getBytes()));
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value(dir.getBytes()));
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.put(mut, new Value("M0"));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value(dir));
mut.put(DataFileColumnFamily.NAME.toString(), file,
new DataFileValue(10, 200).encodeAsString());
diff --git a/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java b/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
index 05e3dee..131b0be 100644
--- a/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
@@ -17,7 +17,6 @@
package org.apache.accumulo.test;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -622,7 +621,7 @@ public class ConditionalWriterIT extends SharedMiniClusterBase {
Value val = super.getTopValue();
long l = Long.parseLong(val.toString());
String newVal = (l + amount) + "";
- return new Value(newVal.getBytes(UTF_8));
+ return new Value(newVal);
}
@Override
@@ -641,7 +640,7 @@ public class ConditionalWriterIT extends SharedMiniClusterBase {
Value val = super.getTopValue();
long l = Long.parseLong(val.toString());
String newVal = l * amount + "";
- return new Value(newVal.getBytes(UTF_8));
+ return new Value(newVal);
}
@Override
diff --git a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
index a580b77..2aea09e 100644
--- a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
+++ b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.test;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import org.apache.accumulo.core.cli.Help;
import org.apache.accumulo.core.conf.DefaultConfiguration;
import org.apache.accumulo.core.crypto.CryptoServiceFactory;
@@ -70,8 +68,7 @@ public class GenerateSequentialRFile implements Runnable {
final Text row = new Text(String.format("%03d", x));
for (int y = 0; y < opts.valuesPerRow; y++) {
final String suffix = String.format("%05d", y);
- writer.append(new Key(new Text(row + ":" + suffix), CF, CQ),
- new Value(suffix.getBytes(UTF_8)));
+ writer.append(new Key(new Text(row + ":" + suffix), CF, CQ), new Value(suffix));
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/HardListIterator.java b/test/src/main/java/org/apache/accumulo/test/HardListIterator.java
index f521165..feb4522 100644
--- a/test/src/main/java/org/apache/accumulo/test/HardListIterator.java
+++ b/test/src/main/java/org/apache/accumulo/test/HardListIterator.java
@@ -44,11 +44,11 @@ public class HardListIterator implements SortedKeyValueIterator<Key,Value> {
static {
SortedMap<Key,Value> t = new TreeMap<>();
t.put(new Key(new Text("a1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()),
- new Value("1".getBytes()));
+ new Value("1"));
t.put(new Key(new Text("c1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()),
- new Value("1".getBytes()));
+ new Value("1"));
t.put(new Key(new Text("m1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()),
- new Value("1".getBytes()));
+ new Value("1"));
allEntriesToInject = Collections.unmodifiableSortedMap(t); // for safety
}
diff --git a/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java b/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java
index 08b1d23..959cf9d 100644
--- a/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/InMemoryMapIT.java
@@ -112,7 +112,7 @@ public class InMemoryMapIT {
@Test
public void testOneMutationOneKey() {
Mutation m = new Mutation("a");
- m.put(new Text("1cf"), new Text("1cq"), new Value("vala".getBytes()));
+ m.put(new Text("1cf"), new Text("1cq"), new Value("vala"));
assertEquivalentMutate(m);
}
@@ -121,7 +121,7 @@ public class InMemoryMapIT {
public void testOneMutationManyKeys() {
Mutation m = new Mutation("a");
for (int i = 1; i < 6; i++) {
- m.put(new Text("2cf" + i), new Text("2cq" + i), new Value(Integer.toString(i).getBytes()));
+ m.put(new Text("2cf" + i), new Text("2cq" + i), new Value(Integer.toString(i)));
}
assertEquivalentMutate(m);
@@ -132,7 +132,7 @@ public class InMemoryMapIT {
Mutation m = new Mutation("a");
for (int i = 1; i <= 5; i++) {
// same keys
- m.put(new Text("3cf"), new Text("3cq"), new Value(Integer.toString(i).getBytes()));
+ m.put(new Text("3cf"), new Text("3cq"), new Value(Integer.toString(i)));
}
assertEquivalentMutate(m);
@@ -141,9 +141,9 @@ public class InMemoryMapIT {
@Test
public void testMultipleMutationsOneKey() {
Mutation m1 = new Mutation("a");
- m1.put(new Text("4cf"), new Text("4cq"), new Value("vala".getBytes()));
+ m1.put(new Text("4cf"), new Text("4cq"), new Value("vala"));
Mutation m2 = new Mutation("b");
- m2.put(new Text("4cf"), new Text("4cq"), new Value("vala".getBytes()));
+ m2.put(new Text("4cf"), new Text("4cq"), new Value("vala"));
assertEquivalentMutate(Arrays.asList(m1, m2));
}
@@ -151,9 +151,9 @@ public class InMemoryMapIT {
@Test
public void testMultipleMutationsSameOneKey() {
Mutation m1 = new Mutation("a");
- m1.put(new Text("5cf"), new Text("5cq"), new Value("vala".getBytes()));
+ m1.put(new Text("5cf"), new Text("5cq"), new Value("vala"));
Mutation m2 = new Mutation("a");
- m2.put(new Text("5cf"), new Text("5cq"), new Value("vala".getBytes()));
+ m2.put(new Text("5cf"), new Text("5cq"), new Value("vala"));
assertEquivalentMutate(Arrays.asList(m1, m2));
}
@@ -162,11 +162,11 @@ public class InMemoryMapIT {
public void testMutlipleMutationsMultipleKeys() {
Mutation m1 = new Mutation("a");
for (int i = 1; i < 6; i++) {
- m1.put(new Text("6cf" + i), new Text("6cq" + i), new Value(Integer.toString(i).getBytes()));
+ m1.put(new Text("6cf" + i), new Text("6cq" + i), new Value(Integer.toString(i)));
}
Mutation m2 = new Mutation("b");
for (int i = 1; i < 3; i++) {
- m2.put(new Text("6cf" + i), new Text("6cq" + i), new Value(Integer.toString(i).getBytes()));
+ m2.put(new Text("6cf" + i), new Text("6cq" + i), new Value(Integer.toString(i)));
}
assertEquivalentMutate(Arrays.asList(m1, m2));
@@ -176,11 +176,11 @@ public class InMemoryMapIT {
public void testMultipleMutationsMultipleSameKeys() {
Mutation m1 = new Mutation("a");
for (int i = 1; i < 3; i++) {
- m1.put(new Text("7cf"), new Text("7cq"), new Value(Integer.toString(i).getBytes()));
+ m1.put(new Text("7cf"), new Text("7cq"), new Value(Integer.toString(i)));
}
Mutation m2 = new Mutation("a");
for (int i = 1; i < 4; i++) {
- m2.put(new Text("7cf"), new Text("7cq"), new Value(Integer.toString(i).getBytes()));
+ m2.put(new Text("7cf"), new Text("7cq"), new Value(Integer.toString(i)));
}
assertEquivalentMutate(Arrays.asList(m1, m2));
@@ -190,24 +190,24 @@ public class InMemoryMapIT {
public void testMultipleMutationsMultipleKeysSomeSame() {
Mutation m1 = new Mutation("a");
for (int i = 1; i < 2; i++) {
- m1.put(new Text("8cf"), new Text("8cq"), new Value(Integer.toString(i).getBytes()));
+ m1.put(new Text("8cf"), new Text("8cq"), new Value(Integer.toString(i)));
}
for (int i = 1; i < 3; i++) {
- m1.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i).getBytes()));
+ m1.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i)));
}
for (int i = 1; i < 2; i++) {
- m1.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i).getBytes()));
+ m1.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i)));
}
Mutation m2 = new Mutation("a");
for (int i = 1; i < 3; i++) {
- m2.put(new Text("8cf"), new Text("8cq"), new Value(Integer.toString(i).getBytes()));
+ m2.put(new Text("8cf"), new Text("8cq"), new Value(Integer.toString(i)));
}
for (int i = 1; i < 4; i++) {
- m2.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i).getBytes()));
+ m2.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i)));
}
Mutation m3 = new Mutation("b");
for (int i = 1; i < 3; i++) {
- m3.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i).getBytes()));
+ m3.put(new Text("8cf" + i), new Text("8cq" + i), new Value(Integer.toString(i)));
}
assertEquivalentMutate(Arrays.asList(m1, m2, m3));
diff --git a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
index 4fbba47..da1c15f 100644
--- a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -328,7 +327,7 @@ public class NamespacesIT extends SharedMiniClusterBase {
try (BatchWriter bw = c.createBatchWriter(t1)) {
Mutation m = new Mutation("r");
- m.put("a", "b", new Value("abcde".getBytes()));
+ m.put("a", "b", new Value("abcde"));
bw.addMutation(m);
bw.flush();
}
@@ -542,9 +541,9 @@ public class NamespacesIT extends SharedMiniClusterBase {
Mutation m1 = new Mutation("r1");
Mutation m2 = new Mutation("r2");
Mutation m3 = new Mutation("r3");
- m1.put("a", "b", new Value("abcde".getBytes(UTF_8)));
- m2.put("e", "f", new Value("123".getBytes(UTF_8)));
- m3.put("c", "d", new Value("zyxwv".getBytes(UTF_8)));
+ m1.put("a", "b", new Value("abcde"));
+ m2.put("e", "f", new Value("123"));
+ m3.put("c", "d", new Value("zyxwv"));
passed = false;
for (int i = 0; i < 5; i++) {
diff --git a/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java b/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
index 3239fa4..cfee679 100644
--- a/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
@@ -68,7 +68,7 @@ public class RecoveryCompactionsAreFlushesIT extends AccumuloClusterHarness {
// create 3 flush files
try (BatchWriter bw = c.createBatchWriter(tableName)) {
Mutation m = new Mutation("a");
- m.put("b", "c", new Value("v".getBytes()));
+ m.put("b", "c", new Value("v"));
for (int i = 0; i < 3; i++) {
bw.addMutation(m);
bw.flush();
diff --git a/test/src/main/java/org/apache/accumulo/test/SampleIT.java b/test/src/main/java/org/apache/accumulo/test/SampleIT.java
index 10cf38d..11a7870 100644
--- a/test/src/main/java/org/apache/accumulo/test/SampleIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/SampleIT.java
@@ -166,8 +166,8 @@ public class SampleIT extends AccumuloClusterHarness {
expected.keySet().removeIf(k -> k.getRow().toString().equals(someRow));
- expected.put(new Key(someRow, "cf1", "cq1", 8), new Value("42".getBytes()));
- expected.put(new Key(someRow, "cf1", "cq3", 8), new Value("suprise".getBytes()));
+ expected.put(new Key(someRow, "cf1", "cq1", 8), new Value("42"));
+ expected.put(new Key(someRow, "cf1", "cq3", 8), new Value("suprise"));
Mutation m = new Mutation(someRow);
@@ -193,8 +193,8 @@ public class SampleIT extends AccumuloClusterHarness {
expected.clear();
- expected.put(new Key(someRow, "cf1", "cq1", 8), new Value("42".getBytes()));
- expected.put(new Key(someRow, "cf1", "cq3", 8), new Value("suprise".getBytes()));
+ expected.put(new Key(someRow, "cf1", "cq1", 8), new Value("42"));
+ expected.put(new Key(someRow, "cf1", "cq3", 8), new Value("suprise"));
check(expected, scanner, bScanner, isoScanner, csiScanner, oScanner);
}
@@ -229,12 +229,12 @@ public class SampleIT extends AccumuloClusterHarness {
Key k1 = new Key(row, "cf1", "cq1", 7);
if (sampler.accept(k1)) {
- expected.put(k1, new Value(("" + i).getBytes()));
+ expected.put(k1, new Value("" + i));
}
Key k2 = new Key(row, "cf1", "cq2", 7);
if (sampler.accept(k2)) {
- expected.put(k2, new Value(("" + (100000000 - i)).getBytes()));
+ expected.put(k2, new Value("" + (100000000 - i)));
}
}
}
@@ -258,7 +258,7 @@ public class SampleIT extends AccumuloClusterHarness {
Key k1 = new Key(row, "cf1", "cq1", 7);
if (sampler.accept(k1)) {
- expected.put(k1, new Value(("" + i).getBytes()));
+ expected.put(k1, new Value("" + i));
count++;
if (count == 5) {
someRow = row;
@@ -267,7 +267,7 @@ public class SampleIT extends AccumuloClusterHarness {
Key k2 = new Key(row, "cf1", "cq2", 7);
if (sampler.accept(k2)) {
- expected.put(k2, new Value(("" + (100000000 - i)).getBytes()));
+ expected.put(k2, new Value("" + (100000000 - i)));
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index d3acf36..f57b916 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -1418,7 +1418,7 @@ public class ShellServerIT extends SharedMiniClusterBase {
long timestamp = System.currentTimeMillis();
Text cf = new Text("cf");
Text cq = new Text("cq");
- Value value = new Value("value".getBytes());
+ Value value = new Value("value");
for (int i = 0; i < 100; i += 2) {
Key key = new Key(new Text(String.format("%8d", i)), cf, cq, timestamp);
evenWriter.append(key, value);
diff --git a/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java b/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
index bff3806..8c45da6 100644
--- a/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
@@ -48,7 +48,7 @@ public class SplitRecoveryIT extends AccumuloClusterHarness {
private Mutation m(String row) {
Mutation result = new Mutation(row);
- result.put("cf", "cq", new Value("value".getBytes()));
+ result.put("cf", "cq", new Value("value"));
return result;
}
@@ -94,7 +94,7 @@ public class SplitRecoveryIT extends AccumuloClusterHarness {
Mutation m = extent.getPrevRowUpdateMutation();
TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m,
- new Value(Double.toString(0.5).getBytes()));
+ new Value(Double.toString(0.5)));
TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m,
KeyExtent.encodePrevEndRow(null));
try (BatchWriter bw = client.createBatchWriter(MetadataTable.NAME)) {
@@ -109,8 +109,8 @@ public class SplitRecoveryIT extends AccumuloClusterHarness {
KeyExtent extent2 = new KeyExtent(tableId, new Text("b"), null);
m = extent2.getPrevRowUpdateMutation();
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("t2".getBytes()));
- TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value("M0".getBytes()));
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value("t2"));
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value("M0"));
for (Entry<Key,Value> entry : scanner) {
m.put(DataFileColumnFamily.NAME, entry.getKey().getColumnQualifier(),
diff --git a/test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java b/test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java
index b7b5a46..f0cc12f 100644
--- a/test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java
@@ -132,7 +132,7 @@ public class TableOperationsIT extends AccumuloClusterHarness {
// add some data
try (BatchWriter bw = accumuloClient.createBatchWriter(tableName)) {
Mutation m = new Mutation("a");
- m.put("b", "c", new Value("abcde".getBytes()));
+ m.put("b", "c", new Value("abcde"));
bw.addMutation(m);
bw.flush();
}
diff --git a/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java b/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
index 226cc37..c73ff70 100644
--- a/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
+++ b/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
@@ -104,7 +104,7 @@ public class TestBinaryRows {
if (delete) {
m.putDelete(CF, CQ);
} else {
- m.put(CF, CQ, new Value(value.getBytes(UTF_8)));
+ m.put(CF, CQ, new Value(value));
}
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/TestMultiTableIngest.java b/test/src/main/java/org/apache/accumulo/test/TestMultiTableIngest.java
index f913d7a..af6c56c 100644
--- a/test/src/main/java/org/apache/accumulo/test/TestMultiTableIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/TestMultiTableIngest.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.test;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
@@ -96,7 +94,7 @@ public class TestMultiTableIngest {
for (int i = 0; i < opts.count; i++) {
Mutation m = new Mutation(new Text(String.format("%06d", i)));
m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"),
- new Value("junk".getBytes(UTF_8)));
+ new Value("junk"));
b.getBatchWriter(tableNames.get(i % tableNames.size())).addMutation(m);
}
try {
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/AddSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/AddSplitIT.java
index 29d6fae..81b845f 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/AddSplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/AddSplitIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import java.util.Collection;
@@ -129,7 +128,7 @@ public class AddSplitIT extends AccumuloClusterHarness {
for (int i = 0; i < 10000; i++) {
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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java
index c4d6e2c..3cca6df 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BadIteratorMincIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
@@ -55,7 +54,7 @@ public class BadIteratorMincIT extends AccumuloClusterHarness {
c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.minc));
try (BatchWriter bw = c.createBatchWriter(tableName)) {
Mutation m = new Mutation(new Text("r1"));
- m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
+ m.put(new Text("acf"), new Text(tableName), new Value("1"));
bw.addMutation(m);
}
@@ -88,7 +87,7 @@ public class BadIteratorMincIT extends AccumuloClusterHarness {
c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.minc));
try (BatchWriter bw = c.createBatchWriter(tableName)) {
Mutation m = new Mutation(new Text("r2"));
- m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
+ m.put(new Text("acf"), new Text(tableName), new Value("1"));
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BadLocalityGroupMincIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BadLocalityGroupMincIT.java
index 18c884c..6a8c680 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BadLocalityGroupMincIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BadLocalityGroupMincIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.util.Map.Entry;
@@ -63,7 +62,7 @@ public class BadLocalityGroupMincIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(tableName)) {
Mutation m = new Mutation(new Text("r1"));
- m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
+ m.put(new Text("acf"), new Text(tableName), new Value("1"));
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
index 7819cbd..d943e3e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import java.security.SecureRandom;
@@ -68,8 +67,7 @@ public class BatchScanSplitIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(tableName)) {
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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i)));
bw.addMutation(m);
}
}
@@ -92,7 +90,7 @@ public class BatchScanSplitIT extends AccumuloClusterHarness {
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(UTF_8)));
+ expected.put(row, new Value(String.format("%016x", numRows - r)));
ranges.add(new Range(row));
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java
index cc32eff..b99cf29 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -84,7 +83,7 @@ public class BatchWriterFlushIT extends AccumuloClusterHarness {
Scanner scanner = client.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(UTF_8)));
+ m.put(new Text("cf"), new Text("cq"), new Value("1"));
bw.addMutation(m);
sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
@@ -115,7 +114,7 @@ public class BatchWriterFlushIT extends AccumuloClusterHarness {
int row = i * NUM_TO_FLUSH + j;
Mutation m = new Mutation(new Text(String.format("r_%10d", row)));
- m.put(new Text("cf"), new Text("cq"), new Value(("" + row).getBytes()));
+ m.put(new Text("cf"), new Text("cq"), new Value("" + row));
bw.addMutation(m);
}
@@ -197,7 +196,7 @@ public class BatchWriterFlushIT extends AccumuloClusterHarness {
for (int j = 0; j < NUM_TO_FLUSH; j++) {
int row = i * NUM_TO_FLUSH + j;
Mutation m = new Mutation(new Text(String.format("%10d", row)));
- m.put(new Text("cf" + i), new Text("cq"), new Value(("" + row).getBytes()));
+ m.put(new Text("cf" + i), new Text("cq"), new Value("" + row));
data.add(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterIT.java
index a1d62e0..58d0cda 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BloomFilterIT.java
@@ -97,7 +97,7 @@ public class BloomFilterIT extends AccumuloClusterHarness {
// test inserting an empty key
try (BatchWriter bw = c.createBatchWriter(tables[3])) {
Mutation m = new Mutation(new Text(""));
- m.put(new Text(""), new Text(""), new Value("foo1".getBytes()));
+ m.put(new Text(""), new Text(""), new Value("foo1"));
bw.addMutation(m);
}
c.tableOperations().flush(tables[3], null, null, true);
@@ -244,15 +244,15 @@ public class BloomFilterIT extends AccumuloClusterHarness {
switch (depth) {
case 1:
m = new Mutation(new Text(key));
- m.put(new Text("cf"), new Text("cq"), new Value(("" + i).getBytes()));
+ m.put(new Text("cf"), new Text("cq"), new Value("" + i));
break;
case 2:
m = new Mutation(new Text("row"));
- m.put(new Text(key), new Text("cq"), new Value(("" + i).getBytes()));
+ m.put(new Text(key), new Text("cq"), new Value("" + i));
break;
case 3:
m = new Mutation(new Text("row"));
- m.put(new Text("cf"), new Text(key), new Value(("" + i).getBytes()));
+ m.put(new Text("cf"), new Text(key), new Value("" + i));
break;
}
bw.addMutation(m);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java
index 1c65b88..c267330 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOADED;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.PREV_ROW;
@@ -477,7 +476,7 @@ public class BulkNewIT extends SharedMiniClusterBase {
.withTableConfiguration(aconf).build()) {
writer.startDefaultLocalityGroup();
for (int i = s; i <= e; i++) {
- writer.append(new Key(new Text(row(i))), new Value(Integer.toString(i).getBytes(UTF_8)));
+ writer.append(new Key(new Text(row(i))), new Value(Integer.toString(i)));
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkOldIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkOldIT.java
index b29a6dc..c460316 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkOldIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkOldIT.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.IOException;
import java.util.Iterator;
import java.util.Map.Entry;
@@ -113,8 +111,7 @@ public class BulkOldIT extends AccumuloClusterHarness {
.withTableConfiguration(aconf).build();
writer1.startDefaultLocalityGroup();
for (int i = start; i <= end; i++) {
- writer1.append(new Key(new Text(String.format("%04d", i))),
- new Value(Integer.toString(i).getBytes(UTF_8)));
+ writer1.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i)));
}
writer1.close();
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConcurrencyIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConcurrencyIT.java
index 4a3d5b2..18ddec6 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConcurrencyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConcurrencyIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import java.util.EnumSet;
@@ -111,7 +110,7 @@ public class ConcurrencyIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(tableName);
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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq1"), new Value("foo"));
bw.addMutation(m);
}
bw.flush();
@@ -127,7 +126,7 @@ public class ConcurrencyIT extends AccumuloClusterHarness {
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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq1"), new Value("foo"));
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java
index 56663f8..3f9d4d4 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import java.util.HashMap;
@@ -93,7 +92,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
BatchWriter bw = client.createBatchWriter(tableName);
Mutation mut1 = new Mutation(new Text("r1"));
- mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(UTF_8)));
+ mut1.put(new Text("cf1"), new Text("cq1"), new Value("123"));
bw.addMutation(mut1);
@@ -104,7 +103,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
// 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(UTF_8)));
+ mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a"));
bw.addMutation(mut2);
@@ -149,7 +148,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("123"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
@@ -175,7 +174,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("123a"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
@@ -194,7 +193,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
bw = client.createBatchWriter(tableName);
Mutation mut3 = new Mutation(new Text("r1"));
- mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
+ mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo"));
bw.addMutation(mut3);
@@ -219,7 +218,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("123a"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
@@ -245,7 +244,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("foo"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
@@ -259,7 +258,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)));
+ mut1.put(new Text(cf), new Text(cq), new Value(val));
return mut1;
}
@@ -335,7 +334,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("123"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
@@ -344,7 +343,7 @@ public class ConstraintIT extends AccumuloClusterHarness {
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(UTF_8)))) {
+ || !entry.getValue().equals(new Value("789"))) {
throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CreateAndUseIT.java b/test/src/main/java/org/apache/accumulo/test/functional/CreateAndUseIT.java
index a536394..2f271f8 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CreateAndUseIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CreateAndUseIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
@@ -74,7 +73,7 @@ public class CreateAndUseIT extends AccumuloClusterHarness {
try (BatchWriter bw = client.createBatchWriter(tableName)) {
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(UTF_8)));
+ m.put(cf, cq, new Value(Integer.toString(i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java
index cf321ba..d05f320 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/DeleteEverythingIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
@@ -87,7 +86,7 @@ public class DeleteEverythingIT extends AccumuloClusterHarness {
c.tableOperations().create(tableName);
BatchWriter bw = c.createBatchWriter(tableName);
Mutation m = new Mutation(new Text("foo"));
- m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(UTF_8)));
+ m.put(new Text("bar"), new Text("1910"), new Value("5"));
bw.addMutation(m);
bw.flush();
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java b/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
index 676b57d..b20c5ce 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
@@ -158,7 +158,7 @@ public class FunctionalTestUtils {
}
static Mutation nm(String row, String cf, String cq, String value) {
- return nm(row, cf, cq, new Value(value.getBytes()));
+ return nm(row, cf, cq, new Value(value));
}
public static SortedSet<Text> splits(String[] splits) {
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/KerberosIT.java b/test/src/main/java/org/apache/accumulo/test/functional/KerberosIT.java
index 2bfd21d..9aebf27 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/KerberosIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/KerberosIT.java
@@ -379,7 +379,7 @@ public class KerberosIT extends AccumuloITBase {
assertTrue("No results from iterator", iter.hasNext());
Entry<Key,Value> entry = iter.next();
assertEquals(new Key("a", "b", "c", viz, ts), entry.getKey());
- assertEquals(new Value("d".getBytes()), entry.getValue());
+ assertEquals(new Value("d"), entry.getValue());
assertFalse("Had more results from iterator", iter.hasNext());
return null;
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
index 69eac71..1a15549 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Collections.singletonMap;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertTrue;
@@ -169,7 +168,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
r.nextBytes(rowData);
TestIngest.toPrintableChars(rowData);
Mutation mut = new Mutation(new Text(rowData));
- mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(UTF_8)));
+ mut.put(new Text(""), new Text(""), new Value(Integer.toString(i)));
bw.addMutation(mut);
}
}
@@ -218,7 +217,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
if (!entry.getKey().getRow().equals(new Text(rowData))) {
throw new Exception("verification failed, unexpected row i =" + i);
}
- if (!entry.getValue().equals(new Value(Integer.toString(i).getBytes(UTF_8)))) {
+ if (!entry.getValue().equals(new Value(Integer.toString(i)))) {
throw new Exception(
"verification failed, unexpected value i =" + i + " value = " + entry.getValue());
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java b/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
index 97674c1..4be0531 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
@@ -65,7 +65,7 @@ public class NativeMapIT {
}
private Value newValue(int v) {
- return new Value(String.format("r%09d", v).getBytes(UTF_8));
+ return new Value(String.format("r%09d", v));
}
public static File nativeMapLocation() {
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java b/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
index 5a80f5d..3af1f7d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
@@ -613,7 +613,7 @@ public class PermissionsIT extends AccumuloClusterHarness {
// put in some initial data
try (BatchWriter writer = c.createBatchWriter(tableName)) {
Mutation m = new Mutation(new Text("row"));
- m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes()));
+ m.put(new Text("cf"), new Text("cq"), new Value("val"));
writer.addMutation(m);
}
@@ -649,7 +649,7 @@ public class PermissionsIT extends AccumuloClusterHarness {
try {
try (BatchWriter bw = test_user_client.createBatchWriter(tableName)) {
m = new Mutation(new Text("row"));
- m.put(new Text("a"), new Text("b"), new Value("c".getBytes()));
+ m.put(new Text("a"), new Text("b"), new Value("c"));
bw.addMutation(m);
} catch (MutationsRejectedException e1) {
if (e1.getSecurityErrorCodes().size() > 0)
@@ -728,7 +728,7 @@ public class PermissionsIT extends AccumuloClusterHarness {
case WRITE:
try (BatchWriter bw = test_user_client.createBatchWriter(tableName)) {
Mutation m = new Mutation(new Text("row"));
- m.put(new Text("a"), new Text("b"), new Value("c".getBytes()));
+ m.put(new Text("a"), new Text("b"), new Value("c"));
bw.addMutation(m);
}
break;
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
index 3b9a2e1..66788a3 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ReadWriteIT.java
@@ -307,7 +307,7 @@ public class ReadWriteIT extends AccumuloClusterHarness {
public static Mutation m(String row, String cf, String cq, String value) {
Mutation m = new Mutation(t(row));
- m.put(t(cf), t(cq), new Value(value.getBytes()));
+ m.put(t(cf), t(cq), new Value(value));
return m;
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
index 2ddddcd..39a959a 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -371,11 +370,11 @@ public class ScanIdIT extends AccumuloClusterHarness {
Text rowId = new Text(String.format("%d", ((random.nextInt(10) * 100) + i)));
Mutation m = new Mutation(rowId);
- m.put(new Text("fam1"), new Text("count"), new Value(Integer.toString(i).getBytes(UTF_8)));
+ m.put(new Text("fam1"), new Text("count"), new Value(Integer.toString(i)));
m.put(new Text("fam1"), new Text("positive"), vis,
- new Value(Integer.toString(NUM_DATA_ROWS - i).getBytes(UTF_8)));
+ new Value(Integer.toString(NUM_DATA_ROWS - i)));
m.put(new Text("fam1"), new Text("negative"), vis,
- new Value(Integer.toString(i - NUM_DATA_ROWS).getBytes(UTF_8)));
+ new Value(Integer.toString(i - NUM_DATA_ROWS)));
log.trace("Added row {}", rowId);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
index f2c1d9b..44c844d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
@@ -113,10 +112,8 @@ public class ScanIteratorIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(tableName)) {
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(UTF_8)));
- m.put(new Text("cf1"), new Text("cq2"),
- new Value(Integer.toString(i - 1000).getBytes(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i)));
+ m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000)));
bw.addMutation(m);
}
}
@@ -242,7 +239,7 @@ public class ScanIteratorIT extends AccumuloClusterHarness {
throws TableNotFoundException, MutationsRejectedException {
try (BatchWriter batchWriter = userC.createBatchWriter(tableName)) {
Mutation m = new Mutation("1");
- m.put(new Text("2"), new Text("3"), new Value("".getBytes()));
+ m.put(new Text("2"), new Text("3"), new Value(""));
batchWriter.addMutation(m);
batchWriter.flush();
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanRangeIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanRangeIT.java
index 1803374..b59b7a3 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanRangeIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanRangeIT.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.util.Map.Entry;
import java.util.TreeSet;
@@ -234,7 +232,7 @@ public class ScanRangeIT extends AccumuloClusterHarness {
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(UTF_8)));
+ new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t)));
}
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
index 097c74a..5fe5dad 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
import java.util.Iterator;
@@ -103,7 +102,7 @@ public class ScanSessionTimeOutIT extends AccumuloClusterHarness {
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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq" + j), new Value(i + "_" + j));
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
index 9ab63b9..9845977 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -90,7 +89,7 @@ public class SessionBlockVerifyIT extends ScanSessionTimeOutIT {
for (int i = 0; i < 1000; 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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq" + j), new Value(i + "_" + j));
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java b/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
index a465af7..fc49b18 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Collections.singletonMap;
import static org.junit.Assert.assertEquals;
@@ -87,7 +86,7 @@ public class TabletIT extends AccumuloClusterHarness {
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(UTF_8)));
+ new Value("junk"));
b.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java
index 35c53cc..069bc3f 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import java.util.Collection;
@@ -155,7 +154,7 @@ public class TabletStateChangeIteratorIT extends AccumuloClusterHarness {
TableId.of(client.tableOperations().tableIdMap().get(tableNameToModify));
Mutation m = new Mutation(new KeyExtent(tableIdToModify, null, null).getMetadataEntry());
m.put(MetadataSchema.TabletsSection.CurrentLocationColumnFamily.NAME, new Text("1234567"),
- new Value("fake:9005".getBytes(UTF_8)));
+ new Value("fake:9005"));
try (BatchWriter bw = client.createBatchWriter(table)) {
bw.addMutation(m);
}
@@ -173,7 +172,7 @@ public class TabletStateChangeIteratorIT extends AccumuloClusterHarness {
m.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier(),
entry.getKey().getTimestamp());
m.put(entry.getKey().getColumnFamily(), new Text("1234567"),
- entry.getKey().getTimestamp() + 1, new Value("fake:9005".getBytes(UTF_8)));
+ entry.getKey().getTimestamp() + 1, new Value("fake:9005"));
try (BatchWriter bw = client.createBatchWriter(table)) {
bw.addMutation(m);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/VisibilityIT.java b/test/src/main/java/org/apache/accumulo/test/functional/VisibilityIT.java
index cccd82e..6c6d1ea 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/VisibilityIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/VisibilityIT.java
@@ -108,7 +108,7 @@ public class VisibilityIT extends AccumuloClusterHarness {
private void mput(Mutation m, String cf, String cq, String cv, String val) {
ColumnVisibility le = new ColumnVisibility(cv.getBytes(UTF_8));
- m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(UTF_8)));
+ m.put(new Text(cf), new Text(cq), le, new Value(val));
}
private void mputDelete(Mutation m, String cf, String cq, String cv) {
diff --git a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloInputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloInputFormatIT.java
index fe6b9c7..2560729 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloInputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloInputFormatIT.java
@@ -163,7 +163,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(table)) {
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
}
@@ -191,7 +191,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(TEST_TABLE_3)) {
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloMultiTableInputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloMultiTableInputFormatIT.java
index b5deae0..93ec166 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloMultiTableInputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloMultiTableInputFormatIT.java
@@ -156,12 +156,10 @@ public class AccumuloMultiTableInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw2 = c.createBatchWriter(table2)) {
for (int i = 0; i < 100; i++) {
Mutation t1m = new Mutation(new Text(String.format("%s_%09x", table1, i + 1)));
- t1m.put(new Text(), new Text(),
- new Value(String.format("%s_%09x", table1, i).getBytes()));
+ t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i)));
bw.addMutation(t1m);
Mutation t2m = new Mutation(new Text(String.format("%s_%09x", table2, i + 1)));
- t2m.put(new Text(), new Text(),
- new Value(String.format("%s_%09x", table2, i).getBytes()));
+ t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i)));
bw2.addMutation(t2m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloOutputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloOutputFormatIT.java
index e9323ad..185b2cc 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloOutputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapred/AccumuloOutputFormatIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.accumulo.test.mapred;
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -101,7 +100,7 @@ public class AccumuloOutputFormatIT extends ConfigurableMacBase {
for (int i = 0; i < 3; 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(UTF_8)));
+ m.put(new Text("cf1"), new Text("cq" + j), new Value(i + "_" + j));
}
writer.write(new Text(testName.getMethodName()), m);
}
@@ -227,7 +226,7 @@ public class AccumuloOutputFormatIT extends ConfigurableMacBase {
try (BatchWriter bw = c.createBatchWriter(table1)) {
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapred/TokenFileIT.java b/test/src/main/java/org/apache/accumulo/test/mapred/TokenFileIT.java
index 06901a9..7114113 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapred/TokenFileIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapred/TokenFileIT.java
@@ -174,7 +174,7 @@ public class TokenFileIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(table1)) {
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloInputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloInputFormatIT.java
index 3cb49df..0ec80a7 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloInputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloInputFormatIT.java
@@ -210,7 +210,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterHarness {
for (int i = 0; i < 10000; i++) {
String row = String.format("%09d", i);
Mutation m = new Mutation(new Text(row));
- m.put(new Text("cf1"), new Text("cq1"), ts, new Value(("" + i).getBytes()));
+ m.put(new Text("cf1"), new Text("cq1"), ts, new Value("" + i));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloMultiTableInputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloMultiTableInputFormatIT.java
index cda7839..22b0178 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloMultiTableInputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloMultiTableInputFormatIT.java
@@ -158,10 +158,10 @@ public class AccumuloMultiTableInputFormatIT extends AccumuloClusterHarness {
BatchWriter bw2 = c.createBatchWriter(table2, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation t1m = new Mutation(new Text(String.format("%s_%09x", table1, i + 1)));
- t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i).getBytes()));
+ t1m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table1, i)));
bw.addMutation(t1m);
Mutation t2m = new Mutation(new Text(String.format("%s_%09x", table2, i + 1)));
- t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i).getBytes()));
+ t2m.put(new Text(), new Text(), new Value(String.format("%s_%09x", table2, i)));
bw2.addMutation(t2m);
}
bw.close();
diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloOutputFormatIT.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloOutputFormatIT.java
index 9a20959..4f817e1 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloOutputFormatIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/AccumuloOutputFormatIT.java
@@ -142,7 +142,7 @@ public class AccumuloOutputFormatIT extends AccumuloClusterHarness {
try (BatchWriter bw = client.createBatchWriter(table)) {
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/mapreduce/TokenFileIT.java b/test/src/main/java/org/apache/accumulo/test/mapreduce/TokenFileIT.java
index 6fd9300..8476b78 100644
--- a/test/src/main/java/org/apache/accumulo/test/mapreduce/TokenFileIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/mapreduce/TokenFileIT.java
@@ -180,7 +180,7 @@ public class TokenFileIT extends AccumuloClusterHarness {
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
- m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
+ m.put(new Text(), new Text(), new Value(String.format("%09x", i)));
bw.addMutation(m);
}
bw.close();
diff --git a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
index f4e4033..ac6767a 100644
--- a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
@@ -122,15 +122,15 @@ public class MergeStateIT extends ConfigurableMacBase {
Text split = new Text(s);
Mutation prevRow = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, split, pr));
prevRow.put(TabletsSection.CurrentLocationColumnFamily.NAME, new Text("123456"),
- new Value("127.0.0.1:1234".getBytes()));
- ChoppedColumnFamily.CHOPPED_COLUMN.put(prevRow, new Value("junk".getBytes()));
+ new Value("127.0.0.1:1234"));
+ ChoppedColumnFamily.CHOPPED_COLUMN.put(prevRow, new Value("junk"));
bw.addMutation(prevRow);
pr = split;
}
// Add the default tablet
Mutation defaultTablet = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, null, pr));
defaultTablet.put(TabletsSection.CurrentLocationColumnFamily.NAME, new Text("123456"),
- new Value("127.0.0.1:1234".getBytes()));
+ new Value("127.0.0.1:1234"));
bw.addMutation(defaultTablet);
bw.close();
@@ -151,7 +151,7 @@ public class MergeStateIT extends ConfigurableMacBase {
// Create the hole
// Split the tablet at one end of the range
Mutation m = new KeyExtent(tableId, new Text("t"), new Text("p")).getPrevRowUpdateMutation();
- TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value("0.5".getBytes()));
+ TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value("0.5"));
TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m,
KeyExtent.encodePrevEndRow(new Text("o")));
update(accumuloClient, m);
@@ -175,7 +175,7 @@ public class MergeStateIT extends ConfigurableMacBase {
// finish the split
KeyExtent tablet = new KeyExtent(tableId, new Text("p"), new Text("o"));
m = tablet.getPrevRowUpdateMutation();
- TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value("0.5".getBytes()));
+ TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value("0.5"));
update(accumuloClient, m);
metaDataStateStore
.setLocations(Collections.singletonList(new Assignment(tablet, state.someTServer)));
@@ -186,7 +186,7 @@ public class MergeStateIT extends ConfigurableMacBase {
// chop it
m = tablet.getPrevRowUpdateMutation();
- ChoppedColumnFamily.CHOPPED_COLUMN.put(m, new Value("junk".getBytes()));
+ ChoppedColumnFamily.CHOPPED_COLUMN.put(m, new Value("junk"));
update(accumuloClient, m);
stats = scan(state, metaDataStateStore);
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java b/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
index f23f636..0d7698c 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
@@ -183,7 +183,7 @@ public class UnusedWalDoesntCloseReplicationStatusIT extends ConfigurableMacBase
try (BatchWriter bw = client.createBatchWriter(MetadataTable.NAME)) {
Mutation m = new Mutation(extent.getMetadataEntry());
m.put(MetadataSchema.TabletsSection.LogColumnFamily.NAME,
- new Text("localhost:12345/" + walUri), new Value((walUri + "|1").getBytes(UTF_8)));
+ new Text("localhost:12345/" + walUri), new Value(walUri + "|1"));
bw.addMutation(m);
// Add a replication entry for our fake WAL
diff --git a/test/src/main/java/org/apache/accumulo/test/util/SlowOps.java b/test/src/main/java/org/apache/accumulo/test/util/SlowOps.java
index 5e28a06..177f544 100644
--- a/test/src/main/java/org/apache/accumulo/test/util/SlowOps.java
+++ b/test/src/main/java/org/apache/accumulo/test/util/SlowOps.java
@@ -16,8 +16,6 @@
*/
package org.apache.accumulo.test.util;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -133,8 +131,7 @@ public class SlowOps {
// populate
for (int i = 0; i < NUM_DATA_ROWS; i++) {
Mutation m = new Mutation(new Text(String.format("%05d", i)));
- m.put(new Text("col" + ((i % 3) + 1)), new Text("qual"),
- new Value("junk".getBytes(UTF_8)));
+ m.put(new Text("col" + ((i % 3) + 1)), new Text("qual"), new Value("junk"));
bw.addMutation(m);
}
}
diff --git a/test/src/test/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraintTest.java b/test/src/test/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraintTest.java
index 2f31ffc..404596c 100644
--- a/test/src/test/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraintTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraintTest.java
@@ -33,12 +33,12 @@ public class AlphaNumKeyConstraintTest {
@Test
public void test() {
Mutation goodMutation = new Mutation(new Text("Row1"));
- goodMutation.put(new Text("Colf2"), new Text("ColQ3"), new Value("value".getBytes()));
+ goodMutation.put(new Text("Colf2"), new Text("ColQ3"), new Value("value"));
assertNull(ankc.check(null, goodMutation));
// Check that violations are in row, cf, cq order
Mutation badMutation = new Mutation(new Text("Row#1"));
- badMutation.put(new Text("Colf$2"), new Text("Colq%3"), new Value("value".getBytes()));
+ badMutation.put(new Text("Colf$2"), new Text("Colq%3"), new Value("value"));
assertEquals(List.of(AlphaNumKeyConstraint.NON_ALPHA_NUM_ROW,
AlphaNumKeyConstraint.NON_ALPHA_NUM_COLF, AlphaNumKeyConstraint.NON_ALPHA_NUM_COLQ),
ankc.check(null, badMutation));
diff --git a/test/src/test/java/org/apache/accumulo/test/constraints/NumericValueConstraintTest.java b/test/src/test/java/org/apache/accumulo/test/constraints/NumericValueConstraintTest.java
index 0761700..5a9b939 100644
--- a/test/src/test/java/org/apache/accumulo/test/constraints/NumericValueConstraintTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/constraints/NumericValueConstraintTest.java
@@ -33,13 +33,13 @@ public class NumericValueConstraintTest {
@Test
public void testCheck() {
Mutation goodMutation = new Mutation(new Text("r"));
- goodMutation.put(new Text("cf"), new Text("cq"), new Value("1234".getBytes()));
+ goodMutation.put(new Text("cf"), new Text("cq"), new Value("1234"));
assertNull(nvc.check(null, goodMutation));
// Check that multiple bad mutations result in one violation only
Mutation badMutation = new Mutation(new Text("r"));
- badMutation.put(new Text("cf"), new Text("cq"), new Value("foo1234".getBytes()));
- badMutation.put(new Text("cf2"), new Text("cq2"), new Value("foo1234".getBytes()));
+ badMutation.put(new Text("cf"), new Text("cq"), new Value("foo1234"));
+ badMutation.put(new Text("cf2"), new Text("cq2"), new Value("foo1234"));
assertEquals(NumericValueConstraint.NON_NUMERIC_VALUE,
Iterables.getOnlyElement(nvc.check(null, badMutation)).shortValue());
}
diff --git a/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java b/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
index 5825e4f..61c36d8 100644
--- a/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
@@ -53,7 +53,7 @@ public class RegExTest {
String row = "r" + rc;
for (Character cfc : chars) {
for (Character cqc : chars) {
- Value v = new Value(("v" + rc + cfc + cqc).getBytes());
+ Value v = new Value("v" + rc + cfc + cqc);
data.put(new Key(row, "cf" + cfc, "cq" + cqc, "", 9), v);
}
}
diff --git a/test/src/test/java/org/apache/accumulo/test/iterator/SummingCombinerTest.java b/test/src/test/java/org/apache/accumulo/test/iterator/SummingCombinerTest.java
index f4939d6..779756b 100644
--- a/test/src/test/java/org/apache/accumulo/test/iterator/SummingCombinerTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/iterator/SummingCombinerTest.java
@@ -99,7 +99,7 @@ public class SummingCombinerTest extends BaseJUnit4IteratorTest {
} else {
if (0 != lastKey.compareTo(entry.getKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) {
// Different key, store the running sum.
- data.put(lastKey, new Value(Long.toString(sum).getBytes(UTF_8)));
+ data.put(lastKey, new Value(Long.toString(sum)));
// Reset lastKey and the sum
lastKey = entry.getKey();
sum = 0;
@@ -109,7 +109,7 @@ public class SummingCombinerTest extends BaseJUnit4IteratorTest {
}
}
- data.put(lastKey, new Value(Long.toString(sum).getBytes(UTF_8)));
+ data.put(lastKey, new Value(Long.toString(sum)));
return data;
}
diff --git a/test/src/test/java/org/apache/accumulo/test/iterator/WholeRowIteratorTest.java b/test/src/test/java/org/apache/accumulo/test/iterator/WholeRowIteratorTest.java
index 44db0f4..8cbde40 100644
--- a/test/src/test/java/org/apache/accumulo/test/iterator/WholeRowIteratorTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/iterator/WholeRowIteratorTest.java
@@ -54,36 +54,36 @@ public class WholeRowIteratorTest extends BaseJUnit4IteratorTest {
private static TreeMap<Key,Value> createInputData() {
TreeMap<Key,Value> data = new TreeMap<>();
- data.put(new Key("1", "", "a"), new Value("1a".getBytes()));
- data.put(new Key("1", "", "b"), new Value("1b".getBytes()));
- data.put(new Key("1", "a", "a"), new Value("1aa".getBytes()));
- data.put(new Key("1", "a", "b"), new Value("1ab".getBytes()));
- data.put(new Key("1", "b", "a"), new Value("1ba".getBytes()));
-
- data.put(new Key("2", "a", "a"), new Value("2aa".getBytes()));
- data.put(new Key("2", "a", "b"), new Value("2ab".getBytes()));
- data.put(new Key("2", "a", "c"), new Value("2ac".getBytes()));
- data.put(new Key("2", "c", "c"), new Value("2cc".getBytes()));
-
- data.put(new Key("3", "a", ""), new Value("3a".getBytes()));
-
- data.put(new Key("4", "a", "b"), new Value("4ab".getBytes()));
-
- data.put(new Key("5", "a", "a"), new Value("5aa".getBytes()));
- data.put(new Key("5", "a", "b"), new Value("5ab".getBytes()));
- data.put(new Key("5", "a", "c"), new Value("5ac".getBytes()));
- data.put(new Key("5", "a", "d"), new Value("5ad".getBytes()));
-
- data.put(new Key("6", "", "a"), new Value("6a".getBytes()));
- data.put(new Key("6", "", "b"), new Value("6b".getBytes()));
- data.put(new Key("6", "", "c"), new Value("6c".getBytes()));
- data.put(new Key("6", "", "d"), new Value("6d".getBytes()));
- data.put(new Key("6", "", "e"), new Value("6e".getBytes()));
- data.put(new Key("6", "1", "a"), new Value("61a".getBytes()));
- data.put(new Key("6", "1", "b"), new Value("61b".getBytes()));
- data.put(new Key("6", "1", "c"), new Value("61c".getBytes()));
- data.put(new Key("6", "1", "d"), new Value("61d".getBytes()));
- data.put(new Key("6", "1", "e"), new Value("61e".getBytes()));
+ data.put(new Key("1", "", "a"), new Value("1a"));
+ data.put(new Key("1", "", "b"), new Value("1b"));
+ data.put(new Key("1", "a", "a"), new Value("1aa"));
+ data.put(new Key("1", "a", "b"), new Value("1ab"));
+ data.put(new Key("1", "b", "a"), new Value("1ba"));
+
+ data.put(new Key("2", "a", "a"), new Value("2aa"));
+ data.put(new Key("2", "a", "b"), new Value("2ab"));
+ data.put(new Key("2", "a", "c"), new Value("2ac"));
+ data.put(new Key("2", "c", "c"), new Value("2cc"));
+
+ data.put(new Key("3", "a", ""), new Value("3a"));
+
+ data.put(new Key("4", "a", "b"), new Value("4ab"));
+
+ data.put(new Key("5", "a", "a"), new Value("5aa"));
+ data.put(new Key("5", "a", "b"), new Value("5ab"));
+ data.put(new Key("5", "a", "c"), new Value("5ac"));
+ data.put(new Key("5", "a", "d"), new Value("5ad"));
+
+ data.put(new Key("6", "", "a"), new Value("6a"));
+ data.put(new Key("6", "", "b"), new Value("6b"));
+ data.put(new Key("6", "", "c"), new Value("6c"));
+ data.put(new Key("6", "", "d"), new Value("6d"));
+ data.put(new Key("6", "", "e"), new Value("6e"));
+ data.put(new Key("6", "1", "a"), new Value("61a"));
+ data.put(new Key("6", "1", "b"), new Value("61b"));
+ data.put(new Key("6", "1", "c"), new Value("61c"));
+ data.put(new Key("6", "1", "d"), new Value("61d"));
+ data.put(new Key("6", "1", "e"), new Value("61e"));
return data;
}