@@ -79,7 +79,7 @@ public void testWALMaxReferenced() throws Exception {
79
79
80
80
SortedSet <Text > splits = new TreeSet <>();
81
81
for (int i = 1 ; i <= 4 ; i ++) {
82
- splits .add (new Text (Integer . toString ( i )));
82
+ splits .add (new Text (String . format ( "%03d" , i )));
83
83
}
84
84
client .tableOperations ().create (tableName , new NewTableConfiguration ().withSplits (splits ));
85
85
@@ -89,8 +89,10 @@ public void testWALMaxReferenced() throws Exception {
89
89
AtomicInteger iteration = new AtomicInteger (0 );
90
90
Wait .waitFor (() -> {
91
91
92
+ String rowToWrite = String .format ("%03d" , iteration .get ());
93
+
92
94
// Write data that should fill or partially fill the WAL
93
- writeData (client , tableName );
95
+ writeData (client , tableName , rowToWrite );
94
96
95
97
// Check the current number of WALs in use
96
98
long walCount = getWalCount (getServerContext ());
@@ -115,11 +117,11 @@ public void testWALMaxReferenced() throws Exception {
115
117
/**
116
118
* Writes data to a single tablet until the total written data size exceeds 2 * TSERV_WAL_MAX_SIZE
117
119
*/
118
- private void writeData (AccumuloClient client , String table ) throws Exception {
120
+ private void writeData (AccumuloClient client , String table , String rowToWrite ) throws Exception {
119
121
try (BatchWriter bw = client .createBatchWriter (table , new BatchWriterConfig ())) {
120
122
long totalWritten = 0 ;
121
123
while (totalWritten < 2 * hdfsMinBlockSize ) {
122
- Mutation m = new Mutation ("target_row" );
124
+ Mutation m = new Mutation (rowToWrite );
123
125
m .put ("cf" , "cq" , "value" );
124
126
bw .addMutation (m );
125
127
totalWritten += m .estimatedMemoryUsed ();
0 commit comments