| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; import java.nio.charset.Charset; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Arrays; import java.util.Collection; import java.util.Collections; |
| Solution content |
|---|
*/ package org.apache.accumulo.core; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Arrays; import java.util.Collection; import java.util.Collections; |
| File |
|---|
| Constants.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import com.google.common.base.Charsets;
public class Constants {
<<<<<<< HEAD
=======
/**
* @deprecated since 1.5.3, 1.6.2; statically import Guava's {@link Charsets#UTF_8} or Java 7's built-in StandardCharsets.UTF_8 or use
* {@link Charset#forName(String)} with "UTF-8" instead
*/
@Deprecated
public static final Charset UTF8 = UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
public static final String VERSION = FilteredConstants.VERSION;
// Zookeeper locations |
| Solution content |
|---|
public class Constants {
public static final String VERSION = FilteredConstants.VERSION;
// Zookeeper locations |
| File |
|---|
| Constants.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String BULK_PREFIX = "b-"; public static final String CLONE_PREFIX = "c-"; <<<<<<< HEAD public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(StandardCharsets.UTF_8); ======= public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8); >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f // this affects the table client caching of metadata public static final int SCAN_BATCH_SIZE = 1000; |
| Solution content |
|---|
public static final String BULK_PREFIX = "b-"; public static final String CLONE_PREFIX = "c-"; public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8); // this affects the table client caching of metadata public static final int SCAN_BATCH_SIZE = 1000; |
| File |
|---|
| Constants.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.cli; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.cli; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; |
| File |
|---|
| ClientOpts.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public byte[] value;
public Password(String dfault) {
<<<<<<< HEAD
value = dfault.getBytes(StandardCharsets.UTF_8);
=======
value = dfault.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
public byte[] value;
public Password(String dfault) {
value = dfault.getBytes(UTF_8);
}
@Override |
| File |
|---|
| ClientOpts.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public String toString() {
<<<<<<< HEAD
return new String(value, StandardCharsets.UTF_8);
=======
return new String(value, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
}
|
| Solution content |
|---|
@Override
public String toString() {
return new String(value, UTF_8);
}
}
|
| File |
|---|
| ClientOpts.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
import java.util.List; import java.util.concurrent.TimeUnit; <<<<<<< HEAD import org.apache.accumulo.core.client.impl.DurabilityImpl; ======= >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.hadoop.io.Writable; import org.apache.hadoop.util.StringUtils; |
| Solution content |
|---|
import java.util.List; import java.util.concurrent.TimeUnit; import org.apache.accumulo.core.client.impl.DurabilityImpl; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.hadoop.io.Writable; import org.apache.hadoop.util.StringUtils; |
| File |
|---|
| BatchWriterConfig.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
addField(fields, "durability", durability);
String output = StringUtils.join(",", fields);
<<<<<<< HEAD
byte[] bytes = output.getBytes(StandardCharsets.UTF_8);
byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(StandardCharsets.UTF_8);
=======
byte[] bytes = output.getBytes(UTF_8);
byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (len.length != 7)
throw new IllegalStateException("encoded length does not match expected value");
out.write(len); |
| Solution content |
|---|
addField(fields, "durability", durability);
String output = StringUtils.join(",", fields);
byte[] bytes = output.getBytes(UTF_8);
byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(UTF_8);
if (len.length != 7)
throw new IllegalStateException("encoded length does not match expected value");
out.write(len); |
| File |
|---|
| BatchWriterConfig.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void readFields(DataInput in) throws IOException {
byte[] len = new byte[7];
in.readFully(len);
<<<<<<< HEAD
String strLen = new String(len, StandardCharsets.UTF_8);
=======
String strLen = new String(len, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (!strLen.endsWith("#"))
throw new IllegalStateException("length was not encoded correctly");
byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)]; |
| Solution content |
|---|
public void readFields(DataInput in) throws IOException {
byte[] len = new byte[7];
in.readFully(len);
String strLen = new String(len, UTF_8);
if (!strLen.endsWith("#"))
throw new IllegalStateException("length was not encoded correctly");
byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)]; |
| File |
|---|
| BatchWriterConfig.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
in.readFully(bytes);
<<<<<<< HEAD
String strFields = new String(bytes, StandardCharsets.UTF_8);
=======
String strFields = new String(bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
String[] fields = StringUtils.split(strFields, '\\', ',');
for (String field : fields) {
String[] keyValue = StringUtils.split(field, '\\', '='); |
| Solution content |
|---|
byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
in.readFully(bytes);
String strFields = new String(bytes, UTF_8);
String[] fields = StringUtils.split(strFields, '\\', ',');
for (String field : fields) {
String[] keyValue = StringUtils.split(field, '\\', '='); |
| File |
|---|
| BatchWriterConfig.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.nio.ByteBuffer; |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
throw new RuntimeException("Instance name " + instanceName
+ " does not exist in zookeeper. Run \"accumulo org.apache.accumulo.server.util.ListInstances\" to see a list.");
}
<<<<<<< HEAD
instanceId = new String(iidb, StandardCharsets.UTF_8);
=======
instanceId = new String(iidb, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) { |
| Solution content |
|---|
throw new RuntimeException("Instance name " + instanceName
+ " does not exist in zookeeper. Run \"accumulo org.apache.accumulo.server.util.ListInstances\" to see a list.");
}
instanceId = new String(iidb, UTF_8);
}
if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) { |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up master location in zoocache.");
byte[] loc = ZooUtil.getLockData(zooCache, masterLocPath);
<<<<<<< HEAD
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (loc == null) {
return Collections.emptyList(); |
| Solution content |
|---|
OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up master location in zoocache.");
byte[] loc = ZooUtil.getLockData(zooCache, masterLocPath);
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
if (loc == null) {
return Collections.emptyList(); |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
return Collections.emptyList();
}
return Collections.singletonList(new String(loc, StandardCharsets.UTF_8));
=======
return Collections.singletonList(new String(loc, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
return Collections.emptyList();
}
return Collections.singletonList(new String(loc, UTF_8));
}
@Override |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location in zookeeper.");
byte[] loc = zooCache.get(zRootLocPath);
<<<<<<< HEAD
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (loc == null) {
return null; |
| Solution content |
|---|
OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location in zookeeper.");
byte[] loc = zooCache.get(zRootLocPath);
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
if (loc == null) {
return null; |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return null;
}
<<<<<<< HEAD
return new String(loc, StandardCharsets.UTF_8).split("\\|")[0];
=======
return new String(loc, UTF_8).split("\\|")[0];
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
return null;
}
return new String(loc, UTF_8).split("\\|")[0];
}
@Override |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array access |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
byte[] bytes = zooCache.get(instanceNamePath);
UUID iid = UUID.fromString(new String(bytes, StandardCharsets.UTF_8));
=======
UUID iid = UUID.fromString(new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (iid.equals(instanceId)) {
return name;
} |
| Solution content |
|---|
for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
byte[] bytes = zooCache.get(instanceNamePath);
UUID iid = UUID.fromString(new String(bytes, UTF_8));
if (iid.equals(instanceId)) {
return name;
} |
| File |
|---|
| ZooKeeperInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import java.util.Collections; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.Collections; import java.util.List; |
| File |
|---|
| InstanceOperationsImpl.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
List |
| Solution content |
|---|
List |
| File |
|---|
| InstanceOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.security.SecurityPermission; import java.util.LinkedList; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static java.nio.charset.StandardCharsets.UTF_8; import java.security.SecurityPermission; import java.util.LinkedList; import java.util.List; |
| File |
|---|
| Namespaces.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] path = zc.get(ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
if (path != null) {
if (nameAsKey)
<<<<<<< HEAD
namespaceMap.put(new String(path, StandardCharsets.UTF_8), id);
else
namespaceMap.put(id, new String(path, StandardCharsets.UTF_8));
=======
namespaceMap.put(new String(path, UTF_8), id);
else
namespaceMap.put(id, new String(path, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
}
return namespaceMap; |
| Solution content |
|---|
byte[] path = zc.get(ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
if (path != null) {
if (nameAsKey)
namespaceMap.put(new String(path, UTF_8), id);
else
namespaceMap.put(id, new String(path, UTF_8));
}
}
return namespaceMap; |
| File |
|---|
| Namespaces.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import org.apache.accumulo.core.Constants; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import org.apache.accumulo.core.Constants; |
| File |
|---|
| ServerClient.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
for (String tserver : zc.getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver;
byte[] data = ZooUtil.getLockData(zc, path);
<<<<<<< HEAD
if (data != null && !new String(data, StandardCharsets.UTF_8).equals("master"))
servers.add(new ThriftTransportKey(new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT), rpcTimeout, SslConnectionParams
.forClient(ClientConfigurationHelper.getClientRpcConfiguration(instance))));
=======
if (data != null && !new String(data, UTF_8).equals("master"))
servers.add(new ThriftTransportKey(
new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT),
rpcTimeout, SslConnectionParams.forClient(ServerConfigurationUtil.getConfiguration(instance))));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
boolean opened = false; |
| Solution content |
|---|
for (String tserver : zc.getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver;
byte[] data = ZooUtil.getLockData(zc, path);
if (data != null && !new String(data, UTF_8).equals("master"))
servers.add(new ThriftTransportKey(new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT), rpcTimeout, SslConnectionParams
.forClient(ClientConfigurationHelper.getClientRpcConfiguration(instance))));
}
boolean opened = false; |
| File |
|---|
| ServerClient.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.io.BufferedReader; import java.io.IOException; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.io.BufferedReader; import java.io.IOException; |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(tableName != null, "tableName is null");
checkArgument(timeType != null, "timeType is null");
<<<<<<< HEAD
List |
| Solution content |
|---|
checkArgument(tableName != null, "tableName is null");
checkArgument(timeType != null, "timeType is null");
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
<<<<<<< HEAD
List |
| Solution content |
|---|
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
<<<<<<< HEAD
List |
| Solution content |
|---|
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
<<<<<<< HEAD
List |
| Solution content |
|---|
public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (propertiesToSet == null)
propertiesToSet = Collections.emptyMap();
<<<<<<< HEAD
List |
| Solution content |
|---|
if (propertiesToSet == null)
propertiesToSet = Collections.emptyMap();
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
TableExistsException {
<<<<<<< HEAD
List |
| Solution content |
|---|
public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
TableExistsException {
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (flush)
_flush(tableId, start, end, true);
<<<<<<< HEAD
List |
| Solution content |
|---|
if (flush)
_flush(tableId, start, end, true);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
String tableId = Tables.getTableId(instance, tableName);
<<<<<<< HEAD
List |
| Solution content |
|---|
public void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
String tableId = Tables.getTableId(instance, tableName);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Path dirPath = checkPath(dir, "Bulk", "");
Path failPath = checkPath(failureDir, "Bulk", "failure");
<<<<<<< HEAD
List |
| Solution content |
|---|
Path dirPath = checkPath(dir, "Bulk", "");
Path failPath = checkPath(failureDir, "Bulk", "failure");
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(tableName != null, "tableName is null");
String tableId = Tables.getTableId(instance, tableName);
<<<<<<< HEAD
List |
| Solution content |
|---|
checkArgument(tableName != null, "tableName is null");
String tableId = Tables.getTableId(instance, tableName);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
String tableId = Tables.getTableId(instance, tableName);
<<<<<<< HEAD
List |
| Solution content |
|---|
public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
String tableId = Tables.getTableId(instance, tableName);
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
ZipEntry zipEntry;
while ((zipEntry = zis.getNextEntry()) != null) {
if (zipEntry.getName().equals(Constants.EXPORT_TABLE_CONFIG_FILE)) {
<<<<<<< HEAD
BufferedReader in = new BufferedReader(new InputStreamReader(zis, StandardCharsets.UTF_8));
=======
BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
try {
String line;
while ((line = in.readLine()) != null) { |
| Solution content |
|---|
ZipEntry zipEntry;
while ((zipEntry = zis.getNextEntry()) != null) {
if (zipEntry.getName().equals(Constants.EXPORT_TABLE_CONFIG_FILE)) {
BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
try {
String line;
while ((line = in.readLine()) != null) { |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Logger.getLogger(this.getClass()).warn("Failed to check if imported table references external java classes : " + ioe.getMessage());
}
<<<<<<< HEAD
List |
| Solution content |
|---|
Logger.getLogger(this.getClass()).warn("Failed to check if imported table references external java classes : " + ioe.getMessage());
}
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(tableName != null, "tableName is null");
checkArgument(exportDir != null, "exportDir is null");
<<<<<<< HEAD
List |
| Solution content |
|---|
checkArgument(tableName != null, "tableName is null");
checkArgument(exportDir != null, "exportDir is null");
List |
| File |
|---|
| TableOperationsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.security.SecurityPermission; import java.util.HashMap; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.security.SecurityPermission; import java.util.HashMap; import java.util.List; |
| File |
|---|
| Tables.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
if (nId == null) {
namespaceName = null;
} else {
<<<<<<< HEAD
String namespaceId = new String(nId, StandardCharsets.UTF_8);
=======
String namespaceId = new String(nId, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (!namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
try {
namespaceName = namespaceIdToNameMap.get(namespaceId); |
| Solution content |
|---|
if (nId == null) {
namespaceName = null;
} else {
String namespaceId = new String(nId, UTF_8);
if (!namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
try {
namespaceName = namespaceIdToNameMap.get(namespaceId); |
| File |
|---|
| Tables.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
if (tableName != null && namespaceName != null) {
<<<<<<< HEAD
String tableNameStr = qualified(new String(tableName, StandardCharsets.UTF_8), namespaceName);
=======
String tableNameStr = qualified(new String(tableName, UTF_8), namespaceName);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (nameAsKey)
tableMap.put(tableNameStr, tableId);
else |
| Solution content |
|---|
}
}
if (tableName != null && namespaceName != null) {
String tableNameStr = qualified(new String(tableName, UTF_8), namespaceName);
if (nameAsKey)
tableMap.put(tableNameStr, tableId);
else |
| File |
|---|
| Tables.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (state == null)
return TableState.UNKNOWN;
<<<<<<< HEAD
return TableState.valueOf(new String(state, StandardCharsets.UTF_8));
=======
return TableState.valueOf(new String(state, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public static long getCacheResetCount() { |
| Solution content |
|---|
if (state == null)
return TableState.UNKNOWN;
return TableState.valueOf(new String(state, UTF_8));
}
public static long getCacheResetCount() { |
| File |
|---|
| Tables.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
throw new IllegalArgumentException("Table with id " + tableId + " does not exist");
}
<<<<<<< HEAD
return new String(n, StandardCharsets.UTF_8);
=======
return new String(n, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
} |
| Solution content |
|---|
throw new IllegalArgumentException("Table with id " + tableId + " does not exist");
}
return new String(n, UTF_8);
}
} |
| File |
|---|
| Tables.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.impl; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; |
| File |
|---|
| Writer.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
TabletLocation tabLoc = TabletLocator.getLocator(instance, table).locateTablet(credentials, new Text(m.getRow()), false, true);
if (tabLoc == null) {
<<<<<<< HEAD
log.trace("No tablet location found for row " + new String(m.getRow(), StandardCharsets.UTF_8));
=======
log.trace("No tablet location found for row " + new String(m.getRow(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
UtilWaitThread.sleep(500);
continue;
} |
| Solution content |
|---|
TabletLocation tabLoc = TabletLocator.getLocator(instance, table).locateTablet(credentials, new Text(m.getRow()), false, true);
if (tabLoc == null) {
log.trace("No tablet location found for row " + new String(m.getRow(), UTF_8));
UtilWaitThread.sleep(500);
continue;
} |
| File |
|---|
| Writer.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.lexicoder; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f /** * This lexicoder encodes/decodes a given String to/from bytes without further processing. It can be combined with other encoders like the |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.lexicoder; import static java.nio.charset.StandardCharsets.UTF_8; /** * This lexicoder encodes/decodes a given String to/from bytes without further processing. It can be combined with other encoders like the |
| File |
|---|
| StringLexicoder.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public byte[] encode(String data) {
<<<<<<< HEAD
return data.getBytes(StandardCharsets.UTF_8);
=======
return data.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
@Override
public byte[] encode(String data) {
return data.getBytes(UTF_8);
}
@Override |
| File |
|---|
| StringLexicoder.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public String decode(byte[] data) {
<<<<<<< HEAD
return new String(data, StandardCharsets.UTF_8);
=======
return new String(data, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
} |
| Solution content |
|---|
@Override
public String decode(byte[] data) {
return new String(data, UTF_8);
}
} |
| File |
|---|
| StringLexicoder.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
protected void setPassword(CharBuffer charBuffer) {
// encode() kicks back a C-string, which is not compatible with the old passwording system
<<<<<<< HEAD
ByteBuffer bb = StandardCharsets.UTF_8.encode(charBuffer);
=======
ByteBuffer bb = UTF_8.encode(charBuffer);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
// create array using byter buffer length
this.password = new byte[bb.remaining()];
bb.get(this.password); |
| Solution content |
|---|
protected void setPassword(CharBuffer charBuffer) {
// encode() kicks back a C-string, which is not compatible with the old passwording system
ByteBuffer bb = UTF_8.encode(charBuffer);
// create array using byter buffer length
this.password = new byte[bb.remaining()];
bb.get(this.password); |
| File |
|---|
| PasswordToken.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
int n;
try {
while ((n = data.read(buffer)) > 0)
<<<<<<< HEAD
doc.print(new String(buffer, 0, n, StandardCharsets.UTF_8));
=======
doc.print(new String(buffer, 0, n, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (IOException e) {
log.debug("Encountered IOException while reading InputStream in appendResource().", e);
return; |
| Solution content |
|---|
int n;
try {
while ((n = data.read(buffer)) > 0)
doc.print(new String(buffer, 0, n, UTF_8));
} catch (IOException e) {
log.debug("Encountered IOException while reading InputStream in appendResource().", e);
return; |
| File |
|---|
| ConfigurationDocGen.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
if (args.length == 2 && args[0].equals("--generate-html")) {
<<<<<<< HEAD
new ConfigurationDocGen(new PrintStream(args[1], StandardCharsets.UTF_8.name())).generateHtml();
} else if (args.length == 2 && args[0].equals("--generate-asciidoc")) {
new ConfigurationDocGen(new PrintStream(args[1], StandardCharsets.UTF_8.name())).generateAsciidoc();
=======
new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateHtml();
} else if (args.length == 2 && args[0].equals("--generate-latex")) {
new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateLaTeX();
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-html |
| Solution content |
|---|
*/
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
if (args.length == 2 && args[0].equals("--generate-html")) {
new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateHtml();
} else if (args.length == 2 && args[0].equals("--generate-asciidoc")) {
new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateAsciidoc();
} else {
throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-html |
| File |
|---|
| ConfigurationDocGen.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
<<<<<<< HEAD
/**
* An implementation of {@link ByteSequence} that uses a backing byte array.
*/
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
public class ArrayByteSequence extends ByteSequence implements Serializable {
private static final long serialVersionUID = 1L; |
| Solution content |
|---|
import java.nio.ByteBuffer;
/**
* An implementation of {@link ByteSequence} that uses a backing byte array.
*/
public class ArrayByteSequence extends ByteSequence implements Serializable {
private static final long serialVersionUID = 1L; |
| File |
|---|
| ArrayByteSequence.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
* @param s string to represent as bytes
*/
public ArrayByteSequence(String s) {
this(s.getBytes(StandardCharsets.UTF_8));
=======
this(s.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
* @param s string to represent as bytes
*/
public ArrayByteSequence(String s) {
this(s.getBytes(UTF_8));
}
/** |
| File |
|---|
| ArrayByteSequence.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
public String toString() {
<<<<<<< HEAD
return new String(data, offset, length, StandardCharsets.UTF_8);
=======
return new String(data, offset, length, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
} |
| Solution content |
|---|
}
public String toString() {
return new String(data, offset, length, UTF_8);
}
} |
| File |
|---|
| ArrayByteSequence.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* @return string form of column
*/
public String toString() {
<<<<<<< HEAD
return new String(columnFamily == null ? new byte[0] : columnFamily, StandardCharsets.UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, StandardCharsets.UTF_8) + ":"
+ new String(columnVisibility == null ? new byte[0] : columnVisibility, StandardCharsets.UTF_8);
=======
return new String(columnFamily == null ? new byte[0] : columnFamily, UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, UTF_8) + ":"
+ new String(columnVisibility == null ? new byte[0] : columnVisibility, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
* @return string form of column
*/
public String toString() {
return new String(columnFamily == null ? new byte[0] : columnFamily, UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, UTF_8) + ":"
+ new String(columnVisibility == null ? new byte[0] : columnVisibility, UTF_8);
}
/** |
| File |
|---|
| Column.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD */ package org.apache.accumulo.core.data; import static com.google.common.base.Preconditions.checkArgument; import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Arrays; import java.util.HashSet; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.data; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Arrays; import java.util.HashSet; |
| File |
|---|
| Condition.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
* @throws IllegalArgumentException if any argument is null
*/
public Condition(CharSequence cf, CharSequence cq) {
<<<<<<< HEAD
checkArgument(cf != null, "cf is null");
checkArgument(cq != null, "cq is null");
this.cf = new ArrayByteSequence(cf.toString().getBytes(StandardCharsets.UTF_8));
this.cq = new ArrayByteSequence(cq.toString().getBytes(StandardCharsets.UTF_8));
=======
ArgumentChecker.notNull(cf, cq);
this.cf = new ArrayByteSequence(cf.toString().getBytes(UTF_8));
this.cq = new ArrayByteSequence(cq.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
this.cv = EMPTY;
}
|
| Solution content |
|---|
* @throws IllegalArgumentException if any argument is null
*/
public Condition(CharSequence cf, CharSequence cq) {
checkArgument(cf != null, "cf is null");
checkArgument(cq != null, "cq is null");
this.cf = new ArrayByteSequence(cf.toString().getBytes(UTF_8));
this.cq = new ArrayByteSequence(cq.toString().getBytes(UTF_8));
this.cv = EMPTY;
}
|
| File |
|---|
| Condition.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @throws IllegalArgumentException if value is null
*/
public Condition setValue(CharSequence value) {
<<<<<<< HEAD
checkArgument(value != null, "value is null");
this.val = new ArrayByteSequence(value.toString().getBytes(StandardCharsets.UTF_8));
=======
ArgumentChecker.notNull(value);
this.val = new ArrayByteSequence(value.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return this;
}
|
| Solution content |
|---|
* @throws IllegalArgumentException if value is null
*/
public Condition setValue(CharSequence value) {
checkArgument(value != null, "value is null");
this.val = new ArrayByteSequence(value.toString().getBytes(UTF_8));
return this;
}
|
| File |
|---|
| Condition.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import java.nio.charset.StandardCharsets; import java.util.List; <<<<<<< HEAD ======= import com.google.common.base.Preconditions; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; |
| Solution content |
|---|
import java.util.List; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; |
| File |
|---|
| Value.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public String toString() {
<<<<<<< HEAD
return new String(get(), StandardCharsets.UTF_8);
=======
return new String(get(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
@Override
public String toString() {
return new String(get(), UTF_8);
}
/** |
| File |
|---|
| Value.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
for (Integer i : vals) {
String fi = String.format("%010d", i);
<<<<<<< HEAD
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes(StandardCharsets.UTF_8)));
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(StandardCharsets.UTF_8)));
=======
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes(UTF_8)));
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
long t2 = System.currentTimeMillis(); |
| Solution content |
|---|
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)));
bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(UTF_8)));
}
long t2 = System.currentTimeMillis(); |
| File |
|---|
| BloomFilterLayer.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
this.key = new Key(currentRow.toArray(), currentColf.toArray(), new byte[0], new byte[0], ts);
<<<<<<< HEAD
this.value = new Value(Integer.toString(count).getBytes(StandardCharsets.UTF_8));
=======
this.value = new Value(Integer.toString(count).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
this.key = null; |
| Solution content |
|---|
}
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));
} else {
this.key = null; |
| File |
|---|
| ColumnFamilyCounter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static class StringEncoder implements Encoder |
| Solution content |
|---|
public static class StringEncoder implements Encoder |
| File |
|---|
| LongCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public Long decode(byte[] b) {
try {
<<<<<<< HEAD
return Long.parseLong(new String(b, StandardCharsets.UTF_8));
=======
return Long.parseLong(new String(b, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (NumberFormatException nfe) {
throw new ValueFormatException(nfe);
} |
| Solution content |
|---|
@Override
public Long decode(byte[] b) {
try {
return Long.parseLong(new String(b, UTF_8));
} catch (NumberFormatException nfe) {
throw new ValueFormatException(nfe);
} |
| File |
|---|
| LongCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.iterators.conf; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Collection; import java.util.HashSet; import java.util.Set; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.iterators.conf; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Collection; import java.util.HashSet; import java.util.Set; |
| File |
|---|
| ColumnSet.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
static Text decode(String s) {
Text t = new Text();
<<<<<<< HEAD
byte[] sb = s.getBytes(StandardCharsets.UTF_8);
=======
byte[] sb = s.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
// very inefficient code
for (int i = 0; i < sb.length; i++) { |
| Solution content |
|---|
static Text decode(String s) {
Text t = new Text();
byte[] sb = s.getBytes(UTF_8);
// very inefficient code
for (int i = 0; i < sb.length; i++) { |
| File |
|---|
| ColumnSet.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
t.append(new byte[] {sb[i]}, 0, 1);
} else {
byte hex[] = new byte[] {sb[++i], sb[++i]};
<<<<<<< HEAD
String hs = new String(hex, StandardCharsets.UTF_8);
=======
String hs = new String(hex, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
int b = Integer.parseInt(hs, 16);
t.append(new byte[] {(byte) b}, 0, 1);
} |
| Solution content |
|---|
t.append(new byte[] {sb[i]}, 0, 1);
} else {
byte hex[] = new byte[] {sb[++i], sb[++i]};
String hs = new String(hex, UTF_8);
int b = Integer.parseInt(hs, 16);
t.append(new byte[] {(byte) b}, 0, 1);
} |
| File |
|---|
| ColumnSet.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public static class BigDecimalEncoder implements org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder |
| Solution content |
|---|
public static class BigDecimalEncoder implements org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder |
| File |
|---|
| BigDecimalCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public BigDecimal decode(byte[] b) throws ValueFormatException {
try {
<<<<<<< HEAD
return new BigDecimal(new String(b, StandardCharsets.UTF_8));
=======
return new BigDecimal(new String(b, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (NumberFormatException nfe) {
throw new ValueFormatException(nfe);
} |
| Solution content |
|---|
@Override
public BigDecimal decode(byte[] b) throws ValueFormatException {
try {
return new BigDecimal(new String(b, UTF_8));
} catch (NumberFormatException nfe) {
throw new ValueFormatException(nfe);
} |
| File |
|---|
| BigDecimalCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD @Override public void init(SortedKeyValueIterator |
| Solution content |
|---|
@Override public void init(SortedKeyValueIterator |
| File |
|---|
| GrepIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
String[] columnStrings = columns.split("\n");
Text[] columnTexts = new Text[columnStrings.length];
for (int i = 0; i < columnStrings.length; i++) {
<<<<<<< HEAD
columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(StandardCharsets.UTF_8)));
=======
columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
return columnTexts;
} |
| Solution content |
|---|
String[] columnStrings = columns.split("\n");
Text[] columnTexts = new Text[columnStrings.length];
for (int i = 0; i < columnStrings.length; i++) {
columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(UTF_8)));
}
return columnTexts;
} |
| File |
|---|
| IntersectingIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array access |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (flags == null)
return null;
<<<<<<< HEAD
byte[] bytes = Base64.decodeBase64(flags.getBytes(StandardCharsets.UTF_8));
=======
byte[] bytes = Base64.decodeBase64(flags.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
boolean[] bFlags = new boolean[bytes.length];
for (int i = 0; i < bytes.length; i++) {
if (bytes[i] == 1) |
| Solution content |
|---|
if (flags == null)
return null;
byte[] bytes = Base64.decodeBase64(flags.getBytes(UTF_8));
boolean[] bFlags = new boolean[bytes.length];
for (int i = 0; i < bytes.length; i++) {
if (bytes[i] == 1) |
| File |
|---|
| IntersectingIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ public class LargeRowFilter implements SortedKeyValueIterator |
| Solution content |
|---|
*/ public class LargeRowFilter implements SortedKeyValueIterator |
| File |
|---|
| LargeRowFilter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String ENCODING = "encoding"; public static final String MATCH_SUBSTRING = "matchSubstring"; <<<<<<< HEAD public static final String ENCODING_DEFAULT = StandardCharsets.UTF_8.name(); ======= public static final String ENCODING_DEFAULT = UTF_8.name(); >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f private Matcher rowMatcher; private Matcher colfMatcher; |
| Solution content |
|---|
public static final String ENCODING = "encoding"; public static final String MATCH_SUBSTRING = "matchSubstring"; public static final String ENCODING_DEFAULT = UTF_8.name(); private Matcher rowMatcher; private Matcher colfMatcher; |
| File |
|---|
| RegExFilter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
this.encoding = options.get(ENCODING);
if ("".equals(this.encoding))
encoding = ENCODING_DEFAULT;
<<<<<<< HEAD
new String("test".getBytes(StandardCharsets.UTF_8), encoding);
=======
new String("test".getBytes(UTF_8), encoding);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
} |
| Solution content |
|---|
this.encoding = options.get(ENCODING);
if ("".equals(this.encoding))
encoding = ENCODING_DEFAULT;
new String("test".getBytes(UTF_8), encoding);
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
} |
| File |
|---|
| RegExFilter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public class RowDeletingIterator implements SortedKeyValueIterator |
| Solution content |
|---|
public class RowDeletingIterator implements SortedKeyValueIterator |
| File |
|---|
| RowDeletingIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
sb.append(",");
sb.append(Long.toString(la.get(i)));
}
<<<<<<< HEAD
return sb.toString().getBytes(StandardCharsets.UTF_8);
=======
return sb.toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
sb.append(",");
sb.append(Long.toString(la.get(i)));
}
return sb.toString().getBytes(UTF_8);
}
@Override |
| File |
|---|
| SummingArrayCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public List |
| Solution content |
|---|
@Override
public List |
| File |
|---|
| SummingArrayCombiner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (scanning) {
String auths = options.get(AUTH_OPT);
if (auths != null && !auths.isEmpty()) {
<<<<<<< HEAD
ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(StandardCharsets.UTF_8)));
=======
ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
visibleCache = new LRUMap(100);
}
} |
| Solution content |
|---|
if (scanning) {
String auths = options.get(AUTH_OPT);
if (auths != null && !auths.isEmpty()) {
ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(UTF_8)));
visibleCache = new LRUMap(100);
}
} |
| File |
|---|
| TransformingIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
for (Entry |
| Solution content |
|---|
for (Entry |
| File |
|---|
| TransformingIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (!filterInvalid) {
String auths = options.get(AUTHS);
<<<<<<< HEAD
Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(StandardCharsets.UTF_8));
=======
Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
this.ve = new VisibilityEvaluator(authObj);
this.defaultVisibility = new Text();
} |
| Solution content |
|---|
if (!filterInvalid) {
String auths = options.get(AUTHS);
Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(UTF_8));
this.ve = new VisibilityEvaluator(authObj);
this.defaultVisibility = new Text();
} |
| File |
|---|
| VisibilityFilter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/
package org.apache.accumulo.core.schema;
<<<<<<< HEAD:core/src/main/java/org/apache/accumulo/core/schema/Section.java
import org.apache.accumulo.core.data.Range;
public class Section {
private String rowPrefix;
private Range range;
public Section(String startRow, boolean startInclusive, String endRow, boolean endInclusive) {
rowPrefix = startRow;
range = new Range(startRow, startInclusive, endRow, endInclusive);
}
public String getRowPrefix() {
return rowPrefix;
}
public Range getRange() {
return range;
=======
import static com.google.common.base.Charsets.UTF_8;
import org.apache.accumulo.core.client.Instance;
public class InstanceUserPassword {
public Instance instance;
public String username;
public byte[] password;
public InstanceUserPassword(Instance instance, String username, String password) {
this.instance = instance;
this.username = username;
this.password = password.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java
}
} |
| Solution content |
|---|
*/
package org.apache.accumulo.core.schema;
import org.apache.accumulo.core.data.Range;
public class Section {
private String rowPrefix;
private Range range;
public Section(String startRow, boolean startInclusive, String endRow, boolean endInclusive) {
rowPrefix = startRow;
range = new Range(startRow, startInclusive, endRow, endInclusive);
}
public String getRowPrefix() {
return rowPrefix;
}
public Range getRange() {
return range;
}
} |
| File |
|---|
| Section.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Class signature |
| Import |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.security; <<<<<<< HEAD import static com.google.common.base.Preconditions.checkArgument; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.io.Serializable; import java.nio.ByteBuffer; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.security; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.io.Serializable; import java.nio.ByteBuffer; |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
checkArgument(authorizations != null, "authorizations is null");
<<<<<<< HEAD
String authsString = new String(authorizations, StandardCharsets.UTF_8);
=======
String authsString = new String(authorizations, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (authsString.startsWith(HEADER)) {
// it's the new format
authsString = authsString.substring(HEADER.length()); |
| Solution content |
|---|
checkArgument(authorizations != null, "authorizations is null");
String authsString = new String(authorizations, UTF_8);
if (authsString.startsWith(HEADER)) {
// it's the new format
authsString = authsString.substring(HEADER.length()); |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
authsString = authsString.substring(HEADER.length());
if (authsString.length() > 0) {
for (String encAuth : authsString.split(",")) {
<<<<<<< HEAD
byte[] auth = Base64.decodeBase64(encAuth.getBytes(StandardCharsets.UTF_8));
=======
byte[] auth = Base64.decodeBase64(encAuth.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
auths.add(new ArrayByteSequence(auth));
}
checkAuths(); |
| Solution content |
|---|
authsString = authsString.substring(HEADER.length());
if (authsString.length() > 0) {
for (String encAuth : authsString.split(",")) {
byte[] auth = Base64.decodeBase64(encAuth.getBytes(UTF_8));
auths.add(new ArrayByteSequence(auth));
}
checkAuths(); |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
auths.clear();
for (String str : authorizations) {
str = str.trim();
<<<<<<< HEAD
auths.add(new ArrayByteSequence(str.getBytes(StandardCharsets.UTF_8)));
=======
auths.add(new ArrayByteSequence(str.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
checkAuths(); |
| Solution content |
|---|
auths.clear();
for (String str : authorizations) {
str = str.trim();
auths.add(new ArrayByteSequence(str.getBytes(UTF_8)));
}
checkAuths(); |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @see #serialize()
*/
public byte[] getAuthorizationsArray() {
<<<<<<< HEAD
return serialize().getBytes(StandardCharsets.UTF_8);
=======
return serialize().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
* @see #serialize()
*/
public byte[] getAuthorizationsArray() {
return serialize().getBytes(UTF_8);
}
/** |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
for (ByteSequence auth : auths) {
sb.append(sep);
sep = ",";
<<<<<<< HEAD
sb.append(new String(auth.toArray(), StandardCharsets.UTF_8));
=======
sb.append(new String(auth.toArray(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
return sb.toString(); |
| Solution content |
|---|
for (ByteSequence auth : auths) {
sb.append(sep);
sep = ",";
sb.append(new String(auth.toArray(), UTF_8));
}
return sb.toString(); |
| File |
|---|
| Authorizations.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public static void stringify(Node root, byte[] expression, StringBuilder out) {
if (root.type == NodeType.TERM) {
<<<<<<< HEAD
out.append(new String(expression, root.start, root.end - root.start, StandardCharsets.UTF_8));
=======
out.append(new String(expression, root.start, root.end - root.start, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
String sep = "";
for (Node c : root.children) { |
| Solution content |
|---|
*/
public static void stringify(Node root, byte[] expression, StringBuilder out) {
if (root.type == NodeType.TERM) {
out.append(new String(expression, root.start, root.end - root.start, UTF_8));
} else {
String sep = "";
for (Node c : root.children) { |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
Node normRoot = normalize(node, expression);
StringBuilder builder = new StringBuilder(expression.length);
stringify(normRoot, expression, builder);
<<<<<<< HEAD
return builder.toString().getBytes(StandardCharsets.UTF_8);
=======
return builder.toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private static class ColumnVisibilityParser { |
| Solution content |
|---|
Node normRoot = normalize(node, expression);
StringBuilder builder = new StringBuilder(expression.length);
stringify(normRoot, expression, builder);
return builder.toString().getBytes(UTF_8);
}
private static class ColumnVisibilityParser { |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (expression.length > 0) {
Node node = parse_(expression);
if (node == null) {
<<<<<<< HEAD
throw new BadArgumentException("operator or missing parens", new String(expression, StandardCharsets.UTF_8), index - 1);
}
if (parens != 0) {
throw new BadArgumentException("parenthesis mis-match", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("operator or missing parens", new String(expression, UTF_8), index - 1);
}
if (parens != 0) {
throw new BadArgumentException("parenthesis mis-match", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
return node;
} |
| Solution content |
|---|
if (expression.length > 0) {
Node node = parse_(expression);
if (node == null) {
throw new BadArgumentException("operator or missing parens", new String(expression, UTF_8), index - 1);
}
if (parens != 0) {
throw new BadArgumentException("parenthesis mis-match", new String(expression, UTF_8), index - 1);
}
return node;
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
Node processTerm(int start, int end, Node expr, byte[] expression) {
if (start != end) {
if (expr != null)
<<<<<<< HEAD
throw new BadArgumentException("expression needs | or &", new String(expression, StandardCharsets.UTF_8), start);
return new Node(start, end);
}
if (expr == null)
throw new BadArgumentException("empty term", new String(expression, StandardCharsets.UTF_8), start);
=======
throw new BadArgumentException("expression needs | or &", new String(expression, UTF_8), start);
return new Node(start, end);
}
if (expr == null)
throw new BadArgumentException("empty term", new String(expression, UTF_8), start);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return expr;
}
|
| Solution content |
|---|
Node processTerm(int start, int end, Node expr, byte[] expression) {
if (start != end) {
if (expr != null)
throw new BadArgumentException("expression needs | or &", new String(expression, UTF_8), start);
return new Node(start, end);
}
if (expr == null)
throw new BadArgumentException("empty term", new String(expression, UTF_8), start);
return expr;
}
|
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
expr = processTerm(subtermStart, index - 1, expr, expression);
if (result != null) {
if (!result.type.equals(NodeType.AND))
<<<<<<< HEAD
throw new BadArgumentException("cannot mix & and |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("cannot mix & and |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
result = new Node(NodeType.AND, wholeTermStart);
} |
| Solution content |
|---|
expr = processTerm(subtermStart, index - 1, expr, expression);
if (result != null) {
if (!result.type.equals(NodeType.AND))
throw new BadArgumentException("cannot mix & and |", new String(expression, UTF_8), index - 1);
} else {
result = new Node(NodeType.AND, wholeTermStart);
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
expr = processTerm(subtermStart, index - 1, expr, expression);
if (result != null) {
if (!result.type.equals(NodeType.OR))
<<<<<<< HEAD
throw new BadArgumentException("cannot mix | and &", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("cannot mix | and &", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
result = new Node(NodeType.OR, wholeTermStart);
} |
| Solution content |
|---|
expr = processTerm(subtermStart, index - 1, expr, expression);
if (result != null) {
if (!result.type.equals(NodeType.OR))
throw new BadArgumentException("cannot mix | and &", new String(expression, UTF_8), index - 1);
} else {
result = new Node(NodeType.OR, wholeTermStart);
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
case '(': {
parens++;
if (subtermStart != index - 1 || expr != null)
<<<<<<< HEAD
throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
expr = parse_(expression);
subtermStart = index;
subtermComplete = false; |
| Solution content |
|---|
case '(': {
parens++;
if (subtermStart != index - 1 || expr != null)
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
expr = parse_(expression);
subtermStart = index;
subtermComplete = false; |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
parens--;
Node child = processTerm(subtermStart, index - 1, expr, expression);
if (child == null && result == null)
<<<<<<< HEAD
throw new BadArgumentException("empty expression not allowed", new String(expression, StandardCharsets.UTF_8), index);
=======
throw new BadArgumentException("empty expression not allowed", new String(expression, UTF_8), index);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (result == null)
return child;
if (result.type == child.type) |
| Solution content |
|---|
parens--;
Node child = processTerm(subtermStart, index - 1, expr, expression);
if (child == null && result == null)
throw new BadArgumentException("empty expression not allowed", new String(expression, UTF_8), index);
if (result == null)
return child;
if (result.type == child.type) |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
case '"': {
if (subtermStart != index - 1)
<<<<<<< HEAD
throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
while (index < expression.length && expression[index] != '"') {
if (expression[index] == '\\') { |
| Solution content |
|---|
}
case '"': {
if (subtermStart != index - 1)
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
while (index < expression.length && expression[index] != '"') {
if (expression[index] == '\\') { |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (expression[index] == '\\') {
index++;
if (expression[index] != '\\' && expression[index] != '"')
<<<<<<< HEAD
throw new BadArgumentException("invalid escaping within quotes", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("invalid escaping within quotes", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
index++;
} |
| Solution content |
|---|
if (expression[index] == '\\') {
index++;
if (expression[index] != '\\' && expression[index] != '"')
throw new BadArgumentException("invalid escaping within quotes", new String(expression, UTF_8), index - 1);
}
index++;
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
if (index == expression.length)
<<<<<<< HEAD
throw new BadArgumentException("unclosed quote", new String(expression, StandardCharsets.UTF_8), subtermStart);
if (subtermStart + 1 == index)
throw new BadArgumentException("empty term", new String(expression, StandardCharsets.UTF_8), subtermStart);
=======
throw new BadArgumentException("unclosed quote", new String(expression, UTF_8), subtermStart);
if (subtermStart + 1 == index)
throw new BadArgumentException("empty term", new String(expression, UTF_8), subtermStart);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
index++;
|
| Solution content |
|---|
}
if (index == expression.length)
throw new BadArgumentException("unclosed quote", new String(expression, UTF_8), subtermStart);
if (subtermStart + 1 == index)
throw new BadArgumentException("empty term", new String(expression, UTF_8), subtermStart);
index++;
|
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
default: {
}
if (subtermComplete)
<<<<<<< HEAD
throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
byte c = expression[index - 1];
if (!Authorizations.isValidAuthChar(c))
throw new BadArgumentException("bad character (" + c + ")", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
byte c = expression[index - 1];
if (!Authorizations.isValidAuthChar(c))
throw new BadArgumentException("bad character (" + c + ")", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
}
} |
| Solution content |
|---|
}
default: {
if (subtermComplete)
throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
byte c = expression[index - 1];
if (!Authorizations.isValidAuthChar(c))
throw new BadArgumentException("bad character (" + c + ")", new String(expression, UTF_8), index - 1);
}
}
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array access |
| If statement |
| Throw statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
result = child;
if (result.type != NodeType.TERM)
if (result.children.size() < 2)
<<<<<<< HEAD
throw new BadArgumentException("missing term", new String(expression, StandardCharsets.UTF_8), index);
=======
throw new BadArgumentException("missing term", new String(expression, UTF_8), index);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return result;
}
} |
| Solution content |
|---|
result = child;
if (result.type != NodeType.TERM)
if (result.children.size() < 2)
throw new BadArgumentException("missing term", new String(expression, UTF_8), index);
return result;
}
} |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
* An expression of the rights needed to see this mutation. The expression syntax is defined at the class-level documentation
*/
public ColumnVisibility(String expression) {
<<<<<<< HEAD
this(expression.getBytes(StandardCharsets.UTF_8));
=======
this(expression.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
* An expression of the rights needed to see this mutation. The expression syntax is defined at the class-level documentation
*/
public ColumnVisibility(String expression) {
this(expression.getBytes(UTF_8));
}
/** |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public String toString() {
<<<<<<< HEAD
return "[" + new String(expression, StandardCharsets.UTF_8) + "]";
=======
return "[" + new String(expression, UTF_8) + "]";
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
@Override
public String toString() {
return "[" + new String(expression, UTF_8) + "]";
}
/** |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* @return quoted term (unquoted if unnecessary)
*/
public static String quote(String term) {
<<<<<<< HEAD
return new String(quote(term.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8);
=======
return new String(quote(term.getBytes(UTF_8)), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
/** |
| Solution content |
|---|
* @return quoted term (unquoted if unnecessary)
*/
public static String quote(String term) {
return new String(quote(term.getBytes(UTF_8)), UTF_8);
}
/** |
| File |
|---|
| ColumnVisibility.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* @return serialized form of these credentials
*/
public final String serialize() {
<<<<<<< HEAD
return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(StandardCharsets.UTF_8))) + ":"
+ (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(StandardCharsets.UTF_8))) + ":"
=======
return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8))) + ":"
+ (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8))) + ":"
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
+ (getToken() == null ? "-" : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
}
|
| Solution content |
|---|
* @return serialized form of these credentials
*/
public final String serialize() {
return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8))) + ":"
+ (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8))) + ":"
+ (getToken() == null ? "-" : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
}
|
| File |
|---|
| Credentials.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public static final Credentials deserialize(String serializedForm) {
String[] split = serializedForm.split(":", 3);
<<<<<<< HEAD
String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), StandardCharsets.UTF_8);
String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), StandardCharsets.UTF_8);
=======
String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), UTF_8);
String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
AuthenticationToken token = null;
if (!split[2].equals("-")) {
byte[] tokenBytes = Base64.decodeBase64(split[2]); |
| Solution content |
|---|
*/
public static final Credentials deserialize(String serializedForm) {
String[] split = serializedForm.split(":", 3);
String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), UTF_8);
String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), UTF_8);
AuthenticationToken token = null;
if (!split[2].equals("-")) {
byte[] tokenBytes = Base64.decodeBase64(split[2]); |
| File |
|---|
| Credentials.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.security; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Collections; import java.util.HashSet; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.security; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Collections; import java.util.HashSet; import java.util.List; |
| File |
|---|
| VisibilityConstraint.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] cv = update.getColumnVisibility();
if (cv.length > 0) {
String key = null;
<<<<<<< HEAD
if (ok != null && ok.contains(key = new String(cv, StandardCharsets.UTF_8)))
=======
if (ok != null && ok.contains(key = new String(cv, UTF_8)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
continue;
try { |
| Solution content |
|---|
byte[] cv = update.getColumnVisibility();
if (cv.length > 0) {
String key = null;
if (ok != null && ok.contains(key = new String(cv, UTF_8)))
continue;
try { |
| File |
|---|
| VisibilityConstraint.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.security; <<<<<<< HEAD import java.nio.charset.StandardCharsets; import java.text.ParseException; ======= import static com.google.common.base.Charsets.UTF_8; import java.text.ParseException; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f /** * An exception thrown when a visibility string cannot be parsed. */ |
| Solution content |
|---|
*/ package org.apache.accumulo.core.security; import static java.nio.charset.StandardCharsets.UTF_8; import java.text.ParseException; /** * An exception thrown when a visibility string cannot be parsed. */ |
| File |
|---|
| VisibilityParseException.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public VisibilityParseException(String reason, byte[] visibility, int errorOffset) {
super(reason, errorOffset);
<<<<<<< HEAD
this.visibility = new String(visibility, StandardCharsets.UTF_8);
=======
this.visibility = new String(visibility, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
*/
public VisibilityParseException(String reason, byte[] visibility, int errorOffset) {
super(reason, errorOffset);
this.visibility = new String(visibility, UTF_8);
}
@Override |
| File |
|---|
| VisibilityParseException.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
List |
| Solution content |
|---|
List |
| File |
|---|
| ZooTraceClient.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.util; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; |
| File |
|---|
| ByteArraySet.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public static ByteArraySet fromStrings(Collection |
| Solution content |
|---|
public static ByteArraySet fromStrings(Collection |
| File |
|---|
| ByteArraySet.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
public static String toString(ByteBuffer bytes) {
<<<<<<< HEAD
return new String(bytes.array(), bytes.position(), bytes.remaining(), StandardCharsets.UTF_8);
=======
return new String(bytes.array(), bytes.position(), bytes.remaining(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public static ByteBuffer toByteBuffers(ByteSequence bs) { |
| Solution content |
|---|
}
public static String toString(ByteBuffer bytes) {
return new String(bytes.array(), bytes.position(), bytes.remaining(), UTF_8);
}
public static ByteBuffer toByteBuffers(ByteSequence bs) { |
| File |
|---|
| ByteBufferUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (!tf.exists()) {
tf.createNewFile();
}
<<<<<<< HEAD
PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, StandardCharsets.UTF_8.name());
=======
PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
String outString = principal + ":" + opts.tokenClassName + ":" + tokenBase64;
out.println(outString);
out.close(); |
| Solution content |
|---|
if (!tf.exists()) {
tf.createNewFile();
}
PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, UTF_8.name());
String outString = principal + ":" + opts.tokenClassName + ":" + tokenBase64;
out.println(outString);
out.close(); |
| File |
|---|
| CreateToken.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import org.apache.accumulo.core.util.Base64; import org.apache.hadoop.io.Text; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.util; import static java.nio.charset.StandardCharsets.UTF_8; import org.apache.accumulo.core.util.Base64; import org.apache.hadoop.io.Text; |
| File |
|---|
| Encoding.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
while (node.length() % 4 != 0)
node += "=";
/* decode transparently handles URLSafe encodings */
<<<<<<< HEAD
return Base64.decodeBase64(node.getBytes(StandardCharsets.UTF_8));
=======
return Base64.decodeBase64(node.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
} |
| Solution content |
|---|
while (node.length() % 4 != 0)
node += "=";
/* decode transparently handles URLSafe encodings */
return Base64.decodeBase64(node.getBytes(UTF_8));
}
} |
| File |
|---|
| Encoding.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
package org.apache.accumulo.core.util;
<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
public class FastFormat {
// this 7 to 8 times faster than String.format("%s%06d",prefix, num) |
| Solution content |
|---|
*/
package org.apache.accumulo.core.util;
import static java.nio.charset.StandardCharsets.UTF_8;
public class FastFormat {
// this 7 to 8 times faster than String.format("%s%06d",prefix, num) |
| File |
|---|
| FastFormat.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public static byte[] toZeroPaddedString(long num, int width, int radix, byte[] prefix) {
byte ret[] = new byte[width + prefix.length];
if (toZeroPaddedString(ret, 0, num, width, radix, prefix) != ret.length)
<<<<<<< HEAD
throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, StandardCharsets.UTF_8));
=======
throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return ret;
}
|
| Solution content |
|---|
public static byte[] toZeroPaddedString(long num, int width, int radix, byte[] prefix) {
byte ret[] = new byte[width + prefix.length];
if (toZeroPaddedString(ret, 0, num, width, radix, prefix) != ret.length)
throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, UTF_8));
return ret;
}
|
| File |
|---|
| FastFormat.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import java.util.Iterator; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.util; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.Iterator; import java.util.List; |
| File |
|---|
| Merge.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
Entry |
| Solution content |
|---|
Entry |
| File |
|---|
| Merge.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.Instance; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.util; import static java.nio.charset.StandardCharsets.UTF_8; import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.Instance; |
| File |
|---|
| MonitorUtil.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public static String getLocation(Instance instance) throws KeeperException, InterruptedException {
ZooReader zr = new ZooReader(instance.getZooKeepers(), 5000);
byte[] loc = zr.getData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, null);
<<<<<<< HEAD
return loc==null ? null : new String(loc, StandardCharsets.UTF_8);
=======
return loc==null ? null : new String(loc, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
} |
| Solution content |
|---|
public static String getLocation(Instance instance) throws KeeperException, InterruptedException {
ZooReader zr = new ZooReader(instance.getZooKeepers(), 5000);
byte[] loc = zr.getData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, null);
return loc==null ? null : new String(loc, UTF_8);
}
} |
| File |
|---|
| MonitorUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Text newText = new Text();
newText.append(text.getBytes(), 0, maxLen);
String suffix = "... TRUNCATED";
<<<<<<< HEAD
newText.append(suffix.getBytes(StandardCharsets.UTF_8), 0, suffix.length());
=======
newText.append(suffix.getBytes(UTF_8), 0, suffix.length());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return newText;
}
|
| Solution content |
|---|
Text newText = new Text();
newText.append(text.getBytes(), 0, maxLen);
String suffix = "... TRUNCATED";
newText.append(suffix.getBytes(UTF_8), 0, suffix.length());
return newText;
}
|
| File |
|---|
| TextUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
bwConfig = new BatchWriterConfig();
bwConfig.setMaxWriteThreads(42);
bytes = createBytes(bwConfig);
<<<<<<< HEAD
assertEquals(" i#maxWriteThreads=42", new String(bytes, StandardCharsets.UTF_8));
=======
assertEquals(" i#maxWriteThreads=42", new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
checkBytes(bwConfig, bytes);
// test human-readable with 2 fields |
| Solution content |
|---|
bwConfig = new BatchWriterConfig();
bwConfig.setMaxWriteThreads(42);
bytes = createBytes(bwConfig);
assertEquals(" i#maxWriteThreads=42", new String(bytes, UTF_8));
checkBytes(bwConfig, bytes);
// test human-readable with 2 fields |
| File |
|---|
| BatchWriterConfigTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
bwConfig.setMaxWriteThreads(24);
bwConfig.setTimeout(3, TimeUnit.SECONDS);
bytes = createBytes(bwConfig);
<<<<<<< HEAD
assertEquals(" v#maxWriteThreads=24,timeout=3000", new String(bytes, StandardCharsets.UTF_8));
=======
assertEquals(" v#maxWriteThreads=24,timeout=3000", new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
checkBytes(bwConfig, bytes);
// test human-readable durability |
| Solution content |
|---|
bwConfig.setMaxWriteThreads(24);
bwConfig.setTimeout(3, TimeUnit.SECONDS);
bytes = createBytes(bwConfig);
assertEquals(" v#maxWriteThreads=24,timeout=3000", new String(bytes, UTF_8));
checkBytes(bwConfig, bytes);
// test human-readable durability |
| File |
|---|
| BatchWriterConfigTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testGetInstanceID_FromCache() {
<<<<<<< HEAD
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes());
replay(zc);
assertEquals(IID_STRING, zki.getInstanceID()); |
| Solution content |
|---|
@Test
public void testGetInstanceID_FromCache() {
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes());
replay(zc);
assertEquals(IID_STRING, zki.getInstanceID()); |
| File |
|---|
| ZooKeeperInstanceTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test(expected = RuntimeException.class)
public void testGetInstanceID_IDMissingForName() {
<<<<<<< HEAD
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn(null);
replay(zc);
zki.getInstanceID(); |
| Solution content |
|---|
@Test(expected = RuntimeException.class)
public void testGetInstanceID_IDMissingForName() {
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn(null);
replay(zc);
zki.getInstanceID(); |
| File |
|---|
| ZooKeeperInstanceTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
children.add("child1");
children.add("child2");
expect(zc.getChildren(Constants.ZROOT + Constants.ZINSTANCES)).andReturn(children);
<<<<<<< HEAD
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(UTF_8));
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
replay(zc);
assertEquals("child2", zki.getInstanceName());
} |
| Solution content |
|---|
children.add("child1");
children.add("child2");
expect(zc.getChildren(Constants.ZROOT + Constants.ZINSTANCES)).andReturn(children);
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(UTF_8));
expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(UTF_8));
replay(zc);
assertEquals("child2", zki.getInstanceName());
} |
| File |
|---|
| ZooKeeperInstanceTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
Mutation m = new Mutation("r");
<<<<<<< HEAD
m.put("a", "b", new Value("abcde".getBytes(StandardCharsets.UTF_8)));
=======
m.put("a", "b", new Value("abcde".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
bw.addMutation(m);
bw.flush();
|
| Solution content |
|---|
BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
Mutation m = new Mutation("r");
m.put("a", "b", new Value("abcde".getBytes(UTF_8)));
bw.addMutation(m);
bw.flush();
|
| File |
|---|
| MockNamespacesTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
}
CredentialProviderToken token = new CredentialProviderToken("root.password", keystorePath);
<<<<<<< HEAD
Assert.assertArrayEquals("password".getBytes(StandardCharsets.UTF_8), token.getPassword());
token = new CredentialProviderToken("bob.password", keystorePath);
Assert.assertArrayEquals("bob".getBytes(StandardCharsets.UTF_8), token.getPassword());
=======
Assert.assertArrayEquals("password".getBytes(UTF_8), token.getPassword());
token = new CredentialProviderToken("bob.password", keystorePath);
Assert.assertArrayEquals("bob".getBytes(UTF_8), token.getPassword());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} |
| Solution content |
|---|
}
CredentialProviderToken token = new CredentialProviderToken("root.password", keystorePath);
Assert.assertArrayEquals("password".getBytes(UTF_8), token.getPassword());
token = new CredentialProviderToken("bob.password", keystorePath);
Assert.assertArrayEquals("bob".getBytes(UTF_8), token.getPassword());
}
@Test |
| File |
|---|
| CredentialProviderTokenTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.security.tokens; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import javax.security.auth.DestroyFailedException; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.security.tokens; import static java.nio.charset.StandardCharsets.UTF_8; import javax.security.auth.DestroyFailedException; |
| File |
|---|
| PasswordTokenTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
props.put("password", "五六");
pt.init(props);
props.destroy();
<<<<<<< HEAD
String s = new String(pt.getPassword(), StandardCharsets.UTF_8);
Assert.assertEquals("五六", s);
pt = new PasswordToken("五六");
s = new String(pt.getPassword(), StandardCharsets.UTF_8);
=======
String s = new String(pt.getPassword(), UTF_8);
Assert.assertEquals("五六", s);
pt = new PasswordToken("五六");
s = new String(pt.getPassword(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
Assert.assertEquals("五六", s);
}
} |
| Solution content |
|---|
props.put("password", "五六");
pt.init(props);
props.destroy();
String s = new String(pt.getPassword(), UTF_8);
Assert.assertEquals("五六", s);
pt = new PasswordToken("五六");
s = new String(pt.getPassword(), UTF_8);
Assert.assertEquals("五六", s);
}
} |
| File |
|---|
| PasswordTokenTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.security.ColumnVisibility; import org.apache.hadoop.io.Text; |
| Solution content |
|---|
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.security.ColumnVisibility; import org.apache.hadoop.io.Text; |
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
if (bs == null) {
return null;
}
<<<<<<< HEAD
return new String(bs.toArray(), StandardCharsets.UTF_8);
=======
return new String(bs.toArray(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private Condition c; |
| Solution content |
|---|
if (bs == null) {
return null;
}
return new String(bs.toArray(), UTF_8);
}
private Condition c; |
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testConstruction_ByteArray() {
<<<<<<< HEAD
c = new Condition(FAMILY.getBytes(StandardCharsets.UTF_8), QUALIFIER.getBytes(StandardCharsets.UTF_8));
=======
c = new Condition(FAMILY.getBytes(UTF_8), QUALIFIER.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(FAMILY, toString(c.getFamily()));
assertEquals(QUALIFIER, toString(c.getQualifier()));
assertEquals(EMPTY, c.getVisibility()); |
| Solution content |
|---|
@Test
public void testConstruction_ByteArray() {
c = new Condition(FAMILY.getBytes(UTF_8), QUALIFIER.getBytes(UTF_8));
assertEquals(FAMILY, toString(c.getFamily()));
assertEquals(QUALIFIER, toString(c.getQualifier()));
assertEquals(EMPTY, c.getVisibility()); |
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testConstruction_ByteSequence() {
<<<<<<< HEAD
c = new Condition(new ArrayByteSequence(FAMILY.getBytes(StandardCharsets.UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(StandardCharsets.UTF_8)));
=======
c = new Condition(new ArrayByteSequence(FAMILY.getBytes(UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(FAMILY, toString(c.getFamily()));
assertEquals(QUALIFIER, toString(c.getQualifier()));
assertEquals(EMPTY, c.getVisibility()); |
| Solution content |
|---|
@Test
public void testConstruction_ByteSequence() {
c = new Condition(new ArrayByteSequence(FAMILY.getBytes(UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(UTF_8)));
assertEquals(FAMILY, toString(c.getFamily()));
assertEquals(QUALIFIER, toString(c.getQualifier()));
assertEquals(EMPTY, c.getVisibility()); |
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testSetValue_ByteArray() {
<<<<<<< HEAD
c.setValue(VALUE.getBytes(StandardCharsets.UTF_8));
=======
c.setValue(VALUE.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(VALUE, toString(c.getValue()));
}
|
| Solution content |
|---|
@Test
public void testSetValue_ByteArray() {
c.setValue(VALUE.getBytes(UTF_8));
assertEquals(VALUE, toString(c.getValue()));
}
|
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testSetValue_ByteSequence() {
<<<<<<< HEAD
c.setValue(new ArrayByteSequence(VALUE.getBytes(StandardCharsets.UTF_8)));
=======
c.setValue(new ArrayByteSequence(VALUE.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(VALUE, toString(c.getValue()));
}
|
| Solution content |
|---|
@Test
public void testSetValue_ByteSequence() {
c.setValue(new ArrayByteSequence(VALUE.getBytes(UTF_8)));
assertEquals(VALUE, toString(c.getValue()));
}
|
| File |
|---|
| ConditionTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import org.junit.Test;
public class ConditionalMutationTest {
<<<<<<< HEAD
private static final byte[] ROW = "row".getBytes(StandardCharsets.UTF_8);
=======
private static final byte[] ROW = "row".getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
private static final String FAMILY = "family";
private static final String QUALIFIER = "qualifier";
private static final String QUALIFIER2 = "qualifier2"; |
| Solution content |
|---|
import org.junit.Test;
public class ConditionalMutationTest {
private static final byte[] ROW = "row".getBytes(UTF_8);
private static final String FAMILY = "family";
private static final String QUALIFIER = "qualifier";
private static final String QUALIFIER2 = "qualifier2"; |
| File |
|---|
| ConditionalMutationTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testConstruction_ByteArray_StartAndLength() {
cm = new ConditionalMutation(ROW, 1, 1, c1, c2);
<<<<<<< HEAD
assertArrayEquals("o".getBytes(StandardCharsets.UTF_8), cm.getRow());
=======
assertArrayEquals("o".getBytes(UTF_8), cm.getRow());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
List |
| Solution content |
|---|
@Test
public void testConstruction_ByteArray_StartAndLength() {
cm = new ConditionalMutation(ROW, 1, 1, c1, c2);
assertArrayEquals("o".getBytes(UTF_8), cm.getRow());
List |
| File |
|---|
| ConditionalMutationTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testConstruction_CharSequence() {
<<<<<<< HEAD
cm = new ConditionalMutation(new String(ROW, StandardCharsets.UTF_8), c1, c2);
=======
cm = new ConditionalMutation(new String(ROW, UTF_8), c1, c2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertArrayEquals(ROW, cm.getRow());
List |
| Solution content |
|---|
@Test
public void testConstruction_CharSequence() {
cm = new ConditionalMutation(new String(ROW, UTF_8), c1, c2);
assertArrayEquals(ROW, cm.getRow());
List |
| File |
|---|
| ConditionalMutationTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
assertTrue(cm.equals(cm2));
assertTrue(cm2.equals(cm));
<<<<<<< HEAD
ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(StandardCharsets.UTF_8), c1, c2);
=======
ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(UTF_8), c1, c2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertFalse(cm.equals(cm3));
cm3 = new ConditionalMutation(ROW, c2, c1);
assertFalse(cm.getConditions().equals(cm3.getConditions())); |
| Solution content |
|---|
assertTrue(cm.equals(cm2));
assertTrue(cm2.equals(cm));
ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(UTF_8), c1, c2);
assertFalse(cm.equals(cm3));
cm3 = new ConditionalMutation(ROW, c2, c1);
assertFalse(cm.getConditions().equals(cm3.getConditions())); |
| File |
|---|
| ConditionalMutationTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
String multiByteRegex = new String(".*" + "\u6F68" + ".*");
Key k4 = new Key("boo4".getBytes(), "hoo".getBytes(), "20080203".getBytes(), "".getBytes(), 1l);
<<<<<<< HEAD
Value inVal = new Value(multiByteText.getBytes(StandardCharsets.UTF_8));
=======
Value inVal = new Value(multiByteText.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
tm.put(k4, inVal);
is.clearOptions(); |
| Solution content |
|---|
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));
tm.put(k4, inVal);
is.clearOptions(); |
| File |
|---|
| RegExFilterTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
assertTrue(rei.hasTop());
Value outValue = rei.getTopValue();
<<<<<<< HEAD
String outVal = new String(outValue.get(), StandardCharsets.UTF_8);
=======
String outVal = new String(outValue.get(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertTrue(outVal.equals(multiByteText));
} |
| Solution content |
|---|
assertTrue(rei.hasTop());
Value outValue = rei.getTopValue();
String outVal = new String(outValue.get(), UTF_8);
assertTrue(outVal.equals(multiByteText));
} |
| File |
|---|
| RegExFilterTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testParseTreesOrdering() {
<<<<<<< HEAD
byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(StandardCharsets.UTF_8);
byte[] flattened = new ColumnVisibility(expression).flatten();
// Convert to String for indexOf convenience
String flat = new String(flattened, StandardCharsets.UTF_8);
=======
byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(UTF_8);
byte[] flattened = new ColumnVisibility(expression).flatten();
// Convert to String for indexOf convenience
String flat = new String(flattened, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertTrue("shortest expressions sort first", flat.indexOf('e') < flat.indexOf('|'));
assertTrue("shortest children sort first", flat.indexOf('b') < flat.indexOf('a'));
} |
| Solution content |
|---|
@Test
public void testParseTreesOrdering() {
byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(UTF_8);
byte[] flattened = new ColumnVisibility(expression).flatten();
// Convert to String for indexOf convenience
String flat = new String(flattened, UTF_8);
assertTrue("shortest expressions sort first", flat.indexOf('e') < flat.indexOf('|'));
assertTrue("shortest children sort first", flat.indexOf('b') < flat.indexOf('a'));
} |
| File |
|---|
| ColumnVisibilityTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
assertEquals(abcNullCreds, abcNullCreds);
assertEquals(new Credentials("abc", new NullToken()), abcNullCreds);
// equal, but different token constructors
<<<<<<< HEAD
assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(StandardCharsets.UTF_8))), new Credentials("abc", new PasswordToken("abc")));
=======
assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(UTF_8))), new Credentials("abc", new PasswordToken("abc")));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
// test not equals
assertFalse(nullNullCreds.equals(abcBlahCreds));
assertFalse(nullNullCreds.equals(abcNullCreds)); |
| Solution content |
|---|
assertEquals(abcNullCreds, abcNullCreds);
assertEquals(new Credentials("abc", new NullToken()), abcNullCreds);
// equal, but different token constructors
assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(UTF_8))), new Credentials("abc", new PasswordToken("abc")));
// test not equals
assertFalse(nullNullCreds.equals(abcBlahCreds));
assertFalse(nullNullCreds.equals(abcNullCreds)); |
| File |
|---|
| CredentialsTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testCredentialsSerialization() throws AccumuloSecurityException {
<<<<<<< HEAD
Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(StandardCharsets.UTF_8)));
=======
Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
String serialized = creds.serialize();
Credentials result = Credentials.deserialize(serialized);
assertEquals(creds, result); |
| Solution content |
|---|
@Test
public void testCredentialsSerialization() throws AccumuloSecurityException {
Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(UTF_8)));
String serialized = creds.serialize();
Credentials result = Credentials.deserialize(serialized);
assertEquals(creds, result); |
| File |
|---|
| CredentialsTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
vc = new VisibilityConstraint();
mutation = new Mutation("r");
<<<<<<< HEAD
ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(StandardCharsets.UTF_8));
=======
ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
AuthorizationContainer ac = createNiceMock(AuthorizationContainer.class);
expect(ac.contains(bs)).andReturn(true); |
| Solution content |
|---|
vc = new VisibilityConstraint();
mutation = new Mutation("r");
ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(UTF_8));
AuthorizationContainer ac = createNiceMock(AuthorizationContainer.class);
expect(ac.contains(bs)).andReturn(true); |
| File |
|---|
| VisibilityConstraintTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
BlockedOutputStream blockOut = new BlockedOutputStream(baos, blockSize, 1);
String contentString = "My Blocked Content String";
<<<<<<< HEAD
byte[] content = contentString.getBytes(StandardCharsets.UTF_8);
=======
byte[] content = contentString.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
blockOut.write(content);
blockOut.flush();
|
| Solution content |
|---|
BlockedOutputStream blockOut = new BlockedOutputStream(baos, blockSize, 1);
String contentString = "My Blocked Content String";
byte[] content = contentString.getBytes(UTF_8);
blockOut.write(content);
blockOut.flush();
|
| File |
|---|
| BlockedIOStreamTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
blockOut.flush();
String contentString2 = "My Other Blocked Content String";
<<<<<<< HEAD
byte[] content2 = contentString2.getBytes(StandardCharsets.UTF_8);
=======
byte[] content2 = contentString2.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
blockOut.write(content2);
blockOut.flush();
|
| Solution content |
|---|
blockOut.flush();
String contentString2 = "My Other Blocked Content String";
byte[] content2 = contentString2.getBytes(UTF_8);
blockOut.write(content2);
blockOut.flush();
|
| File |
|---|
| BlockedIOStreamTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
DataInputStream dIn = new DataInputStream(blockIn);
dIn.readFully(content, 0, content.length);
<<<<<<< HEAD
String readContentString = new String(content, StandardCharsets.UTF_8);
=======
String readContentString = new String(content, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(contentString, readContentString);
|
| Solution content |
|---|
DataInputStream dIn = new DataInputStream(blockIn);
dIn.readFully(content, 0, content.length);
String readContentString = new String(content, UTF_8);
assertEquals(contentString, readContentString);
|
| File |
|---|
| BlockedIOStreamTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
assertEquals(contentString, readContentString);
dIn.readFully(content2, 0, content2.length);
<<<<<<< HEAD
String readContentString2 = new String(content2, StandardCharsets.UTF_8);
=======
String readContentString2 = new String(content2, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
assertEquals(contentString2, readContentString2);
|
| Solution content |
|---|
assertEquals(contentString, readContentString);
dIn.readFully(content2, 0, content2.length);
String readContentString2 = new String(content2, UTF_8);
assertEquals(contentString2, readContentString2);
|
| File |
|---|
| BlockedIOStreamTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
public void testAggregate() {
<<<<<<< HEAD
data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(StandardCharsets.UTF_8)));
=======
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)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
formatter.initialize(data.entrySet(), false);
|
| Solution content |
|---|
@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)));
formatter.initialize(data.entrySet(), false);
|
| File |
|---|
| ShardedTableDistributionFormatterTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* A utility to administer FATE operations */ public class AdminUtil |
| Solution content |
|---|
* A utility to administer FATE operations */ public class AdminUtil |
| File |
|---|
| AdminUtil.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import org.apache.zookeeper.data.Stat;
public class ZooLock implements Watcher {
<<<<<<< HEAD
private static final Charset UTF8 = Charset.forName("UTF-8");
private static final Logger log = Logger.getLogger(ZooLock.class);
=======
protected static final Logger log = Logger.getLogger(ZooLock.class);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
public static final String LOCK_PREFIX = "zlock-";
|
| Solution content |
|---|
import org.apache.zookeeper.data.Stat;
public class ZooLock implements Watcher {
private static final Logger log = Logger.getLogger(ZooLock.class);
public static final String LOCK_PREFIX = "zlock-";
|
| File |
|---|
| ZooLock.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (in.readBoolean()) {
String strAuths = in.readUTF();
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
auths = new Authorizations(strAuths.getBytes(StandardCharsets.UTF_8));
=======
auths = new Authorizations(strAuths.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
}
if (in.readBoolean()) { |
| Solution content |
|---|
if (in.readBoolean()) {
String strAuths = in.readUTF();
auths = new Authorizations(strAuths.getBytes(UTF_8));
}
if (in.readBoolean()) { |
| File |
|---|
| RangeInputSplit.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
switch (this.tokenSource) {
case INLINE:
String tokenClass = in.readUTF();
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
byte[] base64TokenBytes = in.readUTF().getBytes(StandardCharsets.UTF_8);
=======
byte[] base64TokenBytes = in.readUTF().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
byte[] tokenBytes = Base64.decodeBase64(base64TokenBytes);
this.token = AuthenticationTokenSerializer.deserialize(tokenClass, tokenBytes); |
| Solution content |
|---|
switch (this.tokenSource) {
case INLINE:
String tokenClass = in.readUTF();
byte[] base64TokenBytes = in.readUTF().getBytes(UTF_8);
byte[] tokenBytes = Base64.decodeBase64(base64TokenBytes);
this.token = AuthenticationTokenSerializer.deserialize(tokenClass, tokenBytes); |
| File |
|---|
| RangeInputSplit.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.mapreduce.lib.impl; <<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java import static com.google.common.base.Preconditions.checkArgument; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java import java.io.IOException; import java.net.URI; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.mapreduce.lib.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.io.IOException; import java.net.URI; |
| File |
|---|
| ConfiguratorBase.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
if (token.startsWith(TokenSource.INLINE.prefix())) {
String[] args = token.substring(TokenSource.INLINE.prefix().length()).split(":", 2);
if (args.length == 2)
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(StandardCharsets.UTF_8)));
=======
return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
} else if (token.startsWith(TokenSource.FILE.prefix())) {
String tokenFileName = token.substring(TokenSource.FILE.prefix().length());
return getTokenFromFile(conf, getPrincipal(implementingClass, conf), tokenFileName); |
| Solution content |
|---|
if (token.startsWith(TokenSource.INLINE.prefix())) {
String[] args = token.substring(TokenSource.INLINE.prefix().length()).split(":", 2);
if (args.length == 2)
return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(UTF_8)));
} else if (token.startsWith(TokenSource.FILE.prefix())) {
String tokenFileName = token.substring(TokenSource.FILE.prefix().length());
return getTokenFromFile(conf, getPrincipal(implementingClass, conf), tokenFileName); |
| File |
|---|
| ConfiguratorBase.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.core.client.mapreduce.lib.impl; <<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java import static com.google.common.base.Preconditions.checkArgument; ======= import static com.google.common.base.Charsets.UTF_8; import static org.apache.accumulo.core.util.ArgumentChecker.notNull; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; |
| Solution content |
|---|
*/ package org.apache.accumulo.core.client.mapreduce.lib.impl; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; |
| File |
|---|
| InputConfigurator.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public static Authorizations getScanAuthorizations(Class> implementingClass, Configuration conf) {
String authString = conf.get(enumToConfKey(implementingClass, ScanOpts.AUTHORIZATIONS));
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(StandardCharsets.UTF_8));
=======
return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
}
/** |
| Solution content |
|---|
*/
public static Authorizations getScanAuthorizations(Class> implementingClass, Configuration conf) {
String authString = conf.get(enumToConfKey(implementingClass, ScanOpts.AUTHORIZATIONS));
return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(UTF_8));
}
/** |
| File |
|---|
| InputConfigurator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
for (String col : serialized) {
int idx = col.indexOf(":");
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(StandardCharsets.UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(
StandardCharsets.UTF_8)));
Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(StandardCharsets.UTF_8)));
=======
Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(UTF_8)));
Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
columns.add(new Pair |
| Solution content |
|---|
for (String col : serialized) {
int idx = col.indexOf(":");
Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(
UTF_8)));
Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
columns.add(new Pair |
| File |
|---|
| InputConfigurator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
String serialized;
try {
bwConfig.write(new DataOutputStream(baos));
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
serialized = new String(baos.toByteArray(), StandardCharsets.UTF_8);
=======
serialized = new String(baos.toByteArray(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
baos.close();
} catch (IOException e) {
throw new IllegalArgumentException("unable to serialize " + BatchWriterConfig.class.getName()); |
| Solution content |
|---|
String serialized;
try {
bwConfig.write(new DataOutputStream(baos));
serialized = new String(baos.toByteArray(), UTF_8);
baos.close();
} catch (IOException e) {
throw new IllegalArgumentException("unable to serialize " + BatchWriterConfig.class.getName()); |
| File |
|---|
| OutputConfigurator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return bwConfig;
} else {
try {
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(StandardCharsets.UTF_8));
=======
ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
bwConfig.readFields(new DataInputStream(bais));
bais.close();
return bwConfig; |
| Solution content |
|---|
return bwConfig;
} else {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(UTF_8));
bwConfig.readFields(new DataInputStream(bais));
bais.close();
return bwConfig; |
| File |
|---|
| OutputConfigurator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
for (Path path : cf) {
if (path.toUri().getPath().endsWith(cutFileName.substring(cutFileName.lastIndexOf('/')))) {
TreeSet |
| Solution content |
|---|
for (Path path : cf) {
if (path.toUri().getPath().endsWith(cutFileName.substring(cutFileName.lastIndexOf('/')))) {
TreeSet |
| File |
|---|
| RangePartitioner.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Try statement |
| Variable |
| While statement |
| Chunk |
|---|
| Conflicting content |
|---|
for (String name : zrw.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
byte[] bytes = zrw.getData(instanceNamePath, new Stat());
<<<<<<< HEAD
String iid = new String(bytes, Charsets.UTF_8);
=======
String iid = new String(bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (iid.equals(instanceIdFromFile)) {
instanceName = name;
} |
| Solution content |
|---|
for (String name : zrw.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
byte[] bytes = zrw.getData(instanceNamePath, new Stat());
String iid = new String(bytes, UTF_8);
if (iid.equals(instanceIdFromFile)) {
instanceName = name;
} |
| File |
|---|
| MiniAccumuloClusterImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
protected Connector getConnector(ByteBuffer login) throws Exception {
<<<<<<< HEAD
String[] pair = new String(login.array(), login.position(), login.remaining(), StandardCharsets.UTF_8).split(",", 2);
=======
String[] pair = new String(login.array(), login.position(), login.remaining(), UTF_8).split(",", 2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (instance.getInstanceID().equals(pair[0])) {
Credentials creds = Credentials.deserialize(pair[1]);
return instance.getConnector(creds.getPrincipal(), creds.getToken()); |
| Solution content |
|---|
}
protected Connector getConnector(ByteBuffer login) throws Exception {
String[] pair = new String(login.array(), login.position(), login.remaining(), UTF_8).split(",", 2);
if (instance.getInstanceID().equals(pair[0])) {
Credentials creds = Credentials.deserialize(pair[1]);
return instance.getConnector(creds.getPrincipal(), creds.getToken()); |
| File |
|---|
| ProxyServer.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public ByteBuffer login(String principal, Map |
| Solution content |
|---|
public ByteBuffer login(String principal, Map |
| File |
|---|
| ProxyServer.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
System.out.println("Creating user: ");
if (!tpc.proxy().listLocalUsers(login).contains("testuser")) {
<<<<<<< HEAD
tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(StandardCharsets.UTF_8)));
=======
tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
System.out.println("UserList: " + tpc.proxy().listLocalUsers(login));
|
| Solution content |
|---|
System.out.println("Creating user: ");
if (!tpc.proxy().listLocalUsers(login).contains("testuser")) {
tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(UTF_8)));
}
System.out.println("UserList: " + tpc.proxy().listLocalUsers(login));
|
| File |
|---|
| TestProxyClient.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
Map |
| Solution content |
|---|
Map |
| File |
|---|
| TestProxyClient.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
for (int i = 0; i < maxInserts; i++) {
String result = String.format(format, i);
Key pkey = new Key();
<<<<<<< HEAD
pkey.setRow(result.getBytes(StandardCharsets.UTF_8));
ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(StandardCharsets.UTF_8)));
update.setValue(Util.randStringBuffer(10));
mutations.put(ByteBuffer.wrap(result.getBytes(StandardCharsets.UTF_8)), Collections.singletonList(update));
=======
pkey.setRow(result.getBytes(UTF_8));
ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
update.setValue(Util.randStringBuffer(10));
mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
tpc.proxy().update(writer, mutations);
mutations.clear();
} |
| Solution content |
|---|
for (int i = 0; i < maxInserts; i++) {
String result = String.format(format, i);
Key pkey = new Key();
pkey.setRow(result.getBytes(UTF_8));
ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
update.setValue(Util.randStringBuffer(10));
mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
tpc.proxy().update(writer, mutations);
mutations.clear();
} |
| File |
|---|
| TestProxyClient.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
public static ByteBuffer randStringBuffer(int numbytes) {
<<<<<<< HEAD
return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(StandardCharsets.UTF_8));
=======
return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) { |
| Solution content |
|---|
}
public static ByteBuffer randStringBuffer(int numbytes) {
return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(UTF_8));
}
public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) { |
| File |
|---|
| Util.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
try {
byte[] buffer = new byte[10];
int bytes = is.read(buffer);
<<<<<<< HEAD
String setting = new String(buffer, 0, bytes, StandardCharsets.UTF_8);
=======
String setting = new String(buffer, 0, bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
setting = setting.trim();
if (bytes > 0 && Integer.parseInt(setting) > 10) {
log.warn("System swappiness setting is greater than ten (" + setting + ") which can cause time-sensitive operations to be delayed. " |
| Solution content |
|---|
try {
byte[] buffer = new byte[10];
int bytes = is.read(buffer);
String setting = new String(buffer, 0, bytes, UTF_8);
setting = setting.trim();
if (bytes > 0 && Integer.parseInt(setting) > 10) {
log.warn("System swappiness setting is greater than ten (" + setting + ") which can cause time-sensitive operations to be delayed. " |
| File |
|---|
| Accumulo.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] loc = zooCache.get(zRootLocPath);
<<<<<<< HEAD
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (loc == null) {
return null; |
| Solution content |
|---|
byte[] loc = zooCache.get(zRootLocPath);
opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
if (loc == null) {
return null; |
| File |
|---|
| HdfsZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return null;
}
<<<<<<< HEAD
return new String(loc, StandardCharsets.UTF_8).split("\\|")[0];
=======
return new String(loc, UTF_8).split("\\|")[0];
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
return null;
}
return new String(loc, UTF_8).split("\\|")[0];
}
@Override |
| File |
|---|
| HdfsZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array access |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] loc = ZooLock.getLockData(zooCache, masterLocPath, null);
<<<<<<< HEAD
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (loc == null) {
return Collections.emptyList(); |
| Solution content |
|---|
byte[] loc = ZooLock.getLockData(zooCache, masterLocPath, null);
opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
if (loc == null) {
return Collections.emptyList(); |
| File |
|---|
| HdfsZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return Collections.emptyList();
}
<<<<<<< HEAD
return Collections.singletonList(new String(loc, StandardCharsets.UTF_8));
=======
return Collections.singletonList(new String(loc, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
return Collections.emptyList();
}
return Collections.singletonList(new String(loc, UTF_8));
}
@Override |
| File |
|---|
| HdfsZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.conf; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.List; import java.util.Map; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.conf; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.List; import java.util.Map; |
| File |
|---|
| ZooCachePropertyAccessor.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private String get(String path) {
byte[] v = propCache.get(path);
if (v != null) {
<<<<<<< HEAD
return new String(v, StandardCharsets.UTF_8);
=======
return new String(v, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else {
return null;
} |
| Solution content |
|---|
private String get(String path) {
byte[] v = propCache.get(path);
if (v != null) {
return new String(v, UTF_8);
} else {
return null;
} |
| File |
|---|
| ZooCachePropertyAccessor.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.conf; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Collections; import java.util.HashMap; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.conf; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Collections; import java.util.HashMap; import java.util.List; |
| File |
|---|
| ZooConfiguration.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] v = propCache.get(zPath);
String value = null;
if (v != null)
<<<<<<< HEAD
value = new String(v, StandardCharsets.UTF_8);
=======
value = new String(v, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return value;
}
|
| Solution content |
|---|
byte[] v = propCache.get(zPath);
String value = null;
if (v != null)
value = new String(v, UTF_8);
return value;
}
|
| File |
|---|
| ZooConfiguration.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.constraints; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.constraints; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; |
| File |
|---|
| MetadataConstraints.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
HashSet |
| Solution content |
|---|
HashSet |
| File |
|---|
| MetadataConstraints.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} else if (new Text(update.getColumnFamily()).equals(TabletsSection.BulkFileColumnFamily.NAME)) {
loadedFiles.add(new Text(update.getColumnQualifier()));
<<<<<<< HEAD
if (!new String(update.getValue(), StandardCharsets.UTF_8).equals(tidString)) {
=======
if (!new String(update.getValue(), UTF_8).equals(tidString)) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
otherTidCount++;
}
} |
| Solution content |
|---|
} else if (new Text(update.getColumnFamily()).equals(TabletsSection.BulkFileColumnFamily.NAME)) {
loadedFiles.add(new Text(update.getColumnQualifier()));
if (!new String(update.getValue(), UTF_8).equals(tidString)) {
otherTidCount++;
}
} |
| File |
|---|
| MetadataConstraints.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
boolean lockHeld = false;
<<<<<<< HEAD
String lockId = new String(columnUpdate.getValue(), StandardCharsets.UTF_8);
=======
String lockId = new String(columnUpdate.getValue(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
try {
lockHeld = ZooLock.isLockHeld(zooCache, new ZooUtil.LockID(zooRoot, lockId)); |
| Solution content |
|---|
}
boolean lockHeld = false;
String lockId = new String(columnUpdate.getValue(), UTF_8);
try {
lockHeld = ZooLock.isLockHeld(zooCache, new ZooUtil.LockID(zooRoot, lockId)); |
| File |
|---|
| MetadataConstraints.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
if (violations != null) {
<<<<<<< HEAD
log.debug("violating metadata mutation : " + new String(mutation.getRow(), StandardCharsets.UTF_8));
for (ColumnUpdate update : mutation.getUpdates()) {
log.debug(" update: " + new String(update.getColumnFamily(), StandardCharsets.UTF_8) + ":" + new String(update.getColumnQualifier(), StandardCharsets.UTF_8) + " value "
+ (update.isDeleted() ? "[delete]" : new String(update.getValue(), StandardCharsets.UTF_8)));
=======
log.debug("violating metadata mutation : " + new String(mutation.getRow(), UTF_8));
for (ColumnUpdate update : mutation.getUpdates()) {
log.debug(" update: " + new String(update.getColumnFamily(), UTF_8) + ":" + new String(update.getColumnQualifier(), UTF_8) + " value "
+ (update.isDeleted() ? "[delete]" : new String(update.getValue(), UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
}
|
| Solution content |
|---|
}
if (violations != null) {
log.debug("violating metadata mutation : " + new String(mutation.getRow(), UTF_8));
for (ColumnUpdate update : mutation.getUpdates()) {
log.debug(" update: " + new String(update.getColumnFamily(), UTF_8) + ":" + new String(update.getColumnQualifier(), UTF_8) + " value "
+ (update.isDeleted() ? "[delete]" : new String(update.getValue(), UTF_8)));
}
}
|
| File |
|---|
| MetadataConstraints.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
private static void createEntriesForTablet(FileSKVWriter writer, String tableId, String tabletDir, Text tabletPrevEndRow, Text tabletEndRow)
throws IOException {
Text extent = new Text(KeyExtent.getMetadataEntry(new Text(tableId), tabletEndRow));
<<<<<<< HEAD
addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(StandardCharsets.UTF_8)));
addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(StandardCharsets.UTF_8)));
=======
addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(UTF_8)));
addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
addEntry(writer, extent, PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(tabletPrevEndRow));
}
|
| Solution content |
|---|
private static void createEntriesForTablet(FileSKVWriter writer, String tableId, String tabletDir, Text tabletPrevEndRow, Text tabletEndRow)
throws IOException {
Text extent = new Text(KeyExtent.getMetadataEntry(new Text(tableId), tabletEndRow));
addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(UTF_8)));
addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(UTF_8)));
addEntry(writer, extent, PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(tabletPrevEndRow));
}
|
| File |
|---|
| Initialize.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// setup instance name
if (opts.clearInstanceName)
zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
<<<<<<< HEAD
zoo.putPersistentData(instanceNamePath, uuid.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
zoo.putPersistentData(instanceNamePath, uuid.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
final byte[] EMPTY_BYTE_ARRAY = new byte[0], ZERO_CHAR_ARRAY = new byte[] {'0'};
|
| Solution content |
|---|
// setup instance name
if (opts.clearInstanceName)
zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
zoo.putPersistentData(instanceNamePath, uuid.getBytes(UTF_8), NodeExistsPolicy.FAIL);
final byte[] EMPTY_BYTE_ARRAY = new byte[0], ZERO_CHAR_ARRAY = new byte[] {'0'};
|
| File |
|---|
| Initialize.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_WALOGS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
<<<<<<< HEAD
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(StandardCharsets.UTF_8),
NodeExistsPolicy.FAIL);
=======
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(UTF_8), NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
zoo.putPersistentData(zkInstanceRoot + Constants.ZGC, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZGC_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZCONFIG, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL); |
| Solution content |
|---|
zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_WALOGS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(UTF_8), NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(UTF_8),
NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZGC, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZGC_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZCONFIG, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL); |
| File |
|---|
| Initialize.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
private static byte[] getRootPassword(Opts opts) throws IOException {
if (opts.cliPassword != null) {
<<<<<<< HEAD
return opts.cliPassword.getBytes(StandardCharsets.UTF_8);
=======
return opts.cliPassword.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
String rootpass;
String confirmpass; |
| Solution content |
|---|
private static byte[] getRootPassword(Opts opts) throws IOException {
if (opts.cliPassword != null) {
return opts.cliPassword.getBytes(UTF_8);
}
String rootpass;
String confirmpass; |
| File |
|---|
| Initialize.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (!rootpass.equals(confirmpass))
log.error("Passwords do not match");
} while (!rootpass.equals(confirmpass));
<<<<<<< HEAD
return rootpass.getBytes(StandardCharsets.UTF_8);
=======
return rootpass.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private static void initSecurity(Opts opts, String iid) throws AccumuloSecurityException, ThriftSecurityException { |
| Solution content |
|---|
if (!rootpass.equals(confirmpass))
log.error("Passwords do not match");
} while (!rootpass.equals(confirmpass));
return rootpass.getBytes(UTF_8);
}
private static void initSecurity(Opts opts, String iid) throws AccumuloSecurityException, ThriftSecurityException { |
| File |
|---|
| Initialize.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
} else {
locklessServers.remove(zPath);
<<<<<<< HEAD
ServerServices services = new ServerServices(new String(lockData, StandardCharsets.UTF_8));
=======
ServerServices services = new ServerServices(new String(lockData, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
|
| Solution content |
|---|
}
} else {
locklessServers.remove(zPath);
ServerServices services = new ServerServices(new String(lockData, UTF_8));
HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
|
| File |
|---|
| LiveTServerSet.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.master.state; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.ArrayList; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.master.state; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.List; |
| File |
|---|
| DeadServerList.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
// in the dead server list.
continue;
}
<<<<<<< HEAD
DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, StandardCharsets.UTF_8));
=======
DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
result.add(server);
}
} |
| Solution content |
|---|
// in the dead server list.
continue;
}
DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, UTF_8));
result.add(server);
}
} |
| File |
|---|
| DeadServerList.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void post(String server, String cause) {
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
try {
<<<<<<< HEAD
zoo.putPersistentData(path + "/" + server, cause.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.SKIP);
=======
zoo.putPersistentData(path + "/" + server, cause.getBytes(UTF_8), NodeExistsPolicy.SKIP);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (Exception ex) {
log.error(ex, ex);
} |
| Solution content |
|---|
public void post(String server, String cause) {
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
try {
zoo.putPersistentData(path + "/" + server, cause.getBytes(UTF_8), NodeExistsPolicy.SKIP);
} catch (Exception ex) {
log.error(ex, ex);
} |
| File |
|---|
| DeadServerList.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
public TServerInstance(Value address, Text session) {
<<<<<<< HEAD
this(AddressUtil.parseAddress(new String(address.get(), StandardCharsets.UTF_8), false), session.toString());
=======
this(AddressUtil.parseAddress(new String(address.get(), UTF_8), false), session.toString());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public void putLocation(Mutation m) { |
| Solution content |
|---|
}
public TServerInstance(Value address, Text session) {
this(AddressUtil.parseAddress(new String(address.get(), UTF_8), false), session.toString());
}
public void putLocation(Mutation m) { |
| File |
|---|
| TServerInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return new Text(this.getSession());
}
<<<<<<< HEAD
private Value asMutationValue() {
return new Value(getLocation().toString().getBytes(StandardCharsets.UTF_8));
=======
public Value asMutationValue() {
return new Value(getLocation().toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public HostAndPort getLocation() { |
| Solution content |
|---|
return new Text(this.getSession());
}
private Value asMutationValue() {
return new Value(getLocation().toString().getBytes(UTF_8));
}
public HostAndPort getLocation() { |
| File |
|---|
| TServerInstance.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
byte[] data = Base64.decodeBase64(merges.getBytes(StandardCharsets.UTF_8));
try {
Map |
| Solution content |
|---|
try {
Map |
| File |
|---|
| TabletStateChangeIterator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
path = relative(path);
ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
cache.clear();
<<<<<<< HEAD
log.debug("Wrote " + new String(bs, StandardCharsets.UTF_8) + " to " + path);
=======
log.debug("Wrote " + new String(bs, UTF_8) + " to " + path);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (Exception ex) {
throw new DistributedStoreException(ex);
} |
| Solution content |
|---|
path = relative(path);
ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
cache.clear();
log.debug("Wrote " + new String(bs, UTF_8) + " to " + path);
} catch (Exception ex) {
throw new DistributedStoreException(ex);
} |
| File |
|---|
| ZooStore.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
protected TServerInstance parse(byte[] current) {
<<<<<<< HEAD
String str = new String(current, StandardCharsets.UTF_8);
=======
String str = new String(current, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
String[] parts = str.split("[|]", 2);
HostAndPort address = HostAndPort.fromString(parts[0]);
if (parts.length > 1 && parts[1] != null && parts[1].length() > 0) { |
| Solution content |
|---|
}
protected TServerInstance parse(byte[] current) {
String str = new String(current, UTF_8);
String[] parts = str.split("[|]", 2);
HostAndPort address = HostAndPort.fromString(parts[0]);
if (parts.length > 1 && parts[1] != null && parts[1].length() > 0) { |
| File |
|---|
| ZooTabletStateStore.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (current.current != null) {
throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current);
}
<<<<<<< HEAD
store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(StandardCharsets.UTF_8));
=======
store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
@Override |
| Solution content |
|---|
if (current.current != null) {
throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current);
}
store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(UTF_8));
}
@Override |
| File |
|---|
| ZooTabletStateStore.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (!current.future.equals(assignment.server)) {
throw new DistributedStoreException("Root tablet is already assigned to " + current.future);
}
<<<<<<< HEAD
store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(StandardCharsets.UTF_8));
store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(StandardCharsets.UTF_8));
=======
store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(UTF_8));
store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
// Make the following unnecessary by making the entire update atomic
store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
log.debug("Put down root tablet location"); |
| Solution content |
|---|
if (!current.future.equals(assignment.server)) {
throw new DistributedStoreException("Root tablet is already assigned to " + current.future);
}
store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(UTF_8));
store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(UTF_8));
// Make the following unnecessary by making the entire update atomic
store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
log.debug("Put down root tablet location"); |
| File |
|---|
| ZooTabletStateStore.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return;
}
}
<<<<<<< HEAD
logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), StandardCharsets.UTF_8);
=======
logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private void writeToLog(String name) throws IOException { |
| Solution content |
|---|
return;
}
}
logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), UTF_8);
}
private void writeToLog(String name) throws IOException { |
| File |
|---|
| AbstractMetricsImpl.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
zoo.putEphemeralData(path, logForwardingAddr.getBytes(StandardCharsets.UTF_8));
=======
zoo.putEphemeralData(path, logForwardingAddr.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
new Daemon(server).start();
} catch (Throwable t) { |
| Solution content |
|---|
}
}
zoo.putEphemeralData(path, logForwardingAddr.getBytes(UTF_8));
new Daemon(server).start();
} catch (Throwable t) { |
| File |
|---|
| LogService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public synchronized String getRootUsername() {
if (rootUserName == null)
<<<<<<< HEAD
rootUserName = new String(zooCache.get(ZKUserPath), StandardCharsets.UTF_8);
=======
rootUserName = new String(zooCache.get(ZKUserPath), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return rootUserName;
}
|
| Solution content |
|---|
public synchronized String getRootUsername() {
if (rootUserName == null)
rootUserName = new String(zooCache.get(ZKUserPath), UTF_8);
return rootUserName;
}
|
| File |
|---|
| SecurityOperation.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
private static SystemToken get(Instance instance) {
<<<<<<< HEAD
byte[] instanceIdBytes = instance.getInstanceID().getBytes(StandardCharsets.UTF_8);
=======
byte[] instanceIdBytes = instance.getInstanceID().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
byte[] confChecksum;
MessageDigest md;
try { |
| Solution content |
|---|
}
private static SystemToken get(Instance instance) {
byte[] instanceIdBytes = instance.getInstanceID().getBytes(UTF_8);
byte[] confChecksum;
MessageDigest md;
try { |
| File |
|---|
| SystemCredentials.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
// seed the config with the version and instance id, so at least it's not empty
<<<<<<< HEAD
md.update(ServerConstants.WIRE_VERSION.toString().getBytes(StandardCharsets.UTF_8));
=======
md.update(ServerConstants.WIRE_VERSION.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
md.update(instanceIdBytes);
for (Entry |
| Solution content |
|---|
}
// seed the config with the version and instance id, so at least it's not empty
md.update(ServerConstants.WIRE_VERSION.toString().getBytes(UTF_8));
md.update(instanceIdBytes);
for (Entry |
| File |
|---|
| SystemCredentials.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
for (Entry |
| Solution content |
|---|
for (Entry |
| File |
|---|
| SystemCredentials.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.security.handler; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.HashSet; import java.util.Set; import java.util.TreeSet; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.security.handler; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.HashSet; import java.util.Set; import java.util.TreeSet; |
| File |
|---|
| ZKAuthenticator.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
}
// prep parent node of users with root username
<<<<<<< HEAD
zoo.putPersistentData(ZKUserPath, principal.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
zoo.putPersistentData(ZKUserPath, principal.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
constructUser(principal, ZKSecurityTool.createPass(token));
} |
| Solution content |
|---|
}
// prep parent node of users with root username
zoo.putPersistentData(ZKUserPath, principal.getBytes(UTF_8), NodeExistsPolicy.FAIL);
constructUser(principal, ZKSecurityTool.createPass(token));
} |
| File |
|---|
| ZKAuthenticator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
try {
// prep parent node of users with root username
if (!zoo.exists(ZKUserPath))
<<<<<<< HEAD
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
initUser(rootuser);
zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL); |
| Solution content |
|---|
try {
// prep parent node of users with root username
if (!zoo.exists(ZKUserPath))
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
initUser(rootuser);
zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL); |
| File |
|---|
| ZKAuthorizor.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.security.handler; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Collections; import java.util.HashMap; import java.util.Map; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.security.handler; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Collections; import java.util.HashMap; import java.util.Map; |
| File |
|---|
| ZKPermHandler.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
try {
// prep parent node of users with root username
if (!zoo.exists(ZKUserPath))
<<<<<<< HEAD
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
initUser(rootuser);
zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(rootPerms), NodeExistsPolicy.FAIL); |
| Solution content |
|---|
try {
// prep parent node of users with root username
if (!zoo.exists(ZKUserPath))
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
initUser(rootuser);
zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(rootPerms), NodeExistsPolicy.FAIL); |
| File |
|---|
| ZKPermHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.tables; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.security.SecurityPermission; import java.util.Collections; import java.util.HashMap; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.tables; import static java.nio.charset.StandardCharsets.UTF_8; import java.security.SecurityPermission; import java.util.Collections; import java.util.HashMap; |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
zoo.putPersistentData(zPath, new byte[0], existsPolicy);
<<<<<<< HEAD
zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(StandardCharsets.UTF_8), existsPolicy);
=======
zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(UTF_8), existsPolicy);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], existsPolicy);
}
|
| Solution content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
zoo.putPersistentData(zPath, new byte[0], existsPolicy);
zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(UTF_8), existsPolicy);
zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], existsPolicy);
}
|
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
zoo.putPersistentData(zTablePath, new byte[0], existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], existsPolicy);
<<<<<<< HEAD
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(StandardCharsets.UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(StandardCharsets.UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(StandardCharsets.UTF_8), existsPolicy);
=======
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(UTF_8), existsPolicy);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
public synchronized static TableManager getInstance() { |
| Solution content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
zoo.putPersistentData(zTablePath, new byte[0], existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(UTF_8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(UTF_8), existsPolicy);
}
public synchronized static TableManager getInstance() { |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
String statePath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;
try {
<<<<<<< HEAD
ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(StandardCharsets.UTF_8), ZooUtil.PUBLIC, new Mutator() {
=======
ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(UTF_8), ZooUtil.PUBLIC, new Mutator() {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
@Override
public byte[] mutate(byte[] oldData) throws Exception {
TableState oldState = TableState.UNKNOWN; |
| Solution content |
|---|
String statePath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;
try {
ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(UTF_8), ZooUtil.PUBLIC, new Mutator() {
@Override
public byte[] mutate(byte[] oldData) throws Exception {
TableState oldState = TableState.UNKNOWN; |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public byte[] mutate(byte[] oldData) throws Exception {
TableState oldState = TableState.UNKNOWN;
if (oldData != null)
<<<<<<< HEAD
oldState = TableState.valueOf(new String(oldData, StandardCharsets.UTF_8));
=======
oldState = TableState.valueOf(new String(oldData, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
boolean transition = true;
// +--------+
// v | |
| Solution content |
|---|
public byte[] mutate(byte[] oldData) throws Exception {
TableState oldState = TableState.UNKNOWN;
if (oldData != null)
oldState = TableState.valueOf(new String(oldData, UTF_8));
boolean transition = true;
// +--------+
// v | |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (!transition)
throw new IllegalTableTransitionException(oldState, newState);
log.debug("Transitioning state for table " + tableId + " from " + oldState + " to " + newState);
<<<<<<< HEAD
return newState.name().getBytes(StandardCharsets.UTF_8);
=======
return newState.name().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
});
} catch (Exception e) { |
| Solution content |
|---|
if (!transition)
throw new IllegalTableTransitionException(oldState, newState);
log.debug("Transitioning state for table " + tableId + " from " + oldState + " to " + newState);
return newState.name().getBytes(UTF_8);
}
});
} catch (Exception e) { |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
TableState tState = TableState.UNKNOWN;
byte[] data = zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE);
if (data != null) {
<<<<<<< HEAD
String sState = new String(data, StandardCharsets.UTF_8);
=======
String sState = new String(data, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
try {
tState = TableState.valueOf(sState);
} catch (IllegalArgumentException e) { |
| Solution content |
|---|
TableState tState = TableState.UNKNOWN;
byte[] data = zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE);
if (data != null) {
String sState = new String(data, UTF_8);
try {
tState = TableState.valueOf(sState);
} catch (IllegalArgumentException e) { |
| File |
|---|
| TableManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.tablets; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Random; import org.apache.accumulo.core.Constants; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.tablets; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Random; import org.apache.accumulo.core.Constants; |
| File |
|---|
| UniqueNameAllocator.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
try {
byte[] max = ZooReaderWriter.getInstance().mutate(nextNamePath, null, ZooUtil.PRIVATE, new ZooReaderWriter.Mutator() {
public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
long l = Long.parseLong(new String(currentValue, StandardCharsets.UTF_8), Character.MAX_RADIX);
l += allocate;
return Long.toString(l, Character.MAX_RADIX).getBytes(StandardCharsets.UTF_8);
}
});
maxAllocated = Long.parseLong(new String(max, StandardCharsets.UTF_8), Character.MAX_RADIX);
=======
long l = Long.parseLong(new String(currentValue, UTF_8), Character.MAX_RADIX);
l += allocate;
return Long.toString(l, Character.MAX_RADIX).getBytes(UTF_8);
}
});
maxAllocated = Long.parseLong(new String(max, UTF_8), Character.MAX_RADIX);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
next = maxAllocated - allocate;
} catch (Exception e) { |
| Solution content |
|---|
try {
byte[] max = ZooReaderWriter.getInstance().mutate(nextNamePath, null, ZooUtil.PRIVATE, new ZooReaderWriter.Mutator() {
public byte[] mutate(byte[] currentValue) throws Exception {
long l = Long.parseLong(new String(currentValue, UTF_8), Character.MAX_RADIX);
l += allocate;
return Long.toString(l, Character.MAX_RADIX).getBytes(UTF_8);
}
});
maxAllocated = Long.parseLong(new String(max, UTF_8), Character.MAX_RADIX);
next = maxAllocated - allocate;
} catch (Exception e) { |
| File |
|---|
| UniqueNameAllocator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), StandardCharsets.UTF_8);
=======
return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private static UniqueNameAllocator instance = null; |
| Solution content |
|---|
}
}
return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), UTF_8);
}
private static UniqueNameAllocator instance = null; |
| File |
|---|
| UniqueNameAllocator.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.HashSet; import java.util.Map.Entry; import java.util.Set; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.util; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.HashSet; import java.util.Map.Entry; import java.util.Set; |
| File |
|---|
| AddFilesWithMissingEntries.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
String size = Long.toString(file.getLen());
String entries = "1"; // lie
String value = size + "," + entries;
<<<<<<< HEAD
m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(StandardCharsets.UTF_8)));
=======
m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
if (update) {
writer.getBatchWriter(MetadataTable.NAME).addMutation(m);
} |
| Solution content |
|---|
String size = Long.toString(file.getLen());
String entries = "1"; // lie
String value = size + "," + entries;
m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(UTF_8)));
if (update) {
writer.getBatchWriter(MetadataTable.NAME).addMutation(m);
} |
| File |
|---|
| AddFilesWithMissingEntries.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
});
String path = "/accumulo/instances/" + inst.getInstanceName();
orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
<<<<<<< HEAD
new_.putPersistentData(path, newInstanceId.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
return newInstanceId;
}
|
| Solution content |
|---|
});
String path = "/accumulo/instances/" + inst.getInstanceName();
orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
return newInstanceId;
}
|
| File |
|---|
| ChangeSecret.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
String root = Constants.ZROOT;
IZooReaderWriter zk = ZooReaderWriter.getInstance();
if (opts.auth != null) {
<<<<<<< HEAD
zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(StandardCharsets.UTF_8));
=======
zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
try { |
| Solution content |
|---|
String root = Constants.ZROOT;
IZooReaderWriter zk = ZooReaderWriter.getInstance();
if (opts.auth != null) {
zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(UTF_8));
}
try { |
| File |
|---|
| CleanZookeeper.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES)) {
String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
byte[] id = zk.getData(instanceNamePath, null);
<<<<<<< HEAD
if (id != null && !new String(id, StandardCharsets.UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
=======
if (id != null && !new String(id, UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
try {
zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
} catch (KeeperException.NoAuthException ex) { |
| Solution content |
|---|
for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES)) {
String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
byte[] id = zk.getData(instanceNamePath, null);
if (id != null && !new String(id, UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
try {
zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
} catch (KeeperException.NoAuthException ex) { |
| File |
|---|
| CleanZookeeper.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.HashSet; import java.util.Set; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.util; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.HashSet; import java.util.Set; |
| File |
|---|
| DeleteZooInstance.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + opts.instance;
byte[] data = zk.getData(path, null);
deleteRetry(zk, path);
<<<<<<< HEAD
deleteRetry(zk, Constants.ZROOT + "/" + new String(data, StandardCharsets.UTF_8));
=======
deleteRetry(zk, Constants.ZROOT + "/" + new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} else if (uuids.contains(opts.instance)) {
// look for the real instance name
for (String instance : instances) { |
| Solution content |
|---|
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + opts.instance;
byte[] data = zk.getData(path, null);
deleteRetry(zk, path);
deleteRetry(zk, Constants.ZROOT + "/" + new String(data, UTF_8));
} else if (uuids.contains(opts.instance)) {
// look for the real instance name
for (String instance : instances) { |
| File |
|---|
| DeleteZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
for (String instance : instances) {
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
byte[] data = zk.getData(path, null);
<<<<<<< HEAD
if (opts.instance.equals(new String(data, StandardCharsets.UTF_8)))
=======
if (opts.instance.equals(new String(data, UTF_8)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
deleteRetry(zk, path);
}
deleteRetry(zk, Constants.ZROOT + "/" + opts.instance); |
| Solution content |
|---|
for (String instance : instances) {
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
byte[] data = zk.getData(path, null);
if (opts.instance.equals(new String(data, UTF_8)))
deleteRetry(zk, path);
}
deleteRetry(zk, Constants.ZROOT + "/" + opts.instance); |
| File |
|---|
| DeleteZooInstance.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (data[i] < ' ' || data[i] > '~')
return new Encoded("base64", Base64.encodeBase64String(data));
}
<<<<<<< HEAD
return new Encoded(StandardCharsets.UTF_8.name(), new String(data, StandardCharsets.UTF_8));
=======
return new Encoded(UTF_8.name(), new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private static void write(PrintStream out, int indent, String fmt, Object... args) { |
| Solution content |
|---|
if (data[i] < ' ' || data[i] > '~')
return new Encoded("base64", Base64.encodeBase64String(data));
}
return new Encoded(UTF_8.name(), new String(data, UTF_8));
}
private static void write(PrintStream out, int indent, String fmt, Object... args) { |
| File |
|---|
| DumpZookeeper.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/ package org.apache.accumulo.server.util; <<<<<<< HEAD import java.nio.charset.StandardCharsets; ======= import static com.google.common.base.Charsets.UTF_8; >>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f import java.util.Formattable; import java.util.Formatter; import java.util.List; |
| Solution content |
|---|
*/ package org.apache.accumulo.server.util; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Formattable; import java.util.Formatter; import java.util.List; |
| File |
|---|
| ListInstances.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
if (master == null) {
return null;
}
<<<<<<< HEAD
return new String(master, StandardCharsets.UTF_8);
=======
return new String(master, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (Exception e) {
handleException(e, printErrors);
return null; |
| Solution content |
|---|
if (master == null) {
return null;
}
return new String(master, UTF_8);
} catch (Exception e) {
handleException(e, printErrors);
return null; |
| File |
|---|
| ListInstances.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
for (String name : names) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
try {
<<<<<<< HEAD
UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), StandardCharsets.UTF_8));
=======
UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
tm.put(name, iid);
} catch (Exception e) {
handleException(e, printErrors); |
| Solution content |
|---|
for (String name : names) {
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
try {
UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), UTF_8));
tm.put(name, iid);
} catch (Exception e) {
handleException(e, printErrors); |
| File |
|---|
| ListInstances.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
private static void putLockID(ZooLock zooLock, Mutation m) {
TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/")
<<<<<<< HEAD
.getBytes(StandardCharsets.UTF_8)));
=======
.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
}
private static void update(Credentials credentials, Mutation m, KeyExtent extent) { |
| Solution content |
|---|
private static void putLockID(ZooLock zooLock, Mutation m) {
TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/")
.getBytes(UTF_8)));
}
private static void update(Credentials credentials, Mutation m, KeyExtent extent) { |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Other |
| Chunk |
|---|
| Conflicting content |
|---|
public static void updateTabletFlushID(KeyExtent extent, long flushID, Credentials credentials, ZooLock zooLock) {
if (!extent.isRootTablet()) {
Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(credentials, zooLock, m, extent);
}
} |
| Solution content |
|---|
public static void updateTabletFlushID(KeyExtent extent, long flushID, Credentials credentials, ZooLock zooLock) {
if (!extent.isRootTablet()) {
Mutation m = new Mutation(extent.getMetadataEntry());
TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(UTF_8)));
update(credentials, zooLock, m, extent);
}
} |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static void updateTabletCompactID(KeyExtent extent, long compactID, Credentials credentials, ZooLock zooLock) {
if (!extent.isRootTablet()) {
Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(credentials, zooLock, m, extent);
}
} |
| Solution content |
|---|
public static void updateTabletCompactID(KeyExtent extent, long compactID, Credentials credentials, ZooLock zooLock) {
if (!extent.isRootTablet()) {
Mutation m = new Mutation(extent.getMetadataEntry());
TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(UTF_8)));
update(credentials, zooLock, m, extent);
}
} |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static void updateTabletDataFile(long tid, KeyExtent extent, Map |
| Solution content |
|---|
public static void updateTabletDataFile(long tid, KeyExtent extent, Map |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
m.put(DataFileColumnFamily.NAME, file, new Value(entry.getValue().encode()));
m.put(TabletsSection.BulkFileColumnFamily.NAME, file, new Value(tidBytes));
}
<<<<<<< HEAD
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(credentials, zooLock, m, extent);
}
|
| Solution content |
|---|
m.put(DataFileColumnFamily.NAME, file, new Value(entry.getValue().encode()));
m.put(TabletsSection.BulkFileColumnFamily.NAME, file, new Value(tidBytes));
}
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(UTF_8)));
update(credentials, zooLock, m, extent);
}
|
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static void updateTabletDir(KeyExtent extent, String newDir, Credentials creds, ZooLock lock) {
Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(creds, lock, m, extent);
}
|
| Solution content |
|---|
public static void updateTabletDir(KeyExtent extent, String newDir, Credentials creds, ZooLock lock) {
Mutation m = new Mutation(extent.getMetadataEntry());
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
update(creds, lock, m, extent);
}
|
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static void addTablet(KeyExtent extent, String path, Credentials credentials, char timeType, ZooLock lock) {
Mutation m = extent.getPrevRowUpdateMutation();
<<<<<<< HEAD
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(StandardCharsets.UTF_8)));
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(UTF_8)));
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(credentials, lock, m, extent);
} |
| Solution content |
|---|
public static void addTablet(KeyExtent extent, String path, Credentials credentials, char timeType, ZooLock lock) {
Mutation m = extent.getPrevRowUpdateMutation();
TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(UTF_8)));
TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(UTF_8)));
update(credentials, lock, m, extent);
} |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
m.put(DataFileColumnFamily.NAME, entry.getKey().meta(), new Value(entry.getValue().encode()));
if (newDir != null)
<<<<<<< HEAD
ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(StandardCharsets.UTF_8)));
=======
ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
update(credentials, m, extent);
} |
| Solution content |
|---|
m.put(DataFileColumnFamily.NAME, entry.getKey().meta(), new Value(entry.getValue().encode()));
if (newDir != null)
ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
update(credentials, m, extent);
} |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, Credentials credentials, ZooLock zooLock) {
Mutation m = extent.getPrevRowUpdateMutation(); //
<<<<<<< HEAD
TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(StandardCharsets.UTF_8)));
=======
TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow));
ChoppedColumnFamily.CHOPPED_COLUMN.putDelete(m); |
| Solution content |
|---|
public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, Credentials credentials, ZooLock zooLock) {
Mutation m = extent.getPrevRowUpdateMutation(); //
TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(UTF_8)));
TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow));
ChoppedColumnFamily.CHOPPED_COLUMN.putDelete(m); |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
try {
<<<<<<< HEAD
zoo.putPersistentData(zpath, dir.getBytes(StandardCharsets.UTF_8), -1, NodeExistsPolicy.OVERWRITE);
=======
zoo.putPersistentData(zpath, dir.getBytes(UTF_8), -1, NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (KeeperException e) {
throw new IOException(e);
} catch (InterruptedException e) { |
| Solution content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
try {
zoo.putPersistentData(zpath, dir.getBytes(UTF_8), -1, NodeExistsPolicy.OVERWRITE);
} catch (KeeperException e) {
throw new IOException(e);
} catch (InterruptedException e) { |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
try {
<<<<<<< HEAD
return new String(zoo.getData(zpath, null), StandardCharsets.UTF_8);
=======
return new String(zoo.getData(zpath, null), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
} catch (KeeperException e) {
throw new IOException(e);
} catch (InterruptedException e) { |
| Solution content |
|---|
IZooReaderWriter zoo = ZooReaderWriter.getInstance();
String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
try {
return new String(zoo.getData(zpath, null), UTF_8);
} catch (KeeperException e) {
throw new IOException(e);
} catch (InterruptedException e) { |
| File |
|---|
| MetadataTableUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|