conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
// Hee_Q1707.run();
Hee_Q1766.run();
=======
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
// Hee_Q7576.run();
// Hee_Q2178.run();
// Hee_Q2146.run();
Hee_Q2252.run();
// Hee_Q15686.run();
>>>>>>>
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
// Hee_Q7576.run();
// Hee_Q2178.run();
// Hee_Q2146.run();
// Hee_Q2252.run();
Hee_Q1766.run();
// Hee_Q15686.run(); |
<<<<<<<
import hee.*;
=======
import doy.math1_2.Doy_Q1676;
import doy.math1_2.Doy_Q1929;
import doy.math1_2.Doy_Q6588;
import hee.math1_2.Hee_Q6588;
>>>>>>>
import doy.math1_2.*;
import hee.math1_2.*;
<<<<<<<
// Doy_Q11653.run();
Hee_Q1676.run();
=======
// Doy_Q1929.run();
// Hee_Q1929.run();
// Doy_Q11653.run();
// Hee_Q11653.run();
// Doy_Q6588.run();
// Hee_Q6588.run();
Doy_Q1676.run();
>>>>>>>
// Doy_Q1929.run();
// Hee_Q1929.run();
// Doy_Q11653.run();
// Hee_Q11653.run();
// Doy_Q6588.run();
// Hee_Q6588.run();
// Doy_Q1676.run();
Hee_Q1676.run(); |
<<<<<<<
// Hee_Q1707.run();
Hee_Q2178.run();
=======
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
Hee_Q7576.run();
// Hee_Q15686.run();
>>>>>>>
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
// Hee_Q7576.run();
Hee_Q2178.run();
// Hee_Q15686.run(); |
<<<<<<<
// Hee_Q1707.run();
Hee_Q2146.run();
=======
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
// Hee_Q7576.run();
Hee_Q2178.run();
// Hee_Q15686.run();
>>>>>>>
// Hee_Q2331.run();
// Hee_Q11724.run();
// Hee_Q1922.run();
// Hee_Q1707.run();
// Hee_Q11725.run();
// Hee_Q1167.run();
// Hee_Q1967.run();
// Hee_Q2805.run();
// Hee_Q2110.run();
// Hee_Q1260.run();
// Hee_Q10451.run();
// Hee_Q9466.run();
// Hee_Q2667.run();
// Hee_Q4963.run();
// Hee_Q7576.run();
// Hee_Q2178.run();
Hee_Q2146.run();
// Hee_Q15686.run(); |
<<<<<<<
// Doy_Q1991.run();
Hee_Q1654.run();
=======
// Doy_Q1991.run();
Hee_Q1991.run();
>>>>>>>
// Doy_Q1991.run();
// Hee_Q1991.run();
Hee_Q1654.run(); |
<<<<<<<
import hee.datastructure1.*;
=======
import hee.datastructure1.*;
import hee.datastructure2.*;
>>>>>>>
import hee.datastructure1.*;
import hee.datastructure2.*;
<<<<<<<
// Hee_Q10828.run();
Hee_Q10808.run();
=======
Hee_Q10820.run();
Hee_Q10809.run();
Hee_Q2743.run();
Hee_Q11655.run();
Hee_Q10824.run();
Hee_Q11656.run();
Hee_Q3015.run();
// Hee_Q10828.run();
// Doy_Q10828.run();
// Hee_Q9012.run();
// Doy_Q9012.run();
// Doy_Q10799.run();
Hee_Q11723.run();
Hee_Q1927.run();
Hee_Q7785.run();
Hee_Q1764.run();
Hee_Q11279.run();
Hee_Q1717.run();
Hee_Q4195.run();
>>>>>>>
// Hee_Q10828.run();
Hee_Q10808.run();
Hee_Q10820.run();
Hee_Q10809.run();
Hee_Q2743.run();
Hee_Q11655.run();
Hee_Q10824.run();
Hee_Q11656.run();
Hee_Q3015.run();
// Hee_Q10828.run();
// Doy_Q10828.run();
// Hee_Q9012.run();
// Doy_Q9012.run();
// Doy_Q10799.run();
Hee_Q11723.run();
Hee_Q1927.run();
Hee_Q7785.run();
Hee_Q1764.run();
Hee_Q11279.run();
Hee_Q1717.run();
Hee_Q4195.run(); |
<<<<<<<
import hee.datastructure2.Hee_Q1927;
=======
import hee.datastructure2.*;
>>>>>>>
import hee.datastructure2.*;
<<<<<<<
Hee_Q1927.run();
=======
Hee_Q7785.run();
Hee_Q1764.run();
>>>>>>>
Hee_Q1927.run();
Hee_Q7785.run();
Hee_Q1764.run(); |
<<<<<<<
// Hee_Q2751.run();
Doy_Q10814.run();
=======
// Doy_Q2751.run();
// Hee_Q2751.run();
Doy_Q11650.run();
>>>>>>>
// Doy_Q2751.run();
// Hee_Q2751.run();
// Doy_Q11650.run();
Doy_Q10814.run(); |
<<<<<<<
// Hee_Q15686.run();
Doy_Q15686.run();
=======
// Hee_Q15686.run();
Hee_Q15685.run();
>>>>>>>
// Hee_Q15686.run();
Doy_Q15686.run();
// Hee_Q15685.run(); |
<<<<<<<
import hee.datastructure1.*;
=======
import hee.datastructure1.*;
import hee.datastructure2.*;
>>>>>>>
import hee.datastructure1.*;
import hee.datastructure2.*;
<<<<<<<
// Hee_Q10972.run();
Hee_Q11655.run();
=======
// Hee_Q10972.run();
Hee_Q10824.run();
Hee_Q11656.run();
Hee_Q3015.run();
// Hee_Q10828.run();
// Doy_Q10828.run();
// Hee_Q9012.run();
// Doy_Q9012.run();
// Doy_Q10799.run();
Hee_Q11723.run();
Hee_Q1927.run();
Hee_Q7785.run();
Hee_Q1764.run();
// Doy_Q10799.run();
Hee_Q11279.run();
Hee_Q1717.run();
Hee_Q4195.run();
>>>>>>>
// Hee_Q10972.run();
Hee_Q11655.run();
Hee_Q10824.run();
Hee_Q11656.run();
Hee_Q3015.run();
// Hee_Q10828.run();
// Doy_Q10828.run();
// Hee_Q9012.run();
// Doy_Q9012.run();
// Doy_Q10799.run();
Hee_Q11723.run();
Hee_Q1927.run();
Hee_Q7785.run();
Hee_Q1764.run();
Hee_Q11279.run();
Hee_Q1717.run();
Hee_Q4195.run(); |
<<<<<<<
// Hee_Q11005.run();
Doy_Q2745.run();
=======
// Hee_Q11005.run();
Hee_Q2745.run();
>>>>>>>
// Hee_Q11005.run();
Doy_Q2745.run();
// Hee_Q2745.run(); |
<<<<<<<
Hee_Q2609.run();
=======
Doy_Q2609.run();
// Hee_Q2609.run();
Doy_Q1934.run();
>>>>>>>
// Doy_Q2609.run();
Hee_Q2609.run();
// Doy_Q1934.run(); |
<<<<<<<
int saveCount = Math.min(SurespotConfiguration.SAVE_MESSAGE_MINIMUM, messages.size());
=======
>>>>>>>
<<<<<<<
if (currentScrollPosition > -1) {
int saveSize = messagesSize - currentScrollPosition;
int saveSizePlusBuffer = saveSize + SurespotConfiguration.SAVE_MESSAGE_MINIMUM;
saveCount = saveSizePlusBuffer > messagesSize ? messagesSize : saveSizePlusBuffer;
returnScrollPosition = saveCount - saveSize;
}
SurespotLog.v(TAG, "saving %d messages for spot %s, returnScrollPosition: %d", saveCount, spot, returnScrollPosition);
=======
SurespotLog.v(TAG, "saving %d messages for spot %s", saveCount, spot);
>>>>>>>
SurespotLog.v(TAG, "saving %d messages for spot %s", saveCount, spot); |
<<<<<<<
public static String getRealPathFromURI(Context context, Uri contentUri) {
if (Build.VERSION.SDK_INT >= 19) {
return getRealPathFromURI_API19(context, contentUri);
}
else {
return getRealPathFromURI_API11to18(context, contentUri);
}
}
=======
public static void setImageViewLayout(ImageView imageView, int width, int height) {
// double widthRatio = (double) SurespotConfiguration.getImageDisplayHeight() / height;
// double heightRatio = (double) SurespotConfiguration.getImageDisplayWidth() - widthOffset / width
//SurespotLog.d(TAG, "widthMultiplier %f for iv %s", widthMultiplier,message.getIv());
ViewGroup.LayoutParams params = imageView.getLayoutParams();
if (params != null) {
params.height = SurespotConfiguration.getImageDisplayHeight();
}
// imageView.getLayoutParams().width = height > width ? width : SurespotConfiguration.getImageDisplaWidth();
}
>>>>>>>
public static String getRealPathFromURI(Context context, Uri contentUri) {
if (Build.VERSION.SDK_INT >= 19) {
return getRealPathFromURI_API19(context, contentUri);
}
else {
return getRealPathFromURI_API11to18(context, contentUri);
}
}
public static void setImageViewLayout(ImageView imageView, int width, int height) {
// double widthRatio = (double) SurespotConfiguration.getImageDisplayHeight() / height;
// double heightRatio = (double) SurespotConfiguration.getImageDisplayWidth() - widthOffset / width
//SurespotLog.d(TAG, "widthMultiplier %f for iv %s", widthMultiplier,message.getIv());
ViewGroup.LayoutParams params = imageView.getLayoutParams();
if (params != null) {
params.height = SurespotConfiguration.getImageDisplayHeight();
}
// imageView.getLayoutParams().width = height > width ? width : SurespotConfiguration.getImageDisplaWidth();
} |
<<<<<<<
double ratio = includeReferenceCharts() ? TABLE_RATIO : 1.0;
RecordSheetOptions subOptions = new RecordSheetOptions(options);
subOptions.setReferenceCharts(false);
PrintRecordSheet sheet = new PrintTank(tank1, getFirstPage(), subOptions);
sheet.createDocument(startPage, pageFormat);
=======
PrintRecordSheet sheet = new PrintTank(tank1, getFirstPage(), options);
sheet.createDocument(startPage, pageFormat, false);
>>>>>>>
double ratio = includeReferenceCharts() ? TABLE_RATIO : 1.0;
RecordSheetOptions subOptions = new RecordSheetOptions(options);
subOptions.setReferenceCharts(false);
PrintRecordSheet sheet = new PrintTank(tank1, getFirstPage(), subOptions);
sheet.createDocument(startPage, pageFormat, false);
<<<<<<<
String.format("%s(%f 0 0 %f 0 %f)", SVGConstants.SVG_MATRIX_VALUE,
ratio, ratio, pageFormat.getImageableY()));
=======
String.format("%s(%f %f)", SVGConstants.SVG_TRANSLATE_VALUE,
pageFormat.getImageableX(),
pageFormat.getImageableY()));
>>>>>>>
String.format("%s(%f 0 0 %f %f %f)", SVGConstants.SVG_MATRIX_VALUE,
ratio, ratio, pageFormat.getImageableX(), pageFormat.getImageableY()));
<<<<<<<
String.format("%s(%f 0 0 %f 0 %f)", SVGConstants.SVG_MATRIX_VALUE,
ratio, ratio, pageFormat.getImageableHeight() * 0.5 * ratio));
=======
String.format("%s(%f %f)", SVGConstants.SVG_TRANSLATE_VALUE,
pageFormat.getImageableX(),
pageFormat.getImageableHeight() * 0.5 + pageFormat.getImageableY()));
>>>>>>>
String.format("%s(%f 0 0 %f %f %f)", SVGConstants.SVG_MATRIX_VALUE,
ratio, ratio, pageFormat.getImageableX(), pageFormat.getImageableHeight() * 0.5 * ratio)); |
<<<<<<<
import pneumaticCraft.common.thirdparty.ModInteractionUtils;
=======
import pneumaticCraft.common.network.DescSynced;
import pneumaticCraft.common.network.GuiSynced;
>>>>>>>
import pneumaticCraft.common.thirdparty.ModInteractionUtils;
<<<<<<<
private final TileEntityPneumaticBase vacuumHandler = new TileEntityPneumaticBase(5, 7, PneumaticValues.VOLUME_VACUUM_PUMP){
@Override
public List<Pair<ForgeDirection, IPneumaticMachine>> getConnectedPneumatics(){
List<Pair<ForgeDirection, IPneumaticMachine>> teList = new ArrayList<Pair<ForgeDirection, IPneumaticMachine>>();
ForgeDirection direction = getVacuumSide();
TileEntity te = getTileCache()[direction.ordinal()].getTileEntity();
IPneumaticMachine machine = ModInteractionUtils.getInstance().getMachine(te);
if(machine != null && isConnectedTo(direction) && machine.isConnectedTo(direction.getOpposite())) {
teList.add(new ImmutablePair(direction, machine));
}
return teList;
}
@Override
protected boolean saveTeInternals(){
return false;
}
};
=======
@GuiSynced
public int vacuumAir;
>>>>>>>
@GuiSynced
private final TileEntityPneumaticBase vacuumHandler = new TileEntityPneumaticBase(5, 7, PneumaticValues.VOLUME_VACUUM_PUMP){
@Override
public List<Pair<ForgeDirection, IPneumaticMachine>> getConnectedPneumatics(){
List<Pair<ForgeDirection, IPneumaticMachine>> teList = new ArrayList<Pair<ForgeDirection, IPneumaticMachine>>();
ForgeDirection direction = getVacuumSide();
TileEntity te = getTileCache()[direction.ordinal()].getTileEntity();
IPneumaticMachine machine = ModInteractionUtils.getInstance().getMachine(te);
if(machine != null && isConnectedTo(direction) && machine.isConnectedTo(direction.getOpposite())) {
teList.add(new ImmutablePair(direction, machine));
}
return teList;
}
@Override
protected boolean saveTeInternals(){
return false;
}
};
<<<<<<<
if(teList.size() == 0) airLeak(getInputSide());
teList = vacuumHandler.getConnectedPneumatics();
if(teList.size() == 0) vacuumHandler.airLeak(getVacuumSide());
if(!worldObj.isRemote && numUsingPlayers > 0) {
sendDescriptionPacket();
}
=======
boolean inputSideConnected = false;
boolean vacuumSideConnected = false;
for(Pair<ForgeDirection, IPneumaticMachine> entry : teList) {
if(entry.getKey().equals(getInputSide())) inputSideConnected = true;
if(entry.getKey().equals(getVacuumSide())) vacuumSideConnected = true;
}
if(!inputSideConnected) airLeak(getInputSide());
if(!vacuumSideConnected) airLeak(getVacuumSide());
>>>>>>>
if(teList.size() == 0) airLeak(getInputSide());
teList = vacuumHandler.getConnectedPneumatics();
if(teList.size() == 0) vacuumHandler.airLeak(getVacuumSide()); |
<<<<<<<
@Override
public String toString() {
return "OrVnfmScalingMessage{" +
"component=" + component +
", vnfcInstance=" + vnfcInstance +
", virtualNetworkFunctionRecord=" + virtualNetworkFunctionRecord +
", dependency=" + dependency +
", mode='" + mode + '\'' +
"} " + super.toString();
}
=======
>>>>>>> |
<<<<<<<
import org.openbaton.catalogue.mano.descriptor.*;
import org.openbaton.catalogue.mano.record.NetworkServiceRecord;
import org.openbaton.catalogue.mano.record.Status;
import org.openbaton.catalogue.mano.record.VNFCInstance;
import org.openbaton.catalogue.mano.record.VNFRecordDependency;
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord;
import org.openbaton.catalogue.nfvo.Action;
import org.openbaton.catalogue.nfvo.ApplicationEventNFVO;
import org.openbaton.catalogue.nfvo.ConfigurationParameter;
import org.openbaton.catalogue.nfvo.HistoryLifecycleEvent;
import org.openbaton.catalogue.nfvo.Network;
import org.openbaton.catalogue.nfvo.Quota;
import org.openbaton.catalogue.nfvo.Subnet;
import org.openbaton.catalogue.nfvo.VNFCDependencyParameters;
import org.openbaton.catalogue.nfvo.VNFPackage;
import org.openbaton.catalogue.nfvo.VimInstance;
import org.openbaton.catalogue.nfvo.VnfmManagerEndpoint;
=======
import org.openbaton.catalogue.mano.descriptor.*;
import org.openbaton.catalogue.mano.record.*;
import org.openbaton.catalogue.nfvo.*;
>>>>>>>
import org.openbaton.catalogue.mano.descriptor.*;
import org.openbaton.catalogue.mano.record.NetworkServiceRecord;
import org.openbaton.catalogue.mano.record.Status;
import org.openbaton.catalogue.mano.record.VNFCInstance;
import org.openbaton.catalogue.mano.record.VNFRecordDependency;
import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord;
import org.openbaton.catalogue.nfvo.*;
import org.openbaton.catalogue.nfvo.Action;
import org.openbaton.catalogue.nfvo.ApplicationEventNFVO;
import org.openbaton.catalogue.nfvo.ConfigurationParameter;
import org.openbaton.catalogue.nfvo.HistoryLifecycleEvent;
import org.openbaton.catalogue.nfvo.Network;
import org.openbaton.catalogue.nfvo.Quota;
import org.openbaton.catalogue.nfvo.Subnet;
import org.openbaton.catalogue.nfvo.VNFCDependencyParameters;
import org.openbaton.catalogue.nfvo.VNFPackage;
import org.openbaton.catalogue.nfvo.VimInstance;
import org.openbaton.catalogue.nfvo.VnfmManagerEndpoint;
<<<<<<<
BadRequestException {
log.info("Looking for NetworkServiceDescriptor with ID: " + idNsd);
NetworkServiceDescriptor networkServiceDescriptor =
nsdRepository.findFirstByIdAndProjectId(idNsd, projectID);
=======
BadRequestException, IOException, AlreadyExistingException, BadFormatException,
ExecutionException, InterruptedException {
log.info("Looking for NetworkServiceDescriptor with id: " + idNsd);
NetworkServiceDescriptor networkServiceDescriptor = nsdRepository.findFirstById(idNsd);
>>>>>>>
BadRequestException, IOException, AlreadyExistingException, BadFormatException,
ExecutionException, InterruptedException {
log.info("Looking for NetworkServiceDescriptor with ID: " + idNsd);
NetworkServiceDescriptor networkServiceDescriptor =
nsdRepository.findFirstByIdAndProjectId(idNsd, projectID);
<<<<<<<
if (vimInstanceNames == null || vimInstanceNames.isEmpty()) {
=======
if (vimInstanceNames == null || vimInstanceNames.isEmpty()) {
vimInstanceNames = new ArrayList<>();
>>>>>>>
if (vimInstanceNames == null || vimInstanceNames.isEmpty()) {
vimInstanceNames = new ArrayList<>();
<<<<<<<
throws BadFormatException, NotFoundException {
=======
throws BadFormatException, NotFoundException, ExecutionException, InterruptedException {
>>>>>>>
throws BadFormatException, NotFoundException, ExecutionException, InterruptedException {
<<<<<<<
throws NotFoundException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id, projectId);
=======
throws NotFoundException, BadFormatException, ExecutionException, InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id);
if (!networkServiceRecord.getProjectId().equals(projectId)) {
throw new UnauthorizedUserException(
"NSR not under the project chosen, are you trying to hack us? Just kidding, it's a bug :)");
}
>>>>>>>
throws NotFoundException, BadFormatException, ExecutionException, InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id, projectId);
<<<<<<<
throws NotFoundException, WrongStatusException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInActiveState(id, projectId);
=======
throws NotFoundException, WrongStatusException, BadFormatException, ExecutionException,
InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInActiveState(id);
if (!networkServiceRecord.getProjectId().equals(projectId)) {
throw new UnauthorizedUserException(
"NSR not under the project chosen, are you trying to hack us? Just kidding, it's a bug :)");
}
>>>>>>>
throws NotFoundException, WrongStatusException, BadFormatException, ExecutionException,
InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInActiveState(id, projectId);
<<<<<<<
public void resume(String id, String projectId) throws NotFoundException, WrongStatusException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id, projectId);
=======
public void resume(String id, String projectId)
throws NotFoundException, WrongStatusException, BadFormatException, ExecutionException,
InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id);
if (!networkServiceRecord.getProjectId().equals(projectId)) {
throw new UnauthorizedUserException(
"NSR not under the project chosen, are you trying to hack us? Just kidding, it's a bug :)");
}
>>>>>>>
public void resume(String id, String projectId)
throws NotFoundException, WrongStatusException, BadFormatException, ExecutionException,
InterruptedException {
NetworkServiceRecord networkServiceRecord = getNetworkServiceRecordInAnyState(id, projectId); |
<<<<<<<
=======
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.TimeoutException;
import javax.annotation.PostConstruct;
>>>>>>>
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.TimeoutException;
import javax.annotation.PostConstruct;
<<<<<<<
import javax.annotation.PostConstruct;
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.TimeoutException;
/**
* Created by lto on 23/09/15.
*/
=======
/** Created by lto on 23/09/15. */
>>>>>>>
import javax.annotation.PostConstruct;
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.TimeoutException;
/**
* Created by lto on 23/09/15.
*/ |
<<<<<<<
protected int hb_version = 0;
/**
* extId of the network to attach
*/
protected String extId;
=======
protected int version = 0;
>>>>>>>
protected int hb_version = 0;
/**
* extId of the network to attach
*/
protected String extId;
<<<<<<<
protected String connectivity_type;
/**
* Name referenced by VNFCs
*/
protected String name;
=======
private String connectivity_type;
public AbstractVirtualLink() {
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
>>>>>>>
protected String connectivity_type;
/**
* Name referenced by VNFCs
*/
protected String name;
<<<<<<<
public AbstractVirtualLink() {
}
=======
>>>>>>>
public AbstractVirtualLink() {
} |
<<<<<<<
for (Network net : vimInstance.getNetworks())
if (vnfdConnectionPoint.getVirtual_link_reference().equals(net.getName()))
networks.add(net.getExtId());
=======
for (InternalVirtualLink internalVirtualLink : vnfr.getVirtual_link()) {
log.debug("InternalVirtualLink is: " + internalVirtualLink);
if (vnfdConnectionPoint. getVirtual_link_reference().equals(internalVirtualLink.getName())) {
networks.add(internalVirtualLink.getExtId());
}
}
>>>>>>>
for (Network net : vimInstance.getNetworks())
if (vnfdConnectionPoint.getVirtual_link_reference().equals(net.getName()))
networks.add(net.getExtId());
<<<<<<<
String hostname = vdu.getHostname() + "-" + ((int) (Math.random() * 1000));
=======
String hostname = vdu.getHostname() + "-" + ((int)(Math.random()*1000));
log.debug("Generated Hostname: " + hostname);
>>>>>>>
String hostname = vdu.getHostname() + "-" + ((int) (Math.random() * 1000));
log.debug("Generated Hostname: " + hostname);
<<<<<<<
=======
vdu.getVnfc_instance().add(vnfcInstance);
log.info("Launched VNFCInstance: " + vnfcInstance + " on VimInstance " + vimInstance.getName());
>>>>>>>
log.info("Launched VNFCInstance: " + vnfcInstance + " on VimInstance " + vimInstance.getName());
<<<<<<<
for (DeploymentFlavour deploymentFlavour : vimInstance.getFlavours()) {
if (deploymentFlavour.getFlavour_key().equals(key) || deploymentFlavour.getExtId().equals(key) || deploymentFlavour.getId().equals(key)) {
=======
log.debug("Finding DeploymentFlavor with name: " + key + " on VimInstance " + vimInstance.getName());
for (DeploymentFlavour deploymentFlavour : vimInstance.getFlavours()){
if (deploymentFlavour.getFlavour_key().equals(key) || deploymentFlavour.getExtId().equals(key) || deploymentFlavour.getId().equals(key)){
log.debug("Found DeploymentFlavour with ExtId: " + deploymentFlavour.getExtId() + " of DeploymentFlavour with name: " + key + " on VimInstance " + vimInstance.getName());
>>>>>>>
log.debug("Finding DeploymentFlavor with name: " + key + " on VimInstance " + vimInstance.getName());
for (DeploymentFlavour deploymentFlavour : vimInstance.getFlavours()) {
if (deploymentFlavour.getFlavour_key().equals(key) || deploymentFlavour.getExtId().equals(key) || deploymentFlavour.getId().equals(key)) {
log.debug("Found DeploymentFlavour with ExtId: " + deploymentFlavour.getExtId() + " of DeploymentFlavour with name: " + key + " on VimInstance " + vimInstance.getName()); |
<<<<<<<
import org.springframework.boot.autoconfigure.domain.EntityScan;
=======
import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration;
import org.springframework.boot.orm.jpa.EntityScan;
>>>>>>>
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration; |
<<<<<<<
import org.project.openbaton.catalogue.nfvo.messages.OrVnfmGenericMessage;
import org.project.openbaton.nfvo.common.exceptions.NotFoundException;
=======
import org.project.openbaton.exceptions.*;
>>>>>>>
import org.project.openbaton.exceptions.*;
import org.project.openbaton.catalogue.nfvo.messages.OrVnfmGenericMessage; |
<<<<<<<
public static final ResourceLocation MODEL_PLASTIC_MIXER = new ResourceLocation(MODEL_LOCATION + "plasticMixer.png");
=======
public static final ResourceLocation MODEL_PNEUMATIC_DYNAMO_ON = new ResourceLocation(MODEL_LOCATION + "pneumaticDynamoOn.png");
public static final ResourceLocation MODEL_PNEUMATIC_DYNAMO_OFF = new ResourceLocation(MODEL_LOCATION + "pneumaticDynamoOff.png");
>>>>>>>
public static final ResourceLocation MODEL_PNEUMATIC_DYNAMO_ON = new ResourceLocation(MODEL_LOCATION + "pneumaticDynamoOn.png");
public static final ResourceLocation MODEL_PNEUMATIC_DYNAMO_OFF = new ResourceLocation(MODEL_LOCATION + "pneumaticDynamoOff.png");
public static final ResourceLocation MODEL_PLASTIC_MIXER = new ResourceLocation(MODEL_LOCATION + "plasticMixer.png"); |
<<<<<<<
import org.openbaton.catalogue.nfvo.networks.BaseNetwork;
import org.openbaton.catalogue.nfvo.networks.DockerNetwork;
import org.openbaton.catalogue.nfvo.networks.Network;
import org.openbaton.catalogue.nfvo.networks.Subnet;
=======
>>>>>>>
import org.openbaton.catalogue.nfvo.networks.BaseNetwork;
import org.openbaton.catalogue.nfvo.networks.DockerNetwork;
import org.openbaton.catalogue.nfvo.networks.Network;
import org.openbaton.catalogue.nfvo.networks.Subnet;
<<<<<<<
throws NotFoundException, MissingParameterException, VimException, BadRequestException,
PluginException {
//Check if the NSR exists
log.info("Looking for NetworkServiceRecord with id: " + nsrId);
=======
throws NotFoundException {
log.info("Looking for NetworkServiceDescriptor with id: " + nsrId);
>>>>>>>
throws NotFoundException, BadRequestException, MissingParameterException {
//Check if the NSR exists
log.info("Looking for NetworkServiceRecord with id: " + nsrId); |
<<<<<<<
import org.project.openbaton.catalogue.nfvo.Configuration;
import org.project.openbaton.catalogue.nfvo.ConfigurationParameter;
=======
>>>>>>>
import org.project.openbaton.catalogue.nfvo.Configuration;
import org.project.openbaton.catalogue.nfvo.ConfigurationParameter; |
<<<<<<<
NetworkServiceRecord createRecord(
@RequestBody @Valid NetworkServiceDescriptor networkServiceDescriptor) {
return networkServiceRecordManagement.onboard(networkServiceDescriptor);
=======
NetworkServiceRecord createRecord(@RequestBody @Valid NetworkServiceDescriptor networkServiceDescriptor) {
try {
return networkServiceRecordManagement.onboard(networkServiceDescriptor);
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (VimException e) {
e.printStackTrace();
}
return null;//TODO return error
>>>>>>>
NetworkServiceRecord createRecord(@RequestBody @Valid NetworkServiceDescriptor networkServiceDescriptor) {
try {
return networkServiceRecordManagement.onboard(networkServiceDescriptor);
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;//TODO return error |
<<<<<<<
/**
* Control the max length for request and response content that will be retained.
* The transaction will still be recorded but the content itself will not be if it
* goes over the max length set.
*
* @param max the max length for request/response content.
* @return The {@link ChuckInterceptor} instance.
*/
public ChuckInterceptor maxContentLength(long max) {
this.maxContentLength = max;
return this;
}
=======
/**
* Set the retention period for HTTP transaction data captured by this interceptor.
* The default is one week.
*
* @param period the peroid for which to retain HTTP transaction data.
* @return The {@link ChuckInterceptor} instance.
*/
public ChuckInterceptor retainDataFor(Period period) {
retentionManager = new RetentionManager(context, period);
return this;
}
>>>>>>>
/**
* Control the max length for request and response content that will be retained.
* The transaction will still be recorded but the content itself will not be if it
* goes over the max length set.
*
* @param max the max length for request/response content.
* @return The {@link ChuckInterceptor} instance.
*/
public ChuckInterceptor maxContentLength(long max) {
this.maxContentLength = max;
}
/**
* Set the retention period for HTTP transaction data captured by this interceptor.
* The default is one week.
*
* @param period the peroid for which to retain HTTP transaction data.
* @return The {@link ChuckInterceptor} instance.
*/
public ChuckInterceptor retainDataFor(Period period) {
retentionManager = new RetentionManager(context, period);
return this;
} |
<<<<<<<
=======
import static org.mockito.Mockito.mock;
import javax.sound.midi.Receiver;
>>>>>>>
import static org.mockito.Mockito.mock;
<<<<<<<
import javax.sound.midi.Receiver;
import static org.mockito.Mockito.mock;
=======
>>>>>>>
import javax.sound.midi.Receiver; |
<<<<<<<
//in viewpager
if (mTranslateY == 0 && mTranslateX != 0) {
mScale = 1;
return super.dispatchTouchEvent(event);
}
=======
>>>>>>>
//in viewpager
if (mTranslateY == 0 && mTranslateX != 0) {
mScale = 1;
return super.dispatchTouchEvent(event);
}
<<<<<<<
if (mTranslateX == 0 && mTranslateY == 0 && canFinish) {
=======
if (mTranslateX == 0&&mTranslateY == 0 && canFinish) {
>>>>>>>
if (mTranslateX == 0 && mTranslateY == 0 && canFinish) { |
<<<<<<<
FtcDashboard.start();
=======
// check to see if there is a preferred Wi-Fi to use.
checkPreferredChannel();
>>>>>>>
// check to see if there is a preferred Wi-Fi to use.
checkPreferredChannel();
FtcDashboard.start(); |
<<<<<<<
=======
import com.tweetlanes.android.core.AppSettings;
import org.tweetalib.android.TwitterFetchResult;
import org.tweetalib.android.TwitterFetchUser;
import org.tweetalib.android.TwitterManager;
import org.tweetalib.android.model.TwitterUser;
>>>>>>>
import com.tweetlanes.android.core.AppSettings; |
<<<<<<<
AccountDescriptor account = new AccountDescriptor(user,
oAuthToken, oAuthSecret, oSocialNetType);
=======
AccountDescriptor account = new AccountDescriptor(this, user,
oAuthToken, oAuthSecret);
>>>>>>>
AccountDescriptor account = new AccountDescriptor(this, user,
oAuthToken, oAuthSecret, oSocialNetType);
<<<<<<<
Constant.LaneType.PROFILE_PROFILE_TIMELINE, getContext()
.getString(socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_profile_tweets : R
.string.lane_profile_tweets_adn),
=======
Constant.LaneType.PROFILE_PROFILE_TIMELINE,
getString(R.string.lane_profile_tweets),
>>>>>>>
Constant.LaneType.PROFILE_PROFILE_TIMELINE, getString(socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_profile_tweets : R
.string.lane_profile_tweets_adn),
<<<<<<<
mProfileLaneDefinitions.add(new LaneDescriptor(
Constant.LaneType.PROFILE_FAVORITES, getContext().getString(
R.string.lane_profile_favorites),
new TwitterContentHandleBase(
TwitterConstant.ContentType.STATUSES,
TwitterConstant.StatusesType.USER_FAVORITES)));
=======
if (Constant.SOCIAL_NET_TYPE == SocialNetConstant.Type.Twitter) {
mProfileLaneDefinitions.add(new LaneDescriptor(
Constant.LaneType.PROFILE_FAVORITES,
getString(R.string.lane_profile_favorites),
new TwitterContentHandleBase(
TwitterConstant.ContentType.STATUSES,
TwitterConstant.StatusesType.USER_FAVORITES)));
}
>>>>>>>
mProfileLaneDefinitions.add(new LaneDescriptor(
Constant.LaneType.PROFILE_FAVORITES,
getString(R.string.lane_profile_favorites),
new TwitterContentHandleBase(
TwitterConstant.ContentType.STATUSES,
TwitterConstant.StatusesType.USER_FAVORITES)));
<<<<<<<
Constant.LaneType.SEARCH_TERM, getContext().getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_search_tweets : R.string
.lane_search_tweets_adn),
=======
Constant.LaneType.SEARCH_TERM, getString(
R.string.lane_search_tweets),
>>>>>>>
Constant.LaneType.SEARCH_TERM, getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_search_tweets : R.string
.lane_search_tweets_adn),
<<<<<<<
Constant.LaneType.STATUS_SPOTLIGHT, getContext().getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_tweet_status : R.string
.lane_tweet_status_adn),
=======
Constant.LaneType.STATUS_SPOTLIGHT, getString(
R.string.lane_tweet_status),
>>>>>>>
Constant.LaneType.STATUS_SPOTLIGHT, getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_tweet_status : R.string
.lane_tweet_status_adn),
<<<<<<<
Constant.LaneType.STATUS_RETWEETED_BY, getContext().getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_tweet_retweeted_by : R.string
.lane_tweet_retweeted_by_adn),
=======
Constant.LaneType.STATUS_RETWEETED_BY, getString(
R.string.lane_tweet_retweeted_by),
>>>>>>>
Constant.LaneType.STATUS_RETWEETED_BY, getString(
socialNetType == SocialNetConstant.Type.Twitter ? R.string.lane_tweet_retweeted_by : R.string
.lane_tweet_retweeted_by_adn),
<<<<<<<
=======
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
mPreferences.edit().putInt(SHARED_PREFERENCES_KEY_VERSION,
Constant.SHARED_PREFERENCES_VERSION);
mAccounts = new ArrayList<AccountDescriptor>();
updateTwitterAccountCount();
AccountDescriptor currentAccountDescriptor = getCurrentAccount();
if (currentAccountDescriptor != null) {
TwitterManager.initModule(Constant.SOCIAL_NET_TYPE,
Constant.CONSUMER_KEY, Constant.CONSUMER_SECRET,
currentAccountDescriptor.getOAuthToken(),
currentAccountDescriptor.getOAuthSecret(),
mConnectionStatusCallbacks);
} else {
TwitterManager.initModule(Constant.SOCIAL_NET_TYPE,
Constant.CONSUMER_KEY, Constant.CONSUMER_SECRET, null,
null, mConnectionStatusCallbacks);
}
AppSettings.initModule(this);
NotificationHelper.initModule();
>>>>>>>
<<<<<<<
if (mContext != null) {
// URLImageViewHelper.emptyCache(mContext);
UrlImageViewHelper.cleanup(mContext);
}
=======
URLImageViewHelper.emptyCache(this);
>>>>>>>
UrlImageViewHelper.cleanup(this); |
<<<<<<<
// do refresh in a separate thread since building indexes depends on the repository being up and running
// which might not be the case. Doing a refresh in another thread will give the repository a chance to
// start up. We do this by calling the listener
this.listener.process(null);
=======
>>>>>>>
// do refresh in a separate thread since building indexes depends on the repository being up and running
// which might not be the case. Doing a refresh in another thread will give the repository a chance to
// start up. We do this by calling the listener
this.listener.process(null); |
<<<<<<<
import org.codehaus.jackson.JsonEncoding;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.util.ByteArrayBuilder;
import org.lilyproject.repository.api.IdGenerator;
import org.lilyproject.repository.api.SchemaId;
import org.lilyproject.util.ObjectUtils;
import org.lilyproject.util.json.JsonFormat;
=======
>>>>>>>
<<<<<<<
import java.util.List;
=======
import java.util.Map;
>>>>>>>
import java.util.List;
import java.util.Map;
<<<<<<<
private IndexSelection indexSelection;
=======
private Map<String, String> attributes;
>>>>>>>
private IndexSelection indexSelection;
private Map<String, String> attributes; |
<<<<<<<
import org.lilyproject.indexer.engine.DerefMap;
import org.lilyproject.indexer.engine.DerefMapHbaseImpl;
import org.lilyproject.indexer.engine.IndexLocker;
import org.lilyproject.indexer.engine.Indexer;
import org.lilyproject.indexer.engine.IndexerMetrics;
import org.lilyproject.indexer.engine.SolrClientConfig;
import org.lilyproject.indexer.engine.SolrShardManager;
import org.lilyproject.indexer.engine.SolrShardManagerImpl;
=======
import org.lilyproject.indexer.engine.IndexLocker;
import org.lilyproject.indexer.engine.Indexer;
import org.lilyproject.indexer.engine.IndexerMetrics;
import org.lilyproject.indexer.engine.SolrClientConfig;
import org.lilyproject.indexer.engine.SolrShardManager;
>>>>>>>
import org.lilyproject.indexer.engine.DerefMap;
import org.lilyproject.indexer.engine.DerefMapHbaseImpl;
import org.lilyproject.indexer.engine.IndexLocker;
import org.lilyproject.indexer.engine.Indexer;
import org.lilyproject.indexer.engine.IndexerMetrics;
import org.lilyproject.indexer.engine.SolrClientConfig;
import org.lilyproject.indexer.engine.SolrShardManager;
import org.lilyproject.indexer.engine.SolrShardManagerImpl;
<<<<<<<
import org.lilyproject.repository.api.BlobManager;
import org.lilyproject.repository.api.IdGenerator;
import org.lilyproject.repository.api.RecordId;
import org.lilyproject.repository.api.Repository;
import org.lilyproject.repository.api.TypeManager;
import org.lilyproject.repository.impl.HBaseRepository;
import org.lilyproject.repository.impl.HBaseTypeManager;
import org.lilyproject.repository.impl.id.IdGeneratorImpl;
import org.lilyproject.rowlock.HBaseRowLocker;
import org.lilyproject.rowlock.RowLocker;
import org.lilyproject.rowlog.api.RowLog;
import org.lilyproject.util.hbase.HBaseTableFactory;
import org.lilyproject.util.hbase.HBaseTableFactoryImpl;
=======
import org.lilyproject.mapreduce.IdRecordMapper;
import org.lilyproject.mapreduce.IdRecordWritable;
import org.lilyproject.mapreduce.LilyMapReduceUtil;
import org.lilyproject.mapreduce.RecordIdWritable;
import org.lilyproject.repository.api.IdRecord;
import org.lilyproject.repository.api.RecordId;
import org.lilyproject.repository.api.Repository;
>>>>>>>
import org.lilyproject.mapreduce.IdRecordMapper;
import org.lilyproject.mapreduce.IdRecordWritable;
import org.lilyproject.mapreduce.LilyMapReduceUtil;
import org.lilyproject.mapreduce.RecordIdWritable;
import org.lilyproject.repository.api.IdGenerator;
import org.lilyproject.repository.api.IdRecord;
import org.lilyproject.repository.api.RecordId;
import org.lilyproject.repository.api.Repository;
<<<<<<<
import static org.lilyproject.util.hbase.LilyHBaseSchema.RecordCf;
import static org.lilyproject.util.hbase.LilyHBaseSchema.RecordColumn;
import static org.lilyproject.util.hbase.LilyHBaseSchema.getRecordTable;
public class IndexingMapper extends TableMapper<ImmutableBytesWritable, Result> {
private IdGenerator idGenerator;
=======
public class IndexingMapper extends IdRecordMapper<ImmutableBytesWritable, Result> {
>>>>>>>
public class IndexingMapper extends IdRecordMapper<ImmutableBytesWritable, Result> {
<<<<<<<
hbaseTableFactory = new HBaseTableFactoryImpl(conf);
TypeManager typeManager = new HBaseTypeManager(idGenerator, conf, zk, hbaseTableFactory);
RowLog wal = new DummyRowLog("The write ahead log should not be called from within MapReduce jobs.");
BlobManager blobManager = LilyClient.getBlobManager(zk, new HBaseConnections());
RowLocker rowLocker = new HBaseRowLocker(getRecordTable(hbaseTableFactory), RecordCf.DATA.bytes,
RecordColumn.LOCK.bytes, 10000);
repository = new HBaseRepository(typeManager, idGenerator, wal, hbaseTableFactory, blobManager, rowLocker);
=======
>>>>>>> |
<<<<<<<
enf = new EnfProc(this);
n = g.getEnvelopGraph().getNbNodes();
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet ker = g.getKernelGraph().getActiveNodes();
ISet succ;
for(int i=ker.getFirstElement();i>=0; i = ker.getNextElement()){
succ = g.getKernelGraph().getSuccessorsOf(i);
for(int j=succ.getFirstElement(); j>=0; j = succ.getNextElement()){
g.removeArc(j, i, this);
}
}
gdm.unfreeze();
}
@Override
public void propagate(AbstractFineEventRecorder eventRecorder, int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
gdm.forEachArc(enf, EventType.ENFORCEARC);
=======
enf = new EnfProc(this);
n = g.getEnvelopGraph().getNbNodes();
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
IActiveNodes ker = g.getKernelGraph().getActiveNodes();
INeighbors succ;
for (int i = ker.getFirstElement(); i >= 0; i = ker.getNextElement()) {
succ = g.getKernelGraph().getSuccessorsOf(i);
for (int j = succ.getFirstElement(); j >= 0; j = succ.getNextElement()) {
g.removeArc(j, i, aCause);
}
}
gdm.unfreeze();
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
gdm.forEachArc(enf, EventType.ENFORCEARC);
>>>>>>>
enf = new EnfProc(this);
n = g.getEnvelopGraph().getNbNodes();
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet ker = g.getKernelGraph().getActiveNodes();
ISet succ;
for(int i=ker.getFirstElement();i>=0; i = ker.getNextElement()){
succ = g.getKernelGraph().getSuccessorsOf(i);
for(int j=succ.getFirstElement(); j>=0; j = succ.getNextElement()){
g.removeArc(j, i, this);
}
}
gdm.unfreeze();
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
gdm.forEachArc(enf, EventType.ENFORCEARC);
<<<<<<<
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCEARC.mask;
}
@Override
public ESat isEntailed() {
ISet ker = g.getKernelGraph().getActiveNodes();
ISet succ;
for(int i=ker.getFirstElement();i>=0; i = ker.getNextElement()){
succ = g.getKernelGraph().getSuccessorsOf(i);
for(int j=succ.getFirstElement(); j>=0; j = succ.getNextElement()){
if(g.getKernelGraph().getSuccessorsOf(j).contain(i)){
return ESat.FALSE;
}
}
}
if(g.instantiated()){
return ESat.TRUE;
}
return ESat.UNDEFINED;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
/** Enable to remove the opposite arc */
private class EnfProc implements PairProcedure {
private final Propagator p;
public EnfProc(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if(from!=to){
g.removeArc(to, from, p);
}
}
}
=======
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCEARC.mask;
}
@Override
public ESat isEntailed() {
IActiveNodes ker = g.getKernelGraph().getActiveNodes();
INeighbors succ;
for (int i = ker.getFirstElement(); i >= 0; i = ker.getNextElement()) {
succ = g.getKernelGraph().getSuccessorsOf(i);
for (int j = succ.getFirstElement(); j >= 0; j = succ.getNextElement()) {
if (g.getKernelGraph().getSuccessorsOf(j).contain(i)) {
return ESat.FALSE;
}
}
}
if (g.instantiated()) {
return ESat.TRUE;
}
return ESat.UNDEFINED;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
/**
* Enable to remove the opposite arc
*/
private class EnfProc implements PairProcedure {
private final Propagator p;
public EnfProc(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if (from != to) {
g.removeArc(to, from, p);
}
}
}
>>>>>>>
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCEARC.mask;
}
@Override
public ESat isEntailed() {
ISet ker = g.getKernelGraph().getActiveNodes();
ISet succ;
for(int i=ker.getFirstElement();i>=0; i = ker.getNextElement()){
succ = g.getKernelGraph().getSuccessorsOf(i);
for(int j=succ.getFirstElement(); j>=0; j = succ.getNextElement()){
if(g.getKernelGraph().getSuccessorsOf(j).contain(i)){
return ESat.FALSE;
}
}
}
if(g.instantiated()){
return ESat.TRUE;
}
return ESat.UNDEFINED;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
/** Enable to remove the opposite arc */
private class EnfProc implements PairProcedure {
private final Propagator p;
public EnfProc(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if(from!=to){
g.removeArc(to, from, p);
}
}
} |
<<<<<<<
import solver.variables.VF;
=======
import solver.variables.VF;
import solver.variables.VariableFactory;
import util.tools.StringUtils;
>>>>>>>
import solver.variables.VF;
import util.tools.StringUtils;
<<<<<<<
Constraint cstr = null;
if (as.length == 1) {
if (as[0] == 1) {
cstr = ICF.arithm(bs[0], "=", c);
} else if (as[0] == -1) {
cstr = ICF.arithm(bs[0], "=", -c);
}
} else if (as.length == 2) {
if (as[0] == 1 && as[1] == 1) {
cstr = ICF.arithm(bs[0], "+", bs[1], "=", c);
} else if (as[0] == 1 && as[1] == -1) {
cstr = ICF.arithm(bs[0], "-", bs[1], "=", c);
} else if (as[0] == -1 && as[1] == 1) {
cstr = ICF.arithm(bs[1], "-", bs[0], "=", c);
} else if (as[0] == -1 && as[1] == -1) {
cstr = ICF.arithm(bs[0], "+", bs[1], "=", -c);
}
}
if (cstr == null) {
cstr = IntConstraintFactory.scalar(bs, as, "=", VF.fixed(c, solver));
}
cstr.reifyWith(r);
return new Constraint[0];
=======
int[] b = Scalar.getScalarBounds(bs,as);
IntVar p = VF.bounded(StringUtils.randomName(), b[0], b[1], solver);
solver.post(ICF.scalar(bs,as,p));
ICF.arithm(p,"=",c).reifyWith(r);
return new Constraint[]{};
>>>>>>>
Constraint cstr = null;
/*if (as.length == 1) {
if (as[0] == 1) {
cstr = ICF.arithm(bs[0], "=", c);
} else if (as[0] == -1) {
cstr = ICF.arithm(bs[0], "=", -c);
}
} else */if (as.length == 2) {
if (as[0] == 1 && as[1] == 1) {
cstr = ICF.arithm(bs[0], "+", bs[1], "=", c);
} else if (as[0] == 1 && as[1] == -1) {
cstr = ICF.arithm(bs[0], "-", bs[1], "=", c);
} else if (as[0] == -1 && as[1] == 1) {
cstr = ICF.arithm(bs[1], "-", bs[0], "=", c);
} else if (as[0] == -1 && as[1] == -1) {
cstr = ICF.arithm(bs[0], "+", bs[1], "=", -c);
}
}
if (cstr == null) {
int[] b = Scalar.getScalarBounds(bs, as);
IntVar p = VF.bounded(StringUtils.randomName(), b[0], b[1], solver);
solver.post(ICF.scalar(bs, as, p));
cstr = ICF.arithm(p, "=", c);
}
cstr.reifyWith(r);
return new Constraint[0]; |
<<<<<<<
import solver.variables.setDataStructures.ISet;
=======
import solver.variables.graph.IActiveNodes;
import solver.variables.graph.INeighbors;
>>>>>>>
import solver.variables.setDataStructures.ISet;
<<<<<<<
int min = efficientSearch();
k.updateLowerBound(min, this);
if(min == k.getUB()){
filter();
}
}
@Override
public void propagate(AbstractFineEventRecorder eventRecorder, int idxVarInProp, int mask) throws ContradictionException {
propagate(0);
}
private void filter() throws ContradictionException {
ISet nodes = g.getKernelGraph().getActiveNodes();
ISet nei;
int mate;
for(int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
if(!inMIS.get(i)){
mate = -1;
nei = g.getEnvelopGraph().getNeighborsOf(i);
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){
if(inMIS.get(j)){
if(mate == -1){
mate = j;
}else{
mate = -2;
break;
}
}
}
if(mate>=0){
g.enforceArc(i,mate,this);
}
}
}
}
private int simpleSearch(){
in.clear();
inMIS.clear();
int nb = 0;
ISet nodes = g.getKernelGraph().getActiveNodes();
for (int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
in.set(i);
nb++;
}
int idx = -1;
ISet nei;
int min = 0;
while (nb>0){
idx = in.nextSetBit(idx+1);
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for(int j=nei.getFirstElement(); j>=0; j = nei.getNextElement()){
if(in.get(j)){
in.clear(j);
nb--;
}
}
min ++;
}
return min;
}
private int efficientSearch(){
in.clear();
inMIS.clear();
int nb = 0;
ISet nodes = g.getKernelGraph().getActiveNodes();
for (int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
in.set(i);
nbNeighbors[i] = g.getEnvelopGraph().getNeighborsOf(i).getSize();
nb++;
}
int idx;
ISet nei;
TIntArrayList list = new TIntArrayList();
int min = 0;
while (nb>0){
idx = in.nextSetBit(0);
for(int i=in.nextSetBit(idx+1);i>=0;i=in.nextSetBit(i+1)){
if(nbNeighbors[i]<nbNeighbors[idx]){
idx = i;
}
}
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for(int j=nei.getFirstElement(); j>=0; j = nei.getNextElement()){
if(in.get(j)){
in.clear(j);
nb--;
list.add(j);
}
}
for(int i=list.size()-1;i>=0;i--){
nei = g.getEnvelopGraph().getNeighborsOf(list.get(i));
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){
=======
int min = efficientSearch();
k.updateLowerBound(min, aCause);
if (min == k.getUB()) {
filter();
}
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
propagate(0);
}
private void filter() throws ContradictionException {
IActiveNodes nodes = g.getKernelGraph().getActiveNodes();
INeighbors nei;
int mate;
for (int i = nodes.getFirstElement(); i >= 0; i = nodes.getNextElement()) {
if (!inMIS.get(i)) {
mate = -1;
nei = g.getEnvelopGraph().getNeighborsOf(i);
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (inMIS.get(j)) {
if (mate == -1) {
mate = j;
} else {
mate = -2;
break;
}
}
}
if (mate >= 0) {
g.enforceArc(i, mate, aCause);
}
}
}
}
private int simpleSearch() {
in.clear();
inMIS.clear();
int nb = 0;
IActiveNodes nodes = g.getKernelGraph().getActiveNodes();
for (int i = nodes.getFirstElement(); i >= 0; i = nodes.getNextElement()) {
in.set(i);
nb++;
}
int idx = -1;
INeighbors nei;
int min = 0;
while (nb > 0) {
idx = in.nextSetBit(idx + 1);
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (in.get(j)) {
in.clear(j);
nb--;
}
}
min++;
}
return min;
}
private int efficientSearch() {
in.clear();
inMIS.clear();
int nb = 0;
IActiveNodes nodes = g.getKernelGraph().getActiveNodes();
for (int i = nodes.getFirstElement(); i >= 0; i = nodes.getNextElement()) {
in.set(i);
nbNeighbors[i] = g.getEnvelopGraph().getNeighborsOf(i).neighborhoodSize();
nb++;
}
int idx;
INeighbors nei;
TIntArrayList list = new TIntArrayList();
int min = 0;
while (nb > 0) {
idx = in.nextSetBit(0);
for (int i = in.nextSetBit(idx + 1); i >= 0; i = in.nextSetBit(i + 1)) {
if (nbNeighbors[i] < nbNeighbors[idx]) {
idx = i;
}
}
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (in.get(j)) {
in.clear(j);
nb--;
list.add(j);
}
}
for (int i = list.size() - 1; i >= 0; i--) {
nei = g.getEnvelopGraph().getNeighborsOf(list.get(i));
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
>>>>>>>
int min = efficientSearch();
k.updateLowerBound(min, this);
if(min == k.getUB()){
filter();
}
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
propagate(0);
}
private void filter() throws ContradictionException {
ISet nodes = g.getKernelGraph().getActiveNodes();
ISet nei;
int mate;
for(int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
if(!inMIS.get(i)){
mate = -1;
nei = g.getEnvelopGraph().getNeighborsOf(i);
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){
if(inMIS.get(j)){
if(mate == -1){
mate = j;
}else{
mate = -2;
break;
}
}
}
if(mate>=0){
g.enforceArc(i,mate,this);
}
}
}
}
private int simpleSearch(){
in.clear();
inMIS.clear();
int nb = 0;
ISet nodes = g.getKernelGraph().getActiveNodes();
for (int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
in.set(i);
nb++;
}
int idx = -1;
ISet nei;
int min = 0;
while (nb>0){
idx = in.nextSetBit(idx+1);
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for(int j=nei.getFirstElement(); j>=0; j = nei.getNextElement()){
if(in.get(j)){
in.clear(j);
nb--;
}
}
min ++;
}
return min;
}
private int efficientSearch(){
in.clear();
inMIS.clear();
int nb = 0;
ISet nodes = g.getKernelGraph().getActiveNodes();
for (int i=nodes.getFirstElement();i>=0;i=nodes.getNextElement()){
in.set(i);
nbNeighbors[i] = g.getEnvelopGraph().getNeighborsOf(i).getSize();
nb++;
}
int idx;
ISet nei;
TIntArrayList list = new TIntArrayList();
int min = 0;
while (nb>0){
idx = in.nextSetBit(0);
for(int i=in.nextSetBit(idx+1);i>=0;i=in.nextSetBit(i+1)){
if(nbNeighbors[i]<nbNeighbors[idx]){
idx = i;
}
}
nei = g.getEnvelopGraph().getNeighborsOf(idx);
in.clear(idx);
inMIS.set(idx);
nb--;
for(int j=nei.getFirstElement(); j>=0; j = nei.getNextElement()){
if(in.get(j)){
in.clear(j);
nb--;
list.add(j);
}
}
for(int i=list.size()-1;i>=0;i--){
nei = g.getEnvelopGraph().getNeighborsOf(list.get(i));
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){ |
<<<<<<<
import org.slf4j.LoggerFactory;
=======
import common.ESat;
>>>>>>>
import org.slf4j.LoggerFactory;
import common.ESat;
<<<<<<<
import solver.exception.SolverException;
import solver.explanations.RecorderExplanationEngine;
=======
>>>>>>>
import solver.exception.SolverException;
import solver.explanations.RecorderExplanationEngine;
<<<<<<<
if (solver.getEngine() != null && solver.getEngine().isInitialized()) {
if (solver.getExplainer() instanceof RecorderExplanationEngine) {
LoggerFactory.getLogger("exp").warn("Explanation engine does not support constraint dynamic addition!");
}
solver.getEngine().dynamicAddition(this, cut);
}
=======
>>>>>>> |
<<<<<<<
this.n = g.getEnvelopGraph().getNbNodes();
valRemoved = new ValRem(this);
arcEnforced = new EnfArc(this);
if(intVars[0].hasEnumeratedDomain()){
arcRemoved = new RemArcAC(this);
}else{
arcRemoved = new RemArcBC(this);
}
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet nei;
IntVar v;
for(int i=0;i<n;i++){
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){
if(!intVars[i].contains(j)){
g.removeArc(i,j,this);
}
}
v = intVars[i];
int ub = v.getUB();
for(int j=v.getLB();j<=ub;j=v.nextValue(j)){
if(j<n && !g.getEnvelopGraph().arcExists(i,j)){
v.removeValue(j,this);
}
}
if(!v.hasEnumeratedDomain()){
ub = v.getUB();
while(ub>=0 && ub<n && !g.getEnvelopGraph().arcExists(i,ub)){
v.removeValue(ub,this);
ub--;
}
}
}
gdm.unfreeze();
for(int i=0;i<idms.length;i++){
idms[i].unfreeze();
}
}
@Override
public void propagate(AbstractFineEventRecorder eventRecorder, int idxVarInProp, int mask) throws ContradictionException {
if((vars[idxVarInProp].getTypeAndKind() & Variable.GRAPH)!=0) {
gdm.freeze();
if((mask & EventType.ENFORCEARC.mask) !=0){
gdm.forEachArc(arcEnforced, EventType.ENFORCEARC);
}
if((mask & EventType.REMOVEARC.mask)!=0){
gdm.forEachArc(arcRemoved, EventType.REMOVEARC);
}
=======
this.n = g.getEnvelopGraph().getNbNodes();
valRemoved = new ValRem(this);
arcEnforced = new EnfArc(this);
if (intVars[0].hasEnumeratedDomain()) {
arcRemoved = new RemArcAC(this);
} else {
arcRemoved = new RemArcBC(this);
}
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
INeighbors nei;
IntVar v;
for (int i = 0; i < n; i++) {
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (!intVars[i].contains(j)) {
g.removeArc(i, j, aCause);
}
}
v = intVars[i];
int ub = v.getUB();
for (int j = v.getLB(); j <= ub; j = v.nextValue(j)) {
if (j < n && !g.getEnvelopGraph().arcExists(i, j)) {
v.removeValue(j, aCause);
}
}
if (!v.hasEnumeratedDomain()) {
ub = v.getUB();
while (ub >= 0 && ub < n && !g.getEnvelopGraph().arcExists(i, ub)) {
v.removeValue(ub, aCause);
ub--;
}
}
}
gdm.unfreeze();
for (int i = 0; i < idms.length; i++) {
idms[i].unfreeze();
}
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
if ((vars[idxVarInProp].getTypeAndKind() & Variable.GRAPH) != 0) {
gdm.freeze();
if ((mask & EventType.ENFORCEARC.mask) != 0) {
gdm.forEachArc(arcEnforced, EventType.ENFORCEARC);
}
if ((mask & EventType.REMOVEARC.mask) != 0) {
gdm.forEachArc(arcRemoved, EventType.REMOVEARC);
}
>>>>>>>
this.n = g.getEnvelopGraph().getNbNodes();
valRemoved = new ValRem(this);
arcEnforced = new EnfArc(this);
if(intVars[0].hasEnumeratedDomain()){
arcRemoved = new RemArcAC(this);
}else{
arcRemoved = new RemArcBC(this);
}
}
//***********************************************************************************
// METHODS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet nei;
IntVar v;
for(int i=0;i<n;i++){
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for(int j=nei.getFirstElement();j>=0;j=nei.getNextElement()){
if(!intVars[i].contains(j)){
g.removeArc(i,j,this);
}
}
v = intVars[i];
int ub = v.getUB();
for(int j=v.getLB();j<=ub;j=v.nextValue(j)){
if(j<n && !g.getEnvelopGraph().arcExists(i,j)){
v.removeValue(j,this);
}
}
if(!v.hasEnumeratedDomain()){
ub = v.getUB();
while(ub>=0 && ub<n && !g.getEnvelopGraph().arcExists(i,ub)){
v.removeValue(ub,this);
ub--;
}
}
}
gdm.unfreeze();
for(int i=0;i<idms.length;i++){
idms[i].unfreeze();
}
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
if((vars[idxVarInProp].getTypeAndKind() & Variable.GRAPH)!=0) {
gdm.freeze();
if((mask & EventType.ENFORCEARC.mask) !=0){
gdm.forEachArc(arcEnforced, EventType.ENFORCEARC);
}
if((mask & EventType.REMOVEARC.mask)!=0){
gdm.forEachArc(arcRemoved, EventType.REMOVEARC);
}
<<<<<<<
}
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.REMOVEARC.mask + EventType.ENFORCEARC.mask + EventType.INT_ALL_MASK();
}
@Override
public ESat isEntailed() {
for(int i=0;i<vars.length;i++){
if(!vars[i].instantiated()){
return ESat.UNDEFINED;
}
}
int val;
for(int i=0;i<n;i++){
val = intVars[i].getValue();
if(val<n && !g.getEnvelopGraph().arcExists(i,val)){
return ESat.FALSE;
}
if(g.getEnvelopGraph().getSuccessorsOf(i).getSize()>1){
return ESat.FALSE;
}
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
private class ValRem implements IntProcedure{
private Propagator p;
private ValRem(Propagator p){
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
g.removeArc(varIdx,i,p);
}
}
private class EnfArc implements PairProcedure {
private Propagator p;
private EnfArc(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].instantiateTo(to,p);
}
}
private class RemArcAC implements PairProcedure{
private Propagator p;
private RemArcAC(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].removeValue(to,p);
}
}
private class RemArcBC implements PairProcedure{
private Propagator p;
private RemArcBC(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if(to==intVars[from].getLB()){
while(to<n && !g.getEnvelopGraph().arcExists(from,to)){
to++;
}
intVars[from].updateLowerBound(to,p);
}else if(to==intVars[from].getUB()){
while(to>=0 && !g.getEnvelopGraph().arcExists(from,to)){
to--;
}
intVars[from].updateUpperBound(to, p);
}
}
}
=======
}
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.REMOVEARC.mask + EventType.ENFORCEARC.mask + EventType.INT_ALL_MASK();
}
@Override
public ESat isEntailed() {
for (int i = 0; i < vars.length; i++) {
if (!vars[i].instantiated()) {
return ESat.UNDEFINED;
}
}
int val;
for (int i = 0; i < n; i++) {
val = intVars[i].getValue();
if (val < n && !g.getEnvelopGraph().arcExists(i, val)) {
return ESat.FALSE;
}
if (g.getEnvelopGraph().getSuccessorsOf(i).neighborhoodSize() > 1) {
return ESat.FALSE;
}
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
private class ValRem implements IntProcedure {
private Propagator p;
private ValRem(Propagator p) {
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
g.removeArc(varIdx, i, p);
}
}
private class EnfArc implements PairProcedure {
private Propagator p;
private EnfArc(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].instantiateTo(to, p);
}
}
private class RemArcAC implements PairProcedure {
private Propagator p;
private RemArcAC(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].removeValue(to, p);
}
}
private class RemArcBC implements PairProcedure {
private Propagator p;
private RemArcBC(Propagator p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if (to == intVars[from].getLB()) {
while (to < n && !g.getEnvelopGraph().arcExists(from, to)) {
to++;
}
intVars[from].updateLowerBound(to, p);
} else if (to == intVars[from].getUB()) {
while (to >= 0 && !g.getEnvelopGraph().arcExists(from, to)) {
to--;
}
intVars[from].updateUpperBound(to, p);
}
}
}
>>>>>>>
}
}
@Override
public int getPropagationConditions(int vIdx) {
return EventType.REMOVEARC.mask + EventType.ENFORCEARC.mask + EventType.INT_ALL_MASK();
}
@Override
public ESat isEntailed() {
for(int i=0;i<vars.length;i++){
if(!vars[i].instantiated()){
return ESat.UNDEFINED;
}
}
int val;
for(int i=0;i<n;i++){
val = intVars[i].getValue();
if(val<n && !g.getEnvelopGraph().arcExists(i,val)){
return ESat.FALSE;
}
if(g.getEnvelopGraph().getSuccessorsOf(i).getSize()>1){
return ESat.FALSE;
}
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURES
//***********************************************************************************
private class ValRem implements IntProcedure{
private Propagator p;
private ValRem(Propagator p){
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
g.removeArc(varIdx,i,p);
}
}
private class EnfArc implements PairProcedure {
private Propagator p;
private EnfArc(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].instantiateTo(to,p);
}
}
private class RemArcAC implements PairProcedure{
private Propagator p;
private RemArcAC(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
intVars[from].removeValue(to,p);
}
}
private class RemArcBC implements PairProcedure{
private Propagator p;
private RemArcBC(Propagator p){
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if(to==intVars[from].getLB()){
while(to<n && !g.getEnvelopGraph().arcExists(from,to)){
to++;
}
intVars[from].updateLowerBound(to,p);
}else if(to==intVars[from].getUB()){
while(to>=0 && !g.getEnvelopGraph().arcExists(from,to)){
to--;
}
intVars[from].updateUpperBound(to, p);
}
}
} |
<<<<<<<
=======
import solver.search.strategy.assignments.DecisionOperator;
>>>>>>>
import solver.search.strategy.assignments.DecisionOperator;
<<<<<<<
=======
@Override
@Deprecated
public void set(GraphVar var, int value, DecisionOperator<GraphVar> graphVarAssignment) {
throw new UnsupportedOperationException();
}
>>>>>>>
@Override
@Deprecated
public void set(GraphVar var, int value, DecisionOperator<GraphVar> graphVarAssignment) {
throw new UnsupportedOperationException();
} |
<<<<<<<
import solver.objective.MinObjectiveManager;
import solver.search.strategy.assignments.Assignment;
=======
import solver.search.strategy.assignments.DecisionOperator;
>>>>>>>
import solver.objective.MinObjectiveManager;
import solver.search.strategy.assignments.DecisionOperator;
<<<<<<<
private IntVar obj;
private int val;
private PoolManager<FastDecision> pool;
private boolean firstCall;
private int UB;
=======
private IntVar obj;
private int val;
private PoolManager<FastDecision> pool;
private boolean firstCall;
>>>>>>>
private IntVar obj;
private int val;
private PoolManager<FastDecision> pool;
private boolean firstCall;
private int UB;
<<<<<<<
public BottomUp_Minimization(IntVar obj) {
super(new IntVar[]{obj});
this.obj = obj;
firstCall = true;
pool = new PoolManager<FastDecision>();
// waits a first solution before triggering the bottom-up minimization
obj.getSolver().getSearchLoop().restartAfterEachSolution(true);
obj.getSolver().getSearchLoop().getLimitsBox().setSolutionLimit(2);
}
=======
public BottomUp_Minimization(IntVar obj) {
super(new IntVar[]{obj});
this.obj = obj;
firstCall = true;
pool = new PoolManager<FastDecision>();
}
>>>>>>>
public BottomUp_Minimization(IntVar obj) {
super(new IntVar[]{obj});
this.obj = obj;
firstCall = true;
pool = new PoolManager<FastDecision>();
// waits a first solution before triggering the bottom-up minimization
obj.getSolver().getSearchLoop().restartAfterEachSolution(true);
obj.getSolver().getSearchLoop().getLimitsBox().setSolutionLimit(2);
}
<<<<<<<
@Override
public Decision getDecision() {
if(obj.getSolver().getMeasures().getSolutionCount()==0){
return null;
}
if(obj.instantiated()){
return null;
}
if(firstCall){
firstCall = false;
val = obj.getLB();
UB = obj.getUB();
}
if(val>UB){
return null;
}
val = Math.max(val,obj.getLB());
MinObjectiveManager man = (MinObjectiveManager)obj.getSolver().getSearchLoop().getObjectivemanager();
man.updateLB(val);
System.out.println(obj.getLB()+" : "+obj.getUB()+" -> "+val+" tps: "+(int)(obj.getSolver().getMeasures().getTimeCount()/1000)+"s");
FastDecision dec = pool.getE();
if(dec==null){
dec = new FastDecision(pool);
}
///
// String txt = obj.getSolver().getMeasures().getFailCount() +";"+
// obj.getSolver().getMeasures().getNodeCount() + ";"+
// (int)(obj.getSolver().getMeasures().getTimeCount()) +";"+
// val+";\n";
// HCP_Parser.writeTextInto(txt, "/Users/jfages07/Desktop/Evolution.csv");
///
dec.set(obj,val, Assignment.int_eq);
val ++;
return dec;
}
=======
@Override
public Decision getDecision() {
if (obj.instantiated()) {
return null;
}
if (firstCall) {
firstCall = false;
val = obj.getLB();
}
System.out.println(obj.getLB() + " : " + obj.getUB() + " -> " + val);
FastDecision dec = pool.getE();
if (dec == null) {
dec = new FastDecision(pool);
}
dec.set(obj, val, DecisionOperator.int_eq);
val++;
return dec;
}
>>>>>>>
@Override
public Decision getDecision() {
if(obj.getSolver().getMeasures().getSolutionCount()==0){
return null;
}
if(obj.instantiated()){
return null;
}
if(firstCall){
firstCall = false;
val = obj.getLB();
UB = obj.getUB();
}
if(val>UB){
return null;
}
val = Math.max(val,obj.getLB());
MinObjectiveManager man = (MinObjectiveManager)obj.getSolver().getSearchLoop().getObjectivemanager();
man.updateLB(val);
System.out.println(obj.getLB()+" : "+obj.getUB()+" -> "+val+" tps: "+(int)(obj.getSolver().getMeasures().getTimeCount()/1000)+"s");
FastDecision dec = pool.getE();
if(dec==null){
dec = new FastDecision(pool);
}
///
// String txt = obj.getSolver().getMeasures().getFailCount() +";"+
// obj.getSolver().getMeasures().getNodeCount() + ";"+
// (int)(obj.getSolver().getMeasures().getTimeCount()) +";"+
// val+";\n";
// HCP_Parser.writeTextInto(txt, "/Users/jfages07/Desktop/Evolution.csv");
///
dec.set(obj,val, DecisionOperator.int_eq);
val ++;
return dec;
} |
<<<<<<<
=======
IntVar[] diffs = solver.intVarArray("d", (m * m - m) / 2, 0, (m < 31) ? (1 << (m + 1)) - 1 : 9999, false);
solver.addHook("diffs", diffs);
IntVar[][] m_diffs = new IntVar[m][m];
>>>>>>> |
<<<<<<<
import org.chocosolver.solver.variables.VF;
import org.chocosolver.util.ProblemMaker;
=======
>>>>>>>
import org.chocosolver.solver.variables.VF;
import org.chocosolver.util.ProblemMaker;
<<<<<<<
=======
public void queen(Solver solver, int n) {
IntVar[] q = solver.intVarArray("Q", n, 1, n, false);
solver.post(ICF.alldifferent(q, "AC"));
for (int i = 0; i < n - 1; i++) {
for (int j = i + 1; j < n; j++) {
int k = j - i;
solver.post(IntConstraintFactory.arithm(q[i], "!=", q[j], "+", -k));
solver.post(IntConstraintFactory.arithm(q[i], "!=", q[j], "+", k));
}
}
}
public void golomb(Solver solver, int m) {
IntVar[] ticks = solver.intVarArray("a", m, 0, (m < 31) ? (1 << (m + 1)) - 1 : 9999, false);
IntVar[] diffs = solver.intVarArray("d", (m * m - m) / 2, 0, (m < 31) ? (1 << (m + 1)) - 1 : 9999, false);
solver.post(IntConstraintFactory.arithm(ticks[0], "=", 0));
for (int i = 0; i < m - 1; i++) {
solver.post(IntConstraintFactory.arithm(ticks[i + 1], ">", ticks[i]));
}
for (int k = 0, i = 0; i < m - 1; i++) {
for (int j = i + 1; j < m; j++, k++) {
// d[k] is m[j]-m[i] and must be at least sum of first j-i integers
solver.post(IntConstraintFactory.scalar(new IntVar[]{ticks[j], ticks[i]}, new int[]{1, -1}, "=", diffs[k]));
solver.post(IntConstraintFactory.arithm(diffs[k], ">=", (j - i) * (j - i + 1) / 2));
solver.post(IntConstraintFactory.arithm(diffs[k], "-", ticks[m - 1], "<=", -((m - 1 - j + i) * (m - j + i)) / 2));
solver.post(IntConstraintFactory.arithm(diffs[k], "<=", ticks[m - 1], "-", ((m - 1 - j + i) * (m - j + i)) / 2));
}
}
solver.post(IntConstraintFactory.alldifferent(diffs, "BC"));
// break symetries
if (m > 2) {
solver.post(IntConstraintFactory.arithm(diffs[0], "<", diffs[diffs.length - 1]));
}
solver.setObjectives(ticks[m - 1]);
}
>>>>>>> |
<<<<<<<
=======
import solver.propagation.PropagationEngine;
import solver.propagation.generator.PArc;
import solver.propagation.generator.Sort;
>>>>>>>
<<<<<<<
private static void run() {
Solver solver = new Solver();
// variables
int max = 100 * optimum;
IntVar totalCost = VariableFactory.bounded("obj", 0, max, solver);
final UndirectedGraphVar undi = new UndirectedGraphVar(solver, n, GraphType.LINKED_LIST, GraphType.LINKED_LIST);
for (int i = 0; i < n; i++) {
undi.getKernelGraph().activateNode(i);
for (int j = i + 1; j < n; j++) {
undi.getEnvelopGraph().addEdge(i, j);
}
}
// constraints
Constraint gc = GraphConstraintFactory.makeConstraint(solver);
gc.addPropagators(new PropCycleNoSubtour(undi, gc, solver));
gc.addPropagators(new PropAtLeastNNeighbors(undi, 2, gc, solver));
gc.addPropagators(new PropAtMostNNeighbors(undi, 2, gc, solver));
gc.addPropagators(new PropCycleEvalObj(undi, totalCost, distMatrix, gc, solver));
PropSymmetricHeldKarp hk = PropSymmetricHeldKarp.oneTreeBasedRelaxation(undi, totalCost, distMatrix, gc, solver);
hk.waitFirstSolution(true);
gc.addPropagators(hk);
solver.post(gc);
// config
solver.set(StrategyFactory.graphStrategy(undi, null, new MinCost(undi), GraphStrategy.NodeArcPriority.ARCS));
=======
private static void run() {
Solver solver = new Solver();
// variables
int max = 100 * optimum;
IntVar totalCost = VariableFactory.bounded("obj", 0, max, solver);
final UndirectedGraphVar undi = new UndirectedGraphVar(solver, n, GraphType.LINKED_LIST, GraphType.LINKED_LIST, true);
for (int i = 0; i < n; i++) {
undi.getKernelGraph().activateNode(i);
for (int j = i + 1; j < n; j++) {
undi.getEnvelopGraph().addEdge(i, j);
}
}
// constraints
Constraint gc = GraphConstraintFactory.makeConstraint(solver);
gc.addPropagators(new PropCycleNoSubtour(undi, gc, solver));
gc.addPropagators(new PropNodeDegree_AtLeast(undi, 2, gc, solver));
gc.addPropagators(new PropNodeDegree_AtMost(undi, 2, gc, solver));
gc.addPropagators(new PropCycleEvalObj(undi, totalCost, distMatrix, gc, solver));
PropLagr_OneTree hk = PropLagr_OneTree.oneTreeBasedRelaxation(undi, totalCost, distMatrix, gc, solver);
hk.waitFirstSolution(true);
gc.addPropagators(hk);
solver.post(gc);
// config
solver.set(StrategyFactory.graphStrategy(undi, null, new MinCost(undi), GraphStrategy.NodeArcPriority.ARCS));
>>>>>>>
private static void run() {
Solver solver = new Solver();
// variables
int max = 100 * optimum;
IntVar totalCost = VariableFactory.bounded("obj", 0, max, solver);
final UndirectedGraphVar undi = new UndirectedGraphVar(solver, n, GraphType.LINKED_LIST, GraphType.LINKED_LIST, true);
for (int i = 0; i < n; i++) {
undi.getKernelGraph().activateNode(i);
for (int j = i + 1; j < n; j++) {
undi.getEnvelopGraph().addEdge(i, j);
}
}
// constraints
Constraint gc = GraphConstraintFactory.makeConstraint(solver);
gc.addPropagators(new PropCycleNoSubtour(undi, gc, solver));
gc.addPropagators(new PropNodeDegree_AtLeast(undi, 2, gc, solver));
gc.addPropagators(new PropNodeDegree_AtMost(undi, 2, gc, solver));
gc.addPropagators(new PropCycleEvalObj(undi, totalCost, distMatrix, gc, solver));
PropLagr_OneTree hk = PropLagr_OneTree.oneTreeBasedRelaxation(undi, totalCost, distMatrix, gc, solver);
hk.waitFirstSolution(true);
gc.addPropagators(hk);
solver.post(gc);
// config
solver.set(StrategyFactory.graphStrategy(undi, null, new MinCost(undi), GraphStrategy.NodeArcPriority.ARCS));
<<<<<<<
=======
PropagationEngine propagationEngine = new PropagationEngine(solver.getEnvironment());
solver.set(propagationEngine.set(new Sort(new PArc(propagationEngine, gc)).clearOut()));
>>>>>>>
// PropagationEngine propagationEngine = new PropagationEngine(solver.getEnvironment());
// solver.set(propagationEngine.set(new Sort(new PArc(propagationEngine, gc)).clearOut()));
<<<<<<<
@Override
public boolean computeNextArc() {
int cost = -1;
INeighbors nei, ker;
for (int i = 0; i < n; i++) {
ker = g.getKernelGraph().getSuccessorsOf(i);
if (ker.neighborhoodSize() < 2) {
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (!ker.contain(j)) {
if (cost == -1 || distMatrix[i][j] < cost) {
cost = distMatrix[i][j];
this.from = i;
this.to = j;
}
}
}
}
}
return cost != -1;
}
}
=======
@Override
public boolean computeNextArc() {
int cost = -1;
ISet nei, ker;
for (int i = 0; i < n; i++) {
ker = g.getKernelGraph().getSuccessorsOf(i);
if (ker.getSize() < 2) {
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (!ker.contain(j)) {
if (cost == -1 || distMatrix[i][j] < cost) {
cost = distMatrix[i][j];
this.from = i;
this.to = j;
}
}
}
}
}
return cost != -1;
}
}
>>>>>>>
@Override
public boolean computeNextArc() {
int cost = -1;
ISet nei, ker;
for (int i = 0; i < n; i++) {
ker = g.getKernelGraph().getSuccessorsOf(i);
if (ker.getSize() < 2) {
nei = g.getEnvelopGraph().getSuccessorsOf(i);
for (int j = nei.getFirstElement(); j >= 0; j = nei.getNextElement()) {
if (!ker.contain(j)) {
if (cost == -1 || distMatrix[i][j] < cost) {
cost = distMatrix[i][j];
this.from = i;
this.to = j;
}
}
}
}
}
return cost != -1;
}
}
<<<<<<<
bestCost = cost.getValue();
System.out.println("new objective : " + bestCost);
int x = 0;
INeighbors nei = g.getEnvelopGraph().getSuccessorsOf(x);
int y = nei.getFirstElement();
if (y == n - 1) {
y = nei.getNextElement();
}
int tmp;
for (int i = 0; i < n - 1; i++) {
bestSolution[i] = x;
tmp = x;
x = y;
nei = g.getEnvelopGraph().getSuccessorsOf(x);
y = nei.getFirstElement();
if (y == tmp) {
y = nei.getNextElement();
}
}
}
=======
bestCost = cost.getValue();
System.out.println("new objective : " + bestCost);
int x = 0;
ISet nei = g.getEnvelopGraph().getSuccessorsOf(x);
int y = nei.getFirstElement();
if (y == n - 1) {
y = nei.getNextElement();
}
int tmp;
for (int i = 0; i < n - 1; i++) {
bestSolution[i] = x;
tmp = x;
x = y;
nei = g.getEnvelopGraph().getSuccessorsOf(x);
y = nei.getFirstElement();
if (y == tmp) {
y = nei.getNextElement();
}
}
}
>>>>>>>
bestCost = cost.getValue();
System.out.println("new objective : " + bestCost);
int x = 0;
ISet nei = g.getEnvelopGraph().getSuccessorsOf(x);
int y = nei.getFirstElement();
if (y == n - 1) {
y = nei.getNextElement();
}
int tmp;
for (int i = 0; i < n - 1; i++) {
bestSolution[i] = x;
tmp = x;
x = y;
nei = g.getEnvelopGraph().getSuccessorsOf(x);
y = nei.getFirstElement();
if (y == tmp) {
y = nei.getNextElement();
}
}
} |
<<<<<<<
=======
import org.chocosolver.solver.search.limits.ICounter;
import org.chocosolver.solver.search.loop.monitors.IMonitorSolution;
>>>>>>> |
<<<<<<<
public void explain(Deduction d, Explanation e) {
// return super.explain(d);
=======
public Explanation explain(Deduction d) {
>>>>>>>
public void explain(Deduction d, Explanation e) { |
<<<<<<<
private IntProcedure enfNode;
private PairProcedure remArc;
private ISet concernedNodes;
=======
private IntProcedure enfNode;
private PairProcedure remArc;
private INeighbors concernedNodes;
>>>>>>>
private IntProcedure enfNode;
private PairProcedure remArc;
private ISet concernedNodes;
<<<<<<<
public PropEachNodeHasLoop(GraphVar graph, ISet concernedNodes, Solver sol, Constraint constraint) {
super(new GraphVar[]{graph}, sol, constraint, PropagatorPriority.UNARY);
this.g = graph;
=======
public PropEachNodeHasLoop(GraphVar graph, INeighbors concernedNodes, Solver sol, Constraint constraint) {
super(new GraphVar[]{graph}, sol, constraint, PropagatorPriority.UNARY);
this.g = graph;
>>>>>>>
public PropEachNodeHasLoop(GraphVar graph, ISet concernedNodes, Solver sol, Constraint constraint) {
super(new GraphVar[]{graph}, sol, constraint, PropagatorPriority.UNARY);
this.g = graph;
<<<<<<<
this.enfNode = new NodeEnf(this);
this.remArc = new ArcRem(this);
this.concernedNodes = concernedNodes;
}
public PropEachNodeHasLoop(GraphVar graph, Solver sol, Constraint constraint) {
this(graph, graph.getEnvelopGraph().getActiveNodes(), sol, constraint);
}
//***********************************************************************************
// PROPAGATIONS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet env = g.getEnvelopGraph().getActiveNodes();
for (int i = env.getFirstElement(); i >= 0; i = env.getNextElement()) {
if (concernedNodes.contain(i)) {
if(g.getEnvelopGraph().arcExists(i,i)){
if(g.getKernelGraph().getActiveNodes().contain(i)){
g.enforceArc(i,i,this);
}
}else{
g.removeNode(i,this);
}
}
}
gdm.unfreeze();
}
@Override
public void propagate(AbstractFineEventRecorder eventRecorder, int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
=======
this.enfNode = new NodeEnf(this);
this.remArc = new ArcRem(this);
this.concernedNodes = concernedNodes;
}
public PropEachNodeHasLoop(GraphVar graph, Solver sol, Constraint constraint) {
this(graph, graph.getEnvelopGraph().getActiveNodes(), sol, constraint);
}
//***********************************************************************************
// PROPAGATIONS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
IActiveNodes env = g.getEnvelopGraph().getActiveNodes();
for (int i = env.getFirstElement(); i >= 0; i = env.getNextElement()) {
if (concernedNodes.contain(i)) {
if (g.getEnvelopGraph().arcExists(i, i)) {
if (g.getKernelGraph().getActiveNodes().isActive(i)) {
g.enforceArc(i, i, aCause);
}
} else {
g.removeNode(i, aCause);
}
}
}
gdm.unfreeze();
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
>>>>>>>
this.enfNode = new NodeEnf(this);
this.remArc = new ArcRem(this);
this.concernedNodes = concernedNodes;
}
public PropEachNodeHasLoop(GraphVar graph, Solver sol, Constraint constraint) {
this(graph, graph.getEnvelopGraph().getActiveNodes(), sol, constraint);
}
//***********************************************************************************
// PROPAGATIONS
//***********************************************************************************
@Override
public void propagate(int evtmask) throws ContradictionException {
ISet env = g.getEnvelopGraph().getActiveNodes();
for (int i = env.getFirstElement(); i >= 0; i = env.getNextElement()) {
if (concernedNodes.contain(i)) {
if(g.getEnvelopGraph().arcExists(i,i)){
if(g.getKernelGraph().getActiveNodes().contain(i)){
g.enforceArc(i,i,this);
}
}else{
g.removeNode(i,this);
}
}
}
gdm.unfreeze();
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
gdm.freeze();
<<<<<<<
}
//***********************************************************************************
// INFO
//***********************************************************************************
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCENODE.mask + EventType.REMOVEARC.mask;
}
@Override
public ESat isEntailed() {
ISet ker = g.getKernelGraph().getActiveNodes();
for (int i = ker.getFirstElement(); i >= 0; i = ker.getNextElement()) {
if (concernedNodes.contain(i) && !g.getKernelGraph().getNeighborsOf(i).contain(i)) {
return ESat.FALSE;
}
}
if (g.getEnvelopOrder() != g.getKernelOrder()) {
return ESat.UNDEFINED;
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURE
//***********************************************************************************
private class NodeEnf implements IntProcedure {
private PropEachNodeHasLoop p;
private NodeEnf(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
if (p.concernedNodes.contain(i)) {
g.enforceArc(i, i, p);
}
}
}
private class ArcRem implements PairProcedure {
private PropEachNodeHasLoop p;
private ArcRem(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if (from == to && concernedNodes.contain(to)) {
g.removeNode(from, p);
}
}
}
=======
}
//***********************************************************************************
// INFO
//***********************************************************************************
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCENODE.mask + EventType.REMOVEARC.mask;
}
@Override
public ESat isEntailed() {
IActiveNodes ker = g.getKernelGraph().getActiveNodes();
for (int i = ker.getFirstElement(); i >= 0; i = ker.getNextElement()) {
if (concernedNodes.contain(i) && !g.getKernelGraph().getNeighborsOf(i).contain(i)) {
return ESat.FALSE;
}
}
if (g.getEnvelopOrder() != g.getKernelOrder()) {
return ESat.UNDEFINED;
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURE
//***********************************************************************************
private class NodeEnf implements IntProcedure {
private PropEachNodeHasLoop p;
private NodeEnf(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
if (p.concernedNodes.contain(i)) {
g.enforceArc(i, i, p);
}
}
}
private class ArcRem implements PairProcedure {
private PropEachNodeHasLoop p;
private ArcRem(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if (from == to && concernedNodes.contain(to)) {
g.removeNode(from, p);
}
}
}
>>>>>>>
}
//***********************************************************************************
// INFO
//***********************************************************************************
@Override
public int getPropagationConditions(int vIdx) {
return EventType.ENFORCENODE.mask + EventType.REMOVEARC.mask;
}
@Override
public ESat isEntailed() {
ISet ker = g.getKernelGraph().getActiveNodes();
for (int i = ker.getFirstElement(); i >= 0; i = ker.getNextElement()) {
if (concernedNodes.contain(i) && !g.getKernelGraph().getNeighborsOf(i).contain(i)) {
return ESat.FALSE;
}
}
if (g.getEnvelopOrder() != g.getKernelOrder()) {
return ESat.UNDEFINED;
}
return ESat.TRUE;
}
//***********************************************************************************
// PROCEDURE
//***********************************************************************************
private class NodeEnf implements IntProcedure {
private PropEachNodeHasLoop p;
private NodeEnf(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int i) throws ContradictionException {
if (p.concernedNodes.contain(i)) {
g.enforceArc(i, i, p);
}
}
}
private class ArcRem implements PairProcedure {
private PropEachNodeHasLoop p;
private ArcRem(PropEachNodeHasLoop p) {
this.p = p;
}
@Override
public void execute(int from, int to) throws ContradictionException {
if (from == to && concernedNodes.contain(to)) {
g.removeNode(from, p);
}
}
} |
<<<<<<<
public abstract class IntView extends AbstractVariable<IntDelta, IIntDeltaMonitor, IntVar>
implements IView<IntDelta, IIntDeltaMonitor>, IntVar {
=======
public abstract class IntView<IV extends IntVar> extends AbstractVariable<IntDelta, IIntDeltaMonitor, IntView, IntView<IV>>
implements IView<IntDelta, IIntDeltaMonitor, IntView>, IntVar {
>>>>>>>
public abstract class IntView<IV extends IntVar> extends AbstractVariable<IntDelta, IIntDeltaMonitor, IntView<IV>>
implements IView<IntDelta, IIntDeltaMonitor>, IntVar { |
<<<<<<<
import solver.constraints.Constraint;
import solver.constraints.ConstraintFactory;
import solver.constraints.nary.AllDifferent;
import solver.propagation.generator.*;
import solver.propagation.generator.sorter.evaluator.EvtRecEvaluators;
=======
import solver.constraints.nary.alldifferent.AllDifferent;
import solver.constraints.unary.Relation;
>>>>>>>
import solver.constraints.Constraint;
import solver.constraints.ConstraintFactory;
import solver.constraints.nary.alldifferent.AllDifferent;
import solver.propagation.generator.*;
import solver.propagation.generator.sorter.evaluator.EvtRecEvaluators;
<<<<<<<
private int n = 10;
=======
private int n = 9;
>>>>>>>
private int n = 10; |
<<<<<<<
JavaApiAnalyzer apiAnalyzer = new JavaApiAnalyzer(Collections.emptyList());
Revapi r = new Revapi(PipelineConfiguration.builder().withAnalyzers(JavaApiAnalyzer.class)
.withFilters(ConfigurableElementFilter.class).withMatchers(JavaElementMatcher.class).build());
=======
JavaApiAnalyzer apiAnalyzer = new JavaApiAnalyzer(Collections.emptyList(), Collections.emptyList());
Revapi r = new Revapi(PipelineConfiguration.builder().withAnalyzers(JavaApiAnalyzer.class).build());
>>>>>>>
JavaApiAnalyzer apiAnalyzer = new JavaApiAnalyzer(Collections.emptyList(), Collections.emptyList());
Revapi r = new Revapi(PipelineConfiguration.builder().withAnalyzers(JavaApiAnalyzer.class)
.withFilters(ConfigurableElementFilter.class).withMatchers(JavaElementMatcher.class).build()); |
<<<<<<<
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
=======
import static java.util.Comparator.comparingInt;
>>>>>>>
import static java.util.Comparator.comparingInt;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
<<<<<<<
Stats.of("analyses").start();
Stats.of("analysisEnds").start();
Report r = elementDifferenceAnalyzer.endAnalysis(a, b);
config.reports.add(r);
Stats.of("analysisEnds").end(a, b);
Stats.of("analyses").end(beginDuration, new AbstractMap.SimpleEntry<>(a, b));
for (DifferenceTransform<?> t : activeTransforms) {
t.endElements(a, b);
=======
if (analyzeThis) {
LOG.trace("Ending the analysis of {} and {}.", a, b);
Stats.of("analyses").start();
Stats.of("analysisEnds").start();
Report r = elementDifferenceAnalyzer.endAnalysis(a, b);
Stats.of("analysisEnds").end(a, b);
Stats.of("analyses").end(beginDuration, new AbstractMap.SimpleEntry<>(a, b));
addDefaultAttachments(r, progress);
transformAndReport(r, progress);
} else {
LOG.trace("Finished the skipped analysis of {} and {}.", a, b);
>>>>>>>
Stats.of("analyses").start();
Stats.of("analysisEnds").start();
Report r = elementDifferenceAnalyzer.endAnalysis(a, b);
addDefaultAttachments(r, progress);
progress.reports.add(r);
Stats.of("analysisEnds").end(a, b);
Stats.of("analyses").end(beginDuration, new AbstractMap.SimpleEntry<>(a, b));
for (DifferenceTransform<?> t : activeTransforms) {
t.endElements(a, b);
<<<<<<<
=======
if (!report.getDifferences().isEmpty()) {
// make sure all the differences have a non-null criticality before being sent to the reporters
ListIterator<Difference> it = report.getDifferences().listIterator();
while (it.hasNext()) {
Difference orig = it.next();
if (orig.criticality == null) {
DifferenceSeverity maxSeverity = orig.classification.values().stream()
.max(comparingInt(Enum::ordinal))
.orElse(DifferenceSeverity.EQUIVALENT);
// all extensions share the criticality mapping and we're guaranteed to have at least 1 api analyzer
AnalysisContext ctx = progress.extensions.getFirstConfigurationOrNull(ApiAnalyzer.class);
if (ctx == null) {
throw new IllegalStateException("There should be at least 1 API analyzer during the analysis" +
"progress.");
}
Difference.Builder d = Difference.copy(orig)
.withCriticality(ctx.getDefaultCriticality(maxSeverity));
it.set(d.build());
}
}
Stats.of("reports").start();
for (ExtensionInstance<Reporter> ir : progress.extensions.getReporters().keySet()) {
ir.getInstance().report(report);
}
Stats.of("reports").end(report);
}
>>>>>>> |
<<<<<<<
* Copyright 2014-2019 Lukas Krejci
=======
* Copyright 2014-2020 Lukas Krejci
>>>>>>>
* Copyright 2014-2020 Lukas Krejci
<<<<<<<
public abstract class AbstractDifferenceReferringTransform<Recipe extends DifferenceMatchRecipe>
=======
public abstract class AbstractDifferenceReferringTransform
>>>>>>>
public abstract class AbstractDifferenceReferringTransform
<<<<<<<
private Collection<Recipe> configuredRecipes;
private Collection<Recipe> activeRecipes;
=======
private Collection<DifferenceMatchRecipe> configuredRecipes;
>>>>>>>
private Collection<DifferenceMatchRecipe> configuredRecipes;
private Collection<DifferenceMatchRecipe> activeRecipes;
<<<<<<<
@Nonnull
protected abstract Recipe newRecipe(AnalysisContext context, ModelNode configNode)
throws IllegalArgumentException;
=======
/**
* @return a list node where the difference recipes are stored
*/
protected ModelNode getRecipesConfigurationAndInitialize() {
return analysisContext.getConfiguration();
}
protected abstract DifferenceMatchRecipe newRecipe(ModelNode configNode) throws IllegalArgumentException;
>>>>>>>
/**
* @return a list node where the difference recipes are stored
*/
protected ModelNode getRecipesConfigurationAndInitialize() {
return analysisContext.getConfiguration();
}
protected abstract DifferenceMatchRecipe newRecipe(ModelNode configNode) throws IllegalArgumentException;
<<<<<<<
=======
this.analysisContext = analysisContext;
>>>>>>>
this.analysisContext = analysisContext;
<<<<<<<
ModelNode myNode = analysisContext.getConfiguration();
=======
ModelNode myNode = getRecipesConfigurationAndInitialize();
>>>>>>>
ModelNode myNode = getRecipesConfigurationAndInitialize();
<<<<<<<
Recipe recipe = newRecipe(analysisContext, config);
=======
DifferenceMatchRecipe recipe = newRecipe(config);
>>>>>>>
DifferenceMatchRecipe recipe = newRecipe(config);
<<<<<<<
for (Recipe r : activeRecipes) {
=======
for (DifferenceMatchRecipe r : configuredRecipes) {
>>>>>>>
for (DifferenceMatchRecipe r : activeRecipes) { |
<<<<<<<
=======
import static java.util.Collections.emptyList;
import java.io.IOException;
import java.io.InputStream;
>>>>>>>
import static java.util.Collections.emptyList;
<<<<<<<
null), Executors.newSingleThreadExecutor(), null, false
);
=======
null), emptyList(), Executors.newSingleThreadExecutor(), null, false,
InclusionFilter.acceptAll());
>>>>>>>
null), emptyList(), Executors.newSingleThreadExecutor(), null, false
);
<<<<<<<
Arrays.asList(new ShrinkwrapArchive(sup))), Executors.newSingleThreadExecutor(), null,
false);
=======
Arrays.asList(new ShrinkwrapArchive(sup))), emptyList(), Executors.newSingleThreadExecutor(), null,
false, InclusionFilter.acceptAll());
>>>>>>>
Arrays.asList(new ShrinkwrapArchive(sup))), emptyList(), Executors.newSingleThreadExecutor(), null,
false);
<<<<<<<
null), Executors.newSingleThreadExecutor(), null, false
);
=======
null), emptyList(), Executors.newSingleThreadExecutor(), null, false,
InclusionFilter.acceptAll());
>>>>>>>
null), emptyList(), Executors.newSingleThreadExecutor(), null, false
);
<<<<<<<
Arrays.asList(new ShrinkwrapArchive(sup))), Executors.newSingleThreadExecutor(), null,
false);
=======
Arrays.asList(new ShrinkwrapArchive(sup))), emptyList(), Executors.newSingleThreadExecutor(), null,
false, InclusionFilter.acceptAll());
>>>>>>>
Arrays.asList(new ShrinkwrapArchive(sup))), emptyList(), Executors.newSingleThreadExecutor(), null,
false);
<<<<<<<
null), Executors.newSingleThreadExecutor(), null, false);
=======
null), emptyList(), Executors.newSingleThreadExecutor(), null, false,
InclusionFilter.acceptAll());
>>>>>>>
null), emptyList(), Executors.newSingleThreadExecutor(), null, false); |
<<<<<<<
import org.revapi.java.checks.fields.SerialVersionUidUnchanged;
import org.revapi.java.spi.JavaTypeElement;
=======
import org.revapi.java.checks.common.SerializationChecker;
>>>>>>>
import org.revapi.java.checks.common.SerializationChecker;
import org.revapi.java.spi.JavaTypeElement; |
<<<<<<<
=======
import org.revapi.java.model.AbstractJavaElement;
>>>>>>>
import org.revapi.java.model.AbstractJavaElement;
<<<<<<<
private final ArchiveAnalyzer.Filter filter;
=======
private final InclusionFilter inclusionFilter;
private final boolean defaultInclusionCase;
private final TypeElement objectType;
>>>>>>>
private final ArchiveAnalyzer.Filter filter;
private final TypeElement objectType;
<<<<<<<
this.filter = filter;
=======
this.inclusionFilter = inclusionFilter;
this.defaultInclusionCase = inclusionFilter.defaultCase();
this.objectType = environment.getElementUtils().getTypeElement("java.lang.Object");
>>>>>>>
this.filter = filter;
this.objectType = environment.getElementUtils().getTypeElement("java.lang.Object");
<<<<<<<
if (!tr.inclusionState.isDescend()) {
=======
if (type.getEnclosingElement() instanceof TypeElement) {
tr.parent = getTypeRecord((TypeElement) type.getEnclosingElement());
}
// make sure we always have java.lang.Object in the set of super types. If the current class' super type
// is missing, we might not be able to climb the full hierarchy up to java.lang.Object. But that would
// be highly misleading to the users.
if (type.getKind() != ElementKind.INTERFACE && type.getKind() != ElementKind.ANNOTATION_TYPE
&& !type.equals(objectType)) {
tr.superTypes.add(getTypeRecord(objectType));
if (!processed.contains(objectType)) {
requiredTypes.put(objectType, false);
}
}
if (tr.explicitlyExcluded) {
>>>>>>>
if (type.getEnclosingElement() instanceof TypeElement) {
tr.parent = getTypeRecord((TypeElement) type.getEnclosingElement());
}
// make sure we always have java.lang.Object in the set of super types. If the current class' super type
// is missing, we might not be able to climb the full hierarchy up to java.lang.Object. But that would
// be highly misleading to the users.
if (type.getKind() != ElementKind.INTERFACE && type.getKind() != ElementKind.ANNOTATION_TYPE
&& !type.equals(objectType)) {
tr.superTypes.add(getTypeRecord(objectType));
if (!processed.contains(objectType)) {
requiredTypes.put(objectType, false);
}
}
if (!tr.inclusionState.isDescend()) {
<<<<<<<
ArrayDeque<String> nesting = new ArrayDeque<>();
type = (TypeElement) type.getEnclosingElement();
while (type != null) {
nesting.push(type.getQualifiedName().toString());
type = type.getEnclosingElement() instanceof TypeElement
? (TypeElement) type.getEnclosingElement()
: null;
}
Function<String, Filter<org.revapi.java.model.TypeElement>> findByCN =
cn -> Filter.shallow(e -> cn.equals(e.getCanonicalName()));
List<org.revapi.java.model.TypeElement> parents = Collections.emptyList();
while (parents.isEmpty() && !nesting.isEmpty()) {
parents = environment.getTree().searchUnsafe(
org.revapi.java.model.TypeElement.class, false, findByCN.apply(nesting.pop()), null);
}
org.revapi.java.model.TypeElement parent = parents.isEmpty() ? null : parents.get(0);
while (!nesting.isEmpty()) {
String cn = nesting.pop();
parents = environment.getTree().searchUnsafe(
org.revapi.java.model.TypeElement.class, false, findByCN.apply(cn),
parent);
if (parents.isEmpty()) {
//we found a "gap" in the parents included in the model. let's start from the top
//again
do {
parents = environment.getTree().searchUnsafe(
org.revapi.java.model.TypeElement.class, false, findByCN.apply(cn), null);
if (parents.isEmpty() && !nesting.isEmpty()) {
cn = nesting.pop();
} else {
break;
}
} while (!nesting.isEmpty());
=======
if (typeRecord.parent.inTree) {
typeRecord.parent.modelElement.getChildren().add(typeRecord.modelElement);
} else {
//if it's not top level type, but the parent is not in the tree, we found a "gap" in the model
//included.. Therefore we just add the this type to the first parent in the tree or to the top
//level if none found
TypeRecord parent = typeRecord.parent;
while (parent != null && (!parent.inTree || parent.modelElement == null)) {
parent = parent.parent;
>>>>>>>
if (typeRecord.parent.inTree) {
typeRecord.parent.modelElement.getChildren().add(typeRecord.modelElement);
} else {
//if it's not top level type, but the parent is not in the tree, we found a "gap" in the model
//included.. Therefore we just add the this type to the first parent in the tree or to the top
//level if none found
TypeRecord parent = typeRecord.parent;
while (parent != null && (!parent.inTree || parent.modelElement == null)) {
parent = parent.parent;
<<<<<<<
boolean include = r.inclusionState.getMatch() != FilterMatch.DOESNT_MATCH || r.inclusionState.isDescend();
Element owner = t.getEnclosingElement();
if (owner != null && owner instanceof TypeElement) {
ArrayDeque<TypeElement> owners = new ArrayDeque<>();
while (owner != null && owner instanceof TypeElement) {
owners.push((TypeElement) owner);
owner = owner.getEnclosingElement();
}
=======
String cn = t.getQualifiedName().toString();
boolean includes = r.explicitlyIncluded;
boolean excludes = r.explicitlyExcluded;
if (includes) {
environment.addExplicitInclusion(cn);
}
if (excludes) {
environment.addExplicitExclusion(cn);
ignored.add(t);
} else {
boolean include = defaultInclusionCase || includes;
Element owner = t.getEnclosingElement();
if (owner instanceof TypeElement) {
ArrayDeque<TypeElement> owners = new ArrayDeque<>();
while (owner instanceof TypeElement) {
owners.push((TypeElement) owner);
owner = owner.getEnclosingElement();
}
//find the first owning class that is part of our model
List<TypeElement> siblings = environment.getTree().getRootsUnsafe().stream().map(
org.revapi.java.model.TypeElement::getDeclaringElement).collect(Collectors.toList());
>>>>>>>
boolean include = r.inclusionState.getMatch() != FilterMatch.DOESNT_MATCH || r.inclusionState.isDescend();
Element owner = t.getEnclosingElement();
if (owner != null && owner instanceof TypeElement) {
ArrayDeque<TypeElement> owners = new ArrayDeque<>();
while (owner != null && owner instanceof TypeElement) {
owners.push((TypeElement) owner);
owner = owner.getEnclosingElement();
}
<<<<<<<
//if the user doesn't want this type included explicitly, we need to check in the parents
//if some of them wasn't explicitly excluded
if (!include && !owners.isEmpty()) {
do {
TypeElement o = owners.pop();
include = !ignored.contains(o) && siblings.contains(o);
siblings = ElementFilter.typesIn(o.getEnclosedElements());
} while (include && !owners.isEmpty());
=======
if (include) {
placeInTree(r);
r.inTree = true;
r.modelElement.setRawUseSites(r.useSites);
types.add(r);
environment.setSuperTypes(r.javacElement,
r.superTypes.stream().map(tr -> tr.javacElement).collect(toList()));
r.modelElement.setInApi(r.inApi);
r.modelElement.setInApiThroughUse(r.inApiThroughUse);
>>>>>>>
//if the user doesn't want this type included explicitly, we need to check in the parents
//if some of them wasn't explicitly excluded
if (!include && !owners.isEmpty()) {
do {
TypeElement o = owners.pop();
include = !ignored.contains(o) && siblings.contains(o);
siblings = ElementFilter.typesIn(o.getEnclosedElements());
} while (include && !owners.isEmpty());
<<<<<<<
.filter(usedTr -> usedTr.inclusionState.getMatch() != FilterMatch.DOESNT_MATCH || usedTr.inclusionState.isDescend())
.peek(usedTr -> {
=======
.filter(usedTr -> !usedTr.explicitlyExcluded)
.peek(usedTr -> {
>>>>>>>
.filter(usedTr -> usedTr.inclusionState.getMatch() != FilterMatch.DOESNT_MATCH || usedTr.inclusionState.isDescend())
.peek(usedTr -> {
<<<<<<<
private void initNonClassElementChildrenAndMoveToApi(TypeRecord targetType, JavaElementBase<?, ?> parent,
boolean inherited) {
Types types = environment.getTypeUtils();
if (targetType.inApi && !shouldBeIgnored(parent.getDeclaringElement())) {
TypeMirror representation = types.asMemberOf(targetType.modelElement.getModelRepresentation(),
parent.getDeclaringElement());
=======
private void moveUsedToApi(Types types, TypeRecord owningType, Element user) {
if (owningType.inApi && !shouldBeIgnored(user)) {
TypeMirror representation = types.asMemberOf(owningType.modelElement.getModelRepresentation(),
user);
>>>>>>>
private void moveUsedToApi(Types types, TypeRecord owningType, Element user) {
if (owningType.inApi && !shouldBeIgnored(user)) {
TypeMirror representation = types.asMemberOf(owningType.modelElement.getModelRepresentation(),
user);
<<<<<<<
FilterResult fr = filter.filter(childEl);
if (fr.isDescend()) {
initNonClassElementChildrenAndMoveToApi(targetType, childEl, inherited);
}
=======
initNonClassElementChildrenAndMoveToApi(parentOwner, childEl, inherited);
>>>>>>>
FilterResult fr = filter.filter(childEl);
if (fr.isDescend()) {
initNonClassElementChildrenAndMoveToApi(parentOwner, childEl, inherited);
}
<<<<<<<
FilterResult inclusionState = FilterResult.undecidedAndDescend();
=======
TypeRecord parent;
boolean explicitlyExcluded;
boolean explicitlyIncluded;
>>>>>>>
FilterResult inclusionState = FilterResult.undecidedAndDescend();
TypeRecord parent; |
<<<<<<<
public boolean mTEMachineRecipes = false;
=======
public double mMagneticraftBonusOutputPercent = 100.0d;
private final String aTextThermalExpansion = "ThermalExpansion";
private final String aTextRailcraft = "Railcraft";
private final String aTextTwilightForest = "TwilightForest";
private final String aTextForestry = "Forestry";
private final String aTextArsmagica2 = "arsmagica2";
>>>>>>>
public double mMagneticraftBonusOutputPercent = 100.0d;
private final String aTextThermalExpansion = "ThermalExpansion";
private final String aTextRailcraft = "Railcraft";
private final String aTextTwilightForest = "TwilightForest";
private final String aTextForestry = "Forestry";
private final String aTextArsmagica2 = "arsmagica2";
public boolean mTEMachineRecipes = false;
<<<<<<<
switch (aMaterial.mName) {
case "Lapis":
case "Sodalite":
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
break;
case "Lazurite":
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
break;
case "InfusedAir":
case "InfusedWater":
case "InfusedFire":
case "InfusedEarth":
case "InfusedOrder":
case "InfusedEntropy":
GT_OreDictUnificator.registerOre(aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore);
break;
case "Chocolate":
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
break;
case "CertusQuartz":
case "NetherQuartz":
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
case "Fluix":
case "Quartz":
case "Quartzite":
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
default:
break;
=======
if (aMaterial == Materials.Lapis || aMaterial == Materials.Sodalite) {
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
} else if (aMaterial == Materials.Lazurite) {
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
} else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) {
GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
} else if (aMaterial == Materials.Chocolate) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
} else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) {
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
} else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) {
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
>>>>>>>
if (aMaterial == Materials.Lapis || aMaterial == Materials.Sodalite) {
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
} else if (aMaterial == Materials.Lazurite) {
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
} else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) {
GT_OreDictUnificator.registerOre(aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore);
} else if (aMaterial == Materials.Chocolate) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
} else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) {
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
} else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) {
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
<<<<<<<
return addFluid("molten." + aMaterial.mName.toLowerCase(), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
=======
return addFluid("molten." + aMaterial.name().toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
>>>>>>>
return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
<<<<<<<
return addFluid("plasma." + aMaterial.mName.toLowerCase(), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
=======
return addFluid("plasma." + aMaterial.name().toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
>>>>>>>
return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial, |
<<<<<<<
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
=======
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
>>>>>>>
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
<<<<<<<
this.achievementList = new HashMap();
this.issuedAchievements = new HashMap();
for (int i = 0; i < oreList.size(); i++) {
if (oreList.get(i) != null) {
if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) {
GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore");
StringBuilder dimensions = new StringBuilder();
boolean isFirst = true;
if (oreStats.get(i)[3] == 1) {
dimensions.append("Overworld");
isFirst = false;
}
if (oreStats.get(i)[4] == 1) {
if (!isFirst) dimensions.append("/");
dimensions.append("Nether");
isFirst = false;
}
if (oreStats.get(i)[5] == 1) {
if (!isFirst) dimensions.append("/");
dimensions.append("End");
isFirst = false;
}
GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString());
=======
this.achievementList = new ConcurrentHashMap();
this.issuedAchievements = new ConcurrentHashMap();
int oreList_sS=oreList.size();
for (int i = 0; i < oreList_sS; i++) {
if (GT_Values.D1 && this.achievementList.get(oreList.get(i).name()) == null) {
GT_Log.out.println("achievement." + oreList.get(i).name() + "=Find " + oreList.get(i).name() + " Ore");
StringBuilder dimensions = new StringBuilder();
boolean isFirst = true;
if(oreStats.get(i)[3] == 1) {
dimensions.append("Overworld");
isFirst = false;
}
if(oreStats.get(i)[4] == 1) {
if(!isFirst) dimensions.append("/");
dimensions.append("Nether");
isFirst = false;
}
if(oreStats.get(i)[5] == 1) {
if(!isFirst) dimensions.append("/");
dimensions.append("End");
isFirst = false;
>>>>>>>
this.achievementList = new ConcurrentHashMap();
this.issuedAchievements = new ConcurrentHashMap();
int oreList_sS=oreList.size();
for (int i = 0; i < oreList_sS; i++) {
if (oreList.get(i) != null) {
if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) {
GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore");
StringBuilder dimensions = new StringBuilder();
boolean isFirst = true;
if (oreStats.get(i)[3] == 1) {
dimensions.append("Overworld");
isFirst = false;
}
if (oreStats.get(i)[4] == 1) {
if (!isFirst) dimensions.append("/");
dimensions.append("Nether");
isFirst = false;
}
if (oreStats.get(i)[5] == 1) {
if (!isFirst) dimensions.append("/");
dimensions.append("End");
isFirst = false;
}
GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString());
<<<<<<<
for (int i = 0; i < data.getAllMaterialStacks().size(); i++) {
issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.mName);
=======
int data_getAllMaterialStacks_sS=data.getAllMaterialStacks().size();
for (int i = 0; i < data_getAllMaterialStacks_sS; i++) {
issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.name());
>>>>>>>
int data_getAllMaterialStacks_sS=data.getAllMaterialStacks().size();
for (int i = 0; i < data_getAllMaterialStacks_sS; i++) {
issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.mName); |
<<<<<<<
=======
import ic2.core.item.ItemIC2FluidContainer;
>>>>>>>
import ic2.core.item.ItemIC2FluidContainer;
<<<<<<<
=======
import net.minecraft.block.state.IBlockState;
>>>>>>>
import net.minecraft.block.state.IBlockState;
<<<<<<<
for (Dyes tDye : Dyes.VALUES) {
if (aEvent.getName().endsWith(tDye.name().replaceFirst("dye", ""))) {
GT_OreDictUnificator.addToBlacklist(aEvent.getOre());
GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
return;
}
}
//System.out.println("Material Name: "+aEvent.getName()+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
GT_Log.ore.println(tModToName + " uses an unknown Material.");
=======
//for (Dyes tDye : Dyes.VALUES) {
// if (aEvent.getName().endsWith(tDye.name().replaceFirst("dye", ""))) {
// GT_OreDictUnificator.addToBlacklist(aEvent.getOre());
// GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
// return;
// }
//}
//System.out.println("Material Name: "+aEvent.getName()+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
>>>>>>>
//for (Dyes tDye : Dyes.VALUES) {
// if (aEvent.getName().endsWith(tDye.name().replaceFirst("dye", ""))) {
// GT_OreDictUnificator.addToBlacklist(aEvent.getOre());
// GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
// return;
// }
//}
//System.out.println("Material Name: "+aEvent.getName()+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech."); |
<<<<<<<
gregtechproxy.mNerfedCombs = tMainConfig.get("general", "NerfCombs", true).getBoolean(true);
gregtechproxy.mHideUnusedOres = tMainConfig.get("general", "HideUnusedOres", true).getBoolean(true);
gregtechproxy.mHideRecyclingRecipes = tMainConfig.get("general", "HideRecyclingRecipes", true).getBoolean(true);
gregtechproxy.mTEMachineRecipes = tMainConfig.get("general", "TEMachineRecipes", false).getBoolean(false);
=======
gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true);
gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true);
gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true);
gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true);
gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true);
gregtechproxy.mMagneticraftBonusOutputPercent = tMainConfig.get(aTextGeneral, "MagneticraftBonusOutputPercent", 100.0f).getDouble();
>>>>>>>
gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true);
gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true);
gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true);
gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true);
gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true);
gregtechproxy.mMagneticraftBonusOutputPercent = tMainConfig.get(aTextGeneral, "MagneticraftBonusOutputPercent", 100.0f).getDouble();
gregtechproxy.mTEMachineRecipes = tMainConfig.get("general", "TEMachineRecipes", false).getBoolean(false);
<<<<<<<
if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) {
=======
gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false);
if(gregtechproxy.mChangeHarvestLevels){
gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3);
gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7));
for(Materials tMaterial : Materials.values()){
if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID<gregtechproxy.mHarvestLevel.length&&tMaterial.mMetaItemSubID>=0){
gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality);
}
}}
if (tMainConfig.get(aTextGeneral, "hardermobspawners", true).getBoolean(true)) {
>>>>>>>
if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) { |
<<<<<<<
call.getPlayer().sendMessage( plugin.messenger.playerError( "Please specify a report. Use /prism ? for help." ) );
=======
call.getSender().sendMessage( plugin.playerError( "Please specify a report. Use /prism ? for help." ) );
>>>>>>>
call.getSender().sendMessage( plugin.messenger.playerError( "Please specify a report. Use /prism ? for help." ) ); |
<<<<<<<
gearSmall("Small Gears", M, null, MaterialIconType.gearGtSmall, ENABLE_UNIFICATION, hasFlag(GENERATE_SMALL_GEAR)),
gear("Gears", M * 4, null, MaterialIconType.gearGt, ENABLE_UNIFICATION, hasFlag(GENERATE_GEAR)), // Introduced by me because BuildCraft has ruined the gear Prefix...
=======
gearGtSmall("Small Gears", M, null, MaterialIconType.gearGtSmall, ENABLE_UNIFICATION, mat -> mat instanceof MetalMaterial && mat.hasFlag(GENERATE_SMALL_GEAR)),
gearGt("Gears", M * 4, null, MaterialIconType.gearGt, ENABLE_UNIFICATION, mat -> mat instanceof SolidMaterial && mat.hasFlag(GENERATE_GEAR)), // Introduced by me because BuildCraft has ruined the gear Prefix...
>>>>>>>
gearSmall("Small Gears", M, null, MaterialIconType.gearGtSmall, ENABLE_UNIFICATION, mat -> mat instanceof MetalMaterial && mat.hasFlag(GENERATE_SMALL_GEAR)),
gear("Gears", M * 4, null, MaterialIconType.gearGt, ENABLE_UNIFICATION, mat -> mat instanceof SolidMaterial && mat.hasFlag(GENERATE_GEAR)), // Introduced by me because BuildCraft has ruined the gear Prefix... |
<<<<<<<
private final ByteArrayOutputStream readBuffer = new ByteArrayOutputStream();
private final Inflater inflater = new Inflater();
=======
private final Buffer readBuffer = Buffer.buffer();
private Buffer decompressBuffer = Buffer.buffer();
>>>>>>>
private final ByteArrayOutputStream readBuffer = new ByteArrayOutputStream();
private final Inflater inflater = new Inflater();
<<<<<<<
=======
private int readBufferPosition;
>>>>>>>
<<<<<<<
private void connectSocket(final String url) {
catnip.httpClient().newWebSocketBuilder().buildAsync(URI.create(url + "?compress=zlib-stream"), this).thenAcceptAsync(ws -> {
=======
private void connectSocket(String url) {
url += "?v=6&encoding=json";
if(catnip.compressionMode() != CompressionMode.NONE) {
url += "&compress=" + catnip.compressionMode().asDiscord();
}
catnip.httpClient().newWebSocketBuilder().buildAsync(URI.create(url), this).thenAcceptAsync(ws -> {
>>>>>>>
private void connectSocket(String url) {
url += "?v=6&encoding=json";
if(catnip.compressionMode() != CompressionMode.NONE) {
url += "&compress=" + catnip.compressionMode().asDiscord();
}
catnip.httpClient().newWebSocketBuilder().buildAsync(URI.create(url), this).thenAcceptAsync(ws -> {
<<<<<<<
=======
private void handleBinaryData(final Buffer binary) {
if(socket == null) {
return;
}
final boolean isEnd = binary.getInt(binary.length() - 4) == ZLIB_SUFFIX;
if(!isEnd || readBufferPosition > 0) {
final int position = readBufferPosition;
readBuffer.setBuffer(position, binary);
readBufferPosition = position + binary.length();
}
if(isEnd) {
final Buffer decompressed = decompressBuffer;
final Buffer dataToDecompress = readBufferPosition > 0 ? readBuffer : binary;
try(final InflaterOutputStream ios = new InflaterOutputStream(new BufferOutputStream(decompressed, 0), inflater)) {
// TODO: ??? How to handle this non-final warning?
synchronized(decompressBuffer) {
final int length = Math.max(readBufferPosition, binary.length());
int r = 0;
while(r < length) {
// How many bytes we can read
final int read = Math.min(decompress.length, length - r);
dataToDecompress.getBytes(r, r + read, decompress);
// Decompress
ios.write(decompress, 0, read);
r += read;
}
}
handleSocketData(JsonParser.object().from(decompressed.toString()));
decompressBuffer = Buffer.buffer();
} catch(final IOException e) {
catnip.logAdapter().error("Shard {}/{}: Error decompressing payload", id, limit, e);
catnip.logAdapter().error(decompressed.toString());
stateReply(ShardConnectState.FAILED);
} catch(final JsonParserException e) {
catnip.logAdapter().error("Shard {}/{}: Error parsing payload", id, limit, e);
catnip.logAdapter().error("PAYLOAD LENGTH: {}", decompressed.toString().length());
catnip.logAdapter().error(decompressed.toString());
stateReply(ShardConnectState.FAILED);
} finally {
readBufferPosition = 0;
}
}
}
>>>>>>>
<<<<<<<
.value("compress", true)
=======
>>>>>>>
<<<<<<<
.value("compress", true)
=======
>>>>>>> |
<<<<<<<
client.newWebSocketBuilder().buildAsync(URI.create(url), this).thenAcceptAsync(ws -> {
socket = ws;
socketOpen = true;
catnip.eventBus().publish(Raw.CONNECTED, shardInfo());
}).exceptionally(t -> {
socket = null;
socketOpen = false;
catnip.logAdapter().error("Shard {}/{}: Couldn't connect socket:", id, limit, t);
catnip.eventBus().publish(Raw.CLOSED, shardInfo());
stateReply(ShardConnectState.FAILED);
return null;
});
=======
client.websocketAbs(url, null, null, null,
socket -> {
lifecycleState = CONNECTED;
this.socket = socket;
socketOpen = true;
catnip.eventBus().publish(Raw.CONNECTED, shardInfo());
socket.frameHandler(this::handleSocketFrame)
.closeHandler(this::handleSocketClose)
.exceptionHandler(t -> {
socketOpen = false;
catnip.logAdapter().error("Shard {}/{}: Exception in Websocket", id, limit, t);
stateReply(ShardConnectState.FAILED);
})
.endHandler(end -> {
socketOpen = false;
stateReply(ShardConnectState.FAILED);
});
},
failure -> {
lifecycleState = DISCONNECTED;
socket = null;
socketOpen = false;
catnip.logAdapter().error("Shard {}/{}: Couldn't connect socket:", id, limit, failure);
catnip.eventBus().publish(Raw.CLOSED, shardInfo());
stateReply(ShardConnectState.FAILED);
});
>>>>>>>
client.newWebSocketBuilder().buildAsync(URI.create(url), this).thenAcceptAsync(ws -> {
lifecycleState = CONNECTED;
socket = ws;
socketOpen = true;
catnip.eventBus().publish(Raw.CONNECTED, shardInfo());
}).exceptionally(t -> {
lifecycleState = DISCONNECTED;
socket = null;
socketOpen = false;
catnip.logAdapter().error("Shard {}/{}: Couldn't connect socket:", id, limit, t);
catnip.eventBus().publish(Raw.CLOSED, shardInfo());
stateReply(ShardConnectState.FAILED);
return null;
});
<<<<<<<
=======
private void handleSocketFrame(final WebSocketFrame frame) {
try {
if(frame.isText()) {
handleSocketData(new JsonObject(frame.textData()));
}
if(frame.isBinary()) {
handleBinaryData(frame.binaryData());
}
if(frame.isClose()) {
handleSocketCloseFrame(frame);
}
} catch(final Exception e) {
catnip.logAdapter().error("Shard {}/{}: Failed to handle socket frame", id, limit, e);
stateReply(ShardConnectState.FAILED);
}
}
>>>>>>>
<<<<<<<
webSocket.request(1L);
return null;
=======
stateReply(ShardConnectState.FAILED);
}
@SuppressWarnings("squid:S1172")
private void handleSocketClose(final Void ignored) {
final boolean cancel = vertx.cancelTimer(heartbeatTask.get());
catnip.logAdapter().debug("Canceled timer task from socket close: {}", cancel);
catnip.eventBus().publish(Raw.DISCONNECTED, shardInfo());
catnip.logAdapter().warn("Shard {}/{}: Socket closing!", id, limit);
try {
socket = null;
socketOpen = false;
closedByClient = false;
catnip.eventBus().publish(Raw.CLOSED, shardInfo());
} catch(final Exception e) {
catnip.logAdapter().error("Shard {}/{}: Failure closing socket:", id, limit, e);
stateReply(ShardConnectState.FAILED);
}
>>>>>>>
webSocket.request(1L);
return null; |
<<<<<<<
private final Buffer readBuffer = Buffer.buffer();
@Getter
private final Buffer decompressBuffer = Buffer.buffer();
@Getter
=======
private final AtomicBoolean socketOpen = new AtomicBoolean(false);
@Getter
>>>>>>>
private final Buffer readBuffer = Buffer.buffer();
@Getter
private final Buffer decompressBuffer = Buffer.buffer();
@Getter
private final AtomicBoolean socketOpen = new AtomicBoolean(false);
@Getter |
<<<<<<<
=======
// Initialize temporary data structures
for (Site catalog_site : CatalogUtil.getAllSites(this.catalog)) {
if (catalog_site.getId() != this.siteId) {
tmp_transactionRequestBuildersParameters.put(catalog_site.getId(), new HashSet<Integer>());
}
tmp_transactionRequestBuilderInputs.put(catalog_site.getId(), new HashSet<Integer>());
} // FOR
this.initializeVoltProcedures();
>>>>>>>
// Initialize temporary data structures
for (Site catalog_site : CatalogUtil.getAllSites(this.catalog)) {
if (catalog_site.getId() != this.siteId) {
tmp_transactionRequestBuildersParameters.put(catalog_site.getId(), new HashSet<Integer>());
}
tmp_transactionRequestBuilderInputs.put(catalog_site.getId(), new HashSet<Integer>());
} // FOR
<<<<<<<
TransactionFinishCallback finish_callback = ts.initTransactionFinishCallback(Hstore.Status.ABORT_THROTTLED);
hstore_coordinator.transactionFinish(ts, Hstore.Status.ABORT_THROTTLED, finish_callback);
=======
TransactionFinishCallback finish_callback = ts.getTransactionFinishCallback(Hstore.Status.ABORT_THROTTLED);
hstore_coordinator.transactionFinish(ts, status, finish_callback);
>>>>>>>
TransactionFinishCallback finish_callback = ts.initTransactionFinishCallback(Hstore.Status.ABORT_THROTTLED);
hstore_coordinator.transactionFinish(ts, status, finish_callback);
<<<<<<<
// synchronized (this.ee) {
if (commit) {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Committing %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
if(d) LOG.debug("<FinishWork> this.ee.releaseUndoToken(undoToken)");
this.ee.releaseUndoToken(undoToken);
// Evan says that txns will be aborted LIFO. This means the first txn that
// we get in abortWork() will have a the greatest undoToken, which means that
// it will automagically rollback all other outstanding txns.
// I'm lazy/tired, so for now I'll just rollback everything I get, but in theory
// we should be able to check whether our undoToken has already been rolled back
} else {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Aborting %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
this.ee.undoUndoToken(undoToken);
}
// } // SYNCH
=======
if (commit) {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Committing %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
this.ee.releaseUndoToken(undoToken);
// Evan says that txns will be aborted LIFO. This means the first txn that
// we get in abortWork() will have a the greatest undoToken, which means that
// it will automagically rollback all other outstanding txns.
// I'm lazy/tired, so for now I'll just rollback everything I get, but in theory
// we should be able to check whether our undoToken has already been rolled back
} else {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Aborting %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
this.ee.undoUndoToken(undoToken);
}
>>>>>>>
if (commit) {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Committing %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
this.ee.releaseUndoToken(undoToken);
// Evan says that txns will be aborted LIFO. This means the first txn that
// we get in abortWork() will have a the greatest undoToken, which means that
// it will automagically rollback all other outstanding txns.
// I'm lazy/tired, so for now I'll just rollback everything I get, but in theory
// we should be able to check whether our undoToken has already been rolled back
} else {
if (d) LOG.debug("__FILE__:__LINE__ " + String.format("Aborting %s at partition=%d [lastTxnId=%d, undoToken=%d, submittedEE=%s]",
ts, this.partitionId, this.lastCommittedTxnId, undoToken, ts.hasSubmittedEE(this.partitionId)));
this.ee.undoUndoToken(undoToken);
} |
<<<<<<<
import org.voltdb.messaging.FastSerializer;
=======
>>>>>>>
import org.voltdb.messaging.FastSerializer;
<<<<<<<
import edu.brown.hstore.*;
import edu.brown.hstore.Hstore.HStoreService;
import edu.brown.hstore.Hstore.SendDataRequest;
import edu.brown.hstore.Hstore.SendDataResponse;
import edu.brown.hstore.Hstore.ShutdownRequest;
import edu.brown.hstore.Hstore.ShutdownResponse;
import edu.brown.hstore.Hstore.Status;
import edu.brown.hstore.Hstore.TransactionFinishRequest;
import edu.brown.hstore.Hstore.TransactionFinishResponse;
import edu.brown.hstore.Hstore.TransactionInitRequest;
import edu.brown.hstore.Hstore.TransactionInitResponse;
import edu.brown.hstore.Hstore.TransactionMapRequest;
import edu.brown.hstore.Hstore.TransactionMapResponse;
import edu.brown.hstore.Hstore.TransactionPrepareRequest;
import edu.brown.hstore.Hstore.TransactionPrepareResponse;
import edu.brown.hstore.Hstore.TransactionRedirectRequest;
import edu.brown.hstore.Hstore.TransactionRedirectResponse;
import edu.brown.hstore.Hstore.TransactionReduceRequest;
import edu.brown.hstore.Hstore.TransactionReduceResponse;
import edu.brown.hstore.Hstore.TransactionWorkRequest;
import edu.brown.hstore.Hstore.TransactionWorkResponse;
=======
import edu.brown.hstore.Hstore;
import edu.brown.hstore.Hstore.*;
>>>>>>>
import edu.brown.hstore.*;
import edu.brown.hstore.Hstore;
import edu.brown.hstore.Hstore.*;
<<<<<<<
import edu.mit.hstore.handlers.SendDataHandler;
=======
>>>>>>>
import edu.mit.hstore.handlers.SendDataHandler;
<<<<<<<
=======
private final EventObservable<HStoreCoordinator> ready_observable = new EventObservable<HStoreCoordinator>();
>>>>>>>
private final EventObservable<HStoreCoordinator> ready_observable = new EventObservable<HStoreCoordinator>(); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
public static void checkBalance(Client client, long acctId, double expected) throws Exception {
// Make sure that we set it correctly
String query = String.format("SELECT * FROM %s WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING, acctId);
ClientResponse cresponse = client.callProcedure("@AdHoc", query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
if (results[0].getRowCount() == 0) {
System.err.println(VoltTableUtil.format(results[0]));
}
assertEquals("No rows for acctId "+acctId, 1, results[0].getRowCount());
assertTrue(results[0].advanceRow());
assertEquals("Mismatched balance for acctId "+acctId, expected, results[0].getDouble("bal"));
}
public static void updateBalance(Client client, long acctId, double balance) throws Exception {
// Prime the customer's balance
String query = String.format("UPDATE %s SET bal = %f WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING,
balance, acctId);
String procName = VoltSystemProcedure.procCallName(AdHoc.class);
ClientResponse cresponse = client.callProcedure(procName, query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
assertTrue(results[0].advanceRow());
}
=======
public static void checkBalance(Client client, long acctId, double expected) throws Exception {
// Make sure that we set it correctly
String query = String.format("SELECT * FROM %s WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING, acctId);
ClientResponse cresponse = client.callProcedure("@AdHoc", query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
if (results[0].getRowCount() == 0) {
System.err.println(VoltTableUtil.format(results[0]));
}
assertEquals("No rows for acctId "+acctId, 1, results[0].getRowCount());
assertTrue(results[0].advanceRow());
assertEquals("Mismatched balance for acctId "+acctId, expected, results[0].getDouble("bal"));
}
public static void updateBalance(Client client, long acctId, double balance) throws Exception {
// Prime the customer's balance
String query = String.format("UPDATE %s SET bal = %f WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING,
balance, acctId);
ClientResponse cresponse = client.callProcedure("@AdHoc", query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
assertTrue(results[0].advanceRow());
}
>>>>>>>
public static void checkBalance(Client client, long acctId, double expected) throws Exception {
// Make sure that we set it correctly
String query = String.format("SELECT * FROM %s WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING, acctId);
ClientResponse cresponse = client.callProcedure("@AdHoc", query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
if (results[0].getRowCount() == 0) {
System.err.println(VoltTableUtil.format(results[0]));
}
assertEquals("No rows for acctId "+acctId, 1, results[0].getRowCount());
assertTrue(results[0].advanceRow());
assertEquals("Mismatched balance for acctId "+acctId, expected, results[0].getDouble("bal"));
}
public static void updateBalance(Client client, long acctId, double balance) throws Exception {
// Prime the customer's balance
String query = String.format("UPDATE %s SET bal = %f WHERE custid = %d",
SmallBankConstants.TABLENAME_CHECKING,
balance, acctId);
String procName = VoltSystemProcedure.procCallName(AdHoc.class);
ClientResponse cresponse = client.callProcedure(procName, query);
assertEquals(Status.OK, cresponse.getStatus());
VoltTable results[] = cresponse.getResults();
assertEquals(1, results.length);
assertTrue(results[0].advanceRow());
} |
<<<<<<<
=======
// TODO: These should be moved into HStoreConf
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 1048576; // 1024 kB
public static final long DEFAULT_EVICTED_BLOCK_SIZE = 524288; // 512 kB
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 262144; // 256 kB
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 131072; // 128 kB
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 65536; // 64 kB
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 32768; // 32 kB
//public static final long DEFAULT_EVICTED_BLOCK_SIZE = 16384; // 16 kB
>>>>>>>
<<<<<<<
evictBytes[i] = hstore_conf.site.anticache_block_size; // FIXME
=======
evictBytes[i] = DEFAULT_EVICTED_BLOCK_SIZE;
evictBlocks[i] = (int)blocks_to_evict / hstore_site.getLocalPartitionIds().size();
>>>>>>>
evictBytes[i] = hstore_conf.site.anticache_block_size; // FIXME
evictBlocks[i] = (int)blocks_to_evict / hstore_site.getLocalPartitionIds().size();
<<<<<<<
//while((totalDataSize-((totalBytesEvicted/1024)/1024)) > (DEFAULT_MAX_MEMORY_SIZE_MB * evictionMemoryThreshold)) // evict blocks until we're below the memory threshold
// //while(checkEviction())
while((this.totalDataSize - (this.totalBytesEvicted/1024/1024)) > DEFAULT_MAX_MEMORY_SIZE_MB)
{
StoredProcedureInvocation invocation = new StoredProcedureInvocation(1, procName, params);
for (int partition : hstore_site.getLocalPartitionIds().values()) {
if (hstore_conf.site.anticache_profiling)
this.profilers[partition].eviction_time.start();
invocation.getParams().toArray()[0] = partition;
LOG.info("Evicting block for partition " + partition);
ByteBuffer b = null;
try {
b = ByteBuffer.wrap(FastSerializer.serialize(invocation));
} catch (IOException ex) {
throw new RuntimeException(ex);
}
this.totalBytesEvicted += hstore_conf.site.anticache_block_size; // FIXME
this.hstore_site.invocationProcess(b, this.evictionCallback);
=======
>>>>>>>
<<<<<<<
assert(memory_idx >= 0);
=======
num_blocks_evicted += vt.getLong("BLOCKS_EVICTED");
>>>>>>>
assert(memory_idx >= 0);
num_blocks_evicted += vt.getLong("BLOCKS_EVICTED"); |
<<<<<<<
import org.voltdb.VoltTable;
import org.voltdb.VoltTableRow;
=======
import org.voltdb.ParameterSet;
import org.voltdb.VoltTable;
>>>>>>>
import org.voltdb.VoltTable;
import org.voltdb.VoltTableRow;
import org.voltdb.ParameterSet;
<<<<<<<
// IMPLEMENTING CLASS METHODS
// ----------------------------------------------------------------------------
/**
* Initialize this TransactionState
* @param txnId
* @param clientHandle
* @param source_partition
* @param predict_singlePartitioned TODO
* @param predict_readOnly TODO
* @param predict_abortable TODO
*/
public abstract <T extends AbstractTransaction> T init(long txnId, long clientHandle, int source_partition, boolean predict_readOnly, boolean predict_abortable);
// ----------------------------------------------------------------------------
// DATA STORAGE
// ----------------------------------------------------------------------------
/*
* Store data from mapOutput tables to reduceInput table
* reduceInput table should merge all incoming data from the mapOutput tables.
*/
public Hstore.Status storeData(int partition, VoltTable vt) {
assert(false) : "Unimplemented!";
return (Hstore.Status.OK);
}
// ----------------------------------------------------------------------------
=======
>>>>>>>
// DATA STORAGE
// ----------------------------------------------------------------------------
/*
* Store data from mapOutput tables to reduceInput table
* reduceInput table should merge all incoming data from the mapOutput tables.
*/
public Hstore.Status storeData(int partition, VoltTable vt) {
assert(false) : "Unimplemented!";
return (Hstore.Status.OK);
}
// ---------------------------------------------------------------------------- |
<<<<<<<
/*if (ts instanceof LocalTransaction) {
WriteAheadLogger.writeCombined((LocalTransaction)ts, status);
}*/
=======
ts.setStatus(status);
>>>>>>>
/*if (ts instanceof LocalTransaction) {
WriteAheadLogger.writeCombined((LocalTransaction)ts, status);
}*/
ts.setStatus(status); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
int id = NEXT_FRAGMENT_ID.getAndIncrement();
String planFragmentName = Integer.toString(id);
=======
// HACK: We're using the node_tree's hashCode() as it's name. It would be really
// nice if the Catalog code give us an guid without needing a name first...
String planFragmentName = Integer.toString(node_list.hashCode());
>>>>>>>
int id = NEXT_FRAGMENT_ID.getAndIncrement();
String planFragmentName = Integer.toString(id);
<<<<<<<
planFragment.setId(id);
=======
>>>>>>>
planFragment.setId(id); |
<<<<<<<
=======
// required int32 exit_status = 2;
public static final int EXIT_STATUS_FIELD_NUMBER = 2;
private boolean hasExitStatus;
private int exitStatus_ = 0;
public boolean hasExitStatus() { return hasExitStatus; }
public int getExitStatus() { return exitStatus_; }
>>>>>>>
<<<<<<<
// required .edu.brown.hstore.Status status = 4;
public static final int STATUS_FIELD_NUMBER = 4;
private boolean hasStatus;
private edu.brown.hstore.Hstore.Status status_;
public boolean hasStatus() { return hasStatus; }
public edu.brown.hstore.Hstore.Status getStatus() { return status_; }
=======
>>>>>>>
// required .edu.brown.hstore.Status status = 4;
public static final int STATUS_FIELD_NUMBER = 4;
private boolean hasStatus;
private edu.brown.hstore.Hstore.Status status_;
public boolean hasStatus() { return hasStatus; }
public edu.brown.hstore.Hstore.Status getStatus() { return status_; }
<<<<<<<
if (!hasStatus) return false;
=======
>>>>>>>
if (!hasStatus) return false;
<<<<<<<
if (hasStatus()) {
output.writeEnum(4, getStatus().getNumber());
}
=======
>>>>>>>
if (hasStatus()) {
output.writeEnum(4, getStatus().getNumber());
}
<<<<<<<
internal_static_edu_brown_hstore_PartitionFragment_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_PartitionFragment_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_edu_brown_hstore_PartitionResult_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_PartitionResult_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
=======
internal_static_edu_brown_hstore_Dependency_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_Dependency_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
>>>>>>>
internal_static_edu_brown_hstore_PartitionFragment_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_PartitionFragment_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_edu_brown_hstore_PartitionResult_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_PartitionResult_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_edu_brown_hstore_Dependency_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_edu_brown_hstore_Dependency_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
<<<<<<<
internal_static_edu_brown_hstore_PartitionFragment_descriptor =
=======
internal_static_edu_brown_hstore_Dependency_descriptor =
>>>>>>>
internal_static_edu_brown_hstore_PartitionFragment_descriptor =
<<<<<<<
internal_static_edu_brown_hstore_PartitionFragment_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_PartitionFragment_descriptor,
new java.lang.String[] { "PartitionId", "Data", },
edu.brown.hstore.Hstore.PartitionFragment.class,
edu.brown.hstore.Hstore.PartitionFragment.Builder.class);
internal_static_edu_brown_hstore_PartitionResult_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_edu_brown_hstore_PartitionResult_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_PartitionResult_descriptor,
new java.lang.String[] { "PartitionId", "Data", "Status", "Error", },
edu.brown.hstore.Hstore.PartitionResult.class,
edu.brown.hstore.Hstore.PartitionResult.Builder.class);
internal_static_edu_brown_hstore_TransactionInitRequest_descriptor =
getDescriptor().getMessageTypes().get(2);
=======
internal_static_edu_brown_hstore_Dependency_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_Dependency_descriptor,
new java.lang.String[] { "Id", "Data", },
edu.brown.hstore.Hstore.Dependency.class,
edu.brown.hstore.Hstore.Dependency.Builder.class);
internal_static_edu_brown_hstore_TransactionInitRequest_descriptor =
getDescriptor().getMessageTypes().get(1);
>>>>>>>
internal_static_edu_brown_hstore_PartitionFragment_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_PartitionFragment_descriptor,
new java.lang.String[] { "PartitionId", "Data", },
edu.brown.hstore.Hstore.PartitionFragment.class,
edu.brown.hstore.Hstore.PartitionFragment.Builder.class);
internal_static_edu_brown_hstore_PartitionResult_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_edu_brown_hstore_PartitionResult_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_PartitionResult_descriptor,
new java.lang.String[] { "PartitionId", "Data", "Status", "Error", },
edu.brown.hstore.Hstore.PartitionResult.class,
edu.brown.hstore.Hstore.PartitionResult.Builder.class);
internal_static_edu_brown_hstore_Dependency_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_edu_brown_hstore_Dependency_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_edu_brown_hstore_Dependency_descriptor,
new java.lang.String[] { "Id", "Data", },
edu.brown.hstore.Hstore.Dependency.class,
edu.brown.hstore.Hstore.Dependency.Builder.class);
internal_static_edu_brown_hstore_TransactionInitRequest_descriptor =
getDescriptor().getMessageTypes().get(3);
<<<<<<<
getDescriptor().getMessageTypes().get(3);
=======
getDescriptor().getMessageTypes().get(2);
>>>>>>>
getDescriptor().getMessageTypes().get(4);
<<<<<<<
getDescriptor().getMessageTypes().get(4);
=======
getDescriptor().getMessageTypes().get(3);
>>>>>>>
getDescriptor().getMessageTypes().get(5);
<<<<<<<
getDescriptor().getMessageTypes().get(5);
=======
getDescriptor().getMessageTypes().get(4);
>>>>>>>
getDescriptor().getMessageTypes().get(6);
<<<<<<<
getDescriptor().getMessageTypes().get(10);
=======
getDescriptor().getMessageTypes().get(5);
>>>>>>>
getDescriptor().getMessageTypes().get(11);
<<<<<<<
getDescriptor().getMessageTypes().get(11);
=======
getDescriptor().getMessageTypes().get(6);
>>>>>>>
getDescriptor().getMessageTypes().get(12);
<<<<<<<
getDescriptor().getMessageTypes().get(12);
=======
getDescriptor().getMessageTypes().get(7);
>>>>>>>
getDescriptor().getMessageTypes().get(13);
<<<<<<<
getDescriptor().getMessageTypes().get(13);
=======
getDescriptor().getMessageTypes().get(8);
>>>>>>>
getDescriptor().getMessageTypes().get(14);
<<<<<<<
getDescriptor().getMessageTypes().get(14);
=======
getDescriptor().getMessageTypes().get(9);
>>>>>>>
getDescriptor().getMessageTypes().get(15);
<<<<<<<
getDescriptor().getMessageTypes().get(15);
=======
getDescriptor().getMessageTypes().get(10);
>>>>>>>
getDescriptor().getMessageTypes().get(16);
<<<<<<<
getDescriptor().getMessageTypes().get(18);
=======
getDescriptor().getMessageTypes().get(11);
>>>>>>>
getDescriptor().getMessageTypes().get(19);
<<<<<<<
getDescriptor().getMessageTypes().get(19);
=======
getDescriptor().getMessageTypes().get(12);
>>>>>>>
getDescriptor().getMessageTypes().get(20); |
<<<<<<<
import java.util.List;
=======
import java.util.LinkedHashMap;
>>>>>>>
import java.util.List;
import java.util.LinkedHashMap; |
<<<<<<<
public abstract class AbstractTreeWalker<E> implements Poolable {
protected static final Logger LOG = Logger.getLogger(AbstractTreeWalker.class);
=======
public abstract class AbstractTreeWalker<E> {
private static final Logger LOG = Logger.getLogger(AbstractTreeWalker.class);
>>>>>>>
public abstract class AbstractTreeWalker<E> implements Poolable {
private static final Logger LOG = Logger.getLogger(AbstractTreeWalker.class);
<<<<<<<
// if (!this.visited.contains(element)) {
AbstractTreeWalker.Children<E> children = this.getChildren(element);
this.populate_children(children, element);
if (trace) LOG.trace("Populate Children: " + children);
for (E child : children.before_list) {
if (this.allow_revisit || this.visited.contains(child) == false) {
if (trace) LOG.trace("Traversing child " + child + "' before " + element);
this.traverse(child);
}
} // FOR
// Why is this here and not up above when we update the stack?
this.visited.add(element);
if (trace) LOG.trace("callback(" + element + ")");
this.callback(element);
=======
AbstractTreeWalker<E>.Children children = this.getChildren(element);
this.populate_children(children, element);
if (trace) LOG.trace("Populate Children: " + children);
for (E child : children.before_list) {
if (this.allow_revisit || this.visited.contains(child) == false) {
if (trace) LOG.trace("Traversing child " + child + "' before " + element);
this.traverse(child);
}
if (this.stop) break;
} // FOR
if (this.stop) {
if (trace) LOG.trace("Stop Called. Halting traversal.");
return;
}
// Why is this here and not up above when we update the stack?
this.visited.add(element);
if (trace) LOG.trace("callback(" + element + ")");
this.callback(element);
if (this.stop) {
if (trace) LOG.trace("Stop Called. Halting traversal.");
return;
}
>>>>>>>
AbstractTreeWalker.Children<E> children = this.getChildren(element);
this.populate_children(children, element);
if (trace) LOG.trace("Populate Children: " + children);
for (E child : children.before_list) {
if (this.allow_revisit || this.visited.contains(child) == false) {
if (trace) LOG.trace("Traversing child " + child + "' before " + element);
this.traverse(child);
}
if (this.stop) break;
} // FOR
if (this.stop) {
if (trace) LOG.trace("Stop Called. Halting traversal.");
return;
}
if (trace) LOG.trace("callback(" + element + ")");
this.callback(element);
// Why is this here and not up above when we update the stack?
this.visited.add(element);
if (trace) LOG.trace("callback(" + element + ")");
this.callback(element);
if (this.stop) {
if (trace) LOG.trace("Stop Called. Halting traversal.");
return;
} |
<<<<<<<
this.force_singlePartition = forceSinglePartition;
=======
this.enable_unique_ids = hstore_conf.site.planner_unique_dependency_ids;
>>>>>>>
this.force_singlePartition = forceSinglePartition;
this.enable_unique_ids = hstore_conf.site.planner_unique_dependency_ids; |
<<<<<<<
if (this.hstore_conf.site.mr_map_blocking) {
hstore_site.getTransactionQueueManager().finished(txn_id, Status.OK, this.partitionId);
}
=======
hstore_site.getTransactionQueueManager().lockFinished(txn_id, Status.OK, this.partitionId);
>>>>>>>
if (this.hstore_conf.site.mr_map_blocking) {
hstore_site.getTransactionQueueManager().lockFinished(txn_id, Status.OK, this.partitionId);
} |
<<<<<<<
if (DeviceImpl.checkReachability(RCClient.getContext()) == DeviceImpl.ReachabilityState.REACHABILITY_NONE) {
Log.e(TAG, "connect(): No reachability");
// Phone state Intents to capture connection failed event
String username = "";
if (parameters != null && parameters.get("username") != null)
username = parameters.get("username").toString();
sendNoConnectionIntent(username, this.getReachability().toString());
=======
RCLogger.i(TAG, "connect(): " + parameters.toString());
if (DeviceImpl.checkReachability(RCClient.getContext()) == RCDeviceListener.RCConnectivityStatus.RCConnectivityStatusNone) {
RCLogger.e(TAG, "connect(): No reachability");
>>>>>>>
RCLogger.i(TAG, "connect(): " + parameters.toString());
if (DeviceImpl.checkReachability(RCClient.getContext()) == RCDeviceListener.RCConnectivityStatus.RCConnectivityStatusNone) {
RCLogger.e(TAG, "connect(): No reachability");
// Phone state Intents to capture connection failed event
String username = "";
if (parameters != null && parameters.get("username") != null)
username = parameters.get("username").toString();
sendNoConnectionIntent(username, this.getReachability().toString());
<<<<<<<
// Phone state Intents to capture incoming call event
private void sendIncomingConnectionIntent (String user, RCConnection connection)
{
Intent intent = new Intent ("org.mobicents.restcomm.android.CALL_STATE");
intent.putExtra("STATE", "ringing");
intent.putExtra("INCOMING", true);
intent.putExtra("FROM", user);
Context context = RCClient.getContext();
context.sendBroadcast(intent);
}
private void sendNoConnectionIntent (String user, String message)
{
Intent intent = new Intent ("org.mobicents.restcomm.android.CONNECT_FAILED");
intent.putExtra("STATE", "connect failed");
intent.putExtra("ERRORTEXT", message);
intent.putExtra("ERROR", RCClient.ErrorCodes.NO_CONNECTIVITY.ordinal());
intent.putExtra("INCOMING", false);
intent.putExtra("USER", user);
Context context = RCClient.getContext();
context.sendBroadcast(intent);
}
=======
public void onSipUAError(final RCClient.ErrorCodes errorCode, final String errorText)
{
RCLogger.i(TAG, "onSipUAError()");
final RCDevice device = this;
// Important: need to fire the event in UI context cause currently we might be in JAIN SIP thread
Handler mainHandler = new Handler(RCClient.getContext().getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
if (device.listener != null) {
if (errorCode == RCClient.ErrorCodes.SIGNALLING_REGISTER_AUTH_ERROR ||
errorCode == RCClient.ErrorCodes.SIGNALLING_REGISTER_ERROR) {
state = DeviceState.OFFLINE;
device.listener.onConnectivityUpdate(device, RCDeviceListener.RCConnectivityStatus.RCConnectivityStatusNone);
}
device.listener.onStopListening(device, errorCode.ordinal(), errorText);
}
}
};
mainHandler.post(myRunnable);
}
public void onSipUARegisterSuccess(SipEvent event)
{
RCLogger.i(TAG, "onSipUARegisterSuccess()");
final RCDevice device = this;
final RCDeviceListener.RCConnectivityStatus state = this.reachabilityState;
// Important: need to fire the event in UI context cause currently we might be in JAIN SIP thread
Handler mainHandler = new Handler(RCClient.getContext().getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
if (device.listener != null) {
if (device.state == DeviceState.OFFLINE) {
device.state = DeviceState.READY;
device.listener.onConnectivityUpdate(device, state);
}
}
}
};
mainHandler.post(myRunnable);
}
>>>>>>>
public void onSipUAError(final RCClient.ErrorCodes errorCode, final String errorText)
{
RCLogger.i(TAG, "onSipUAError()");
final RCDevice device = this;
// Important: need to fire the event in UI context cause currently we might be in JAIN SIP thread
Handler mainHandler = new Handler(RCClient.getContext().getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
if (device.listener != null) {
if (errorCode == RCClient.ErrorCodes.SIGNALLING_REGISTER_AUTH_ERROR ||
errorCode == RCClient.ErrorCodes.SIGNALLING_REGISTER_ERROR) {
state = DeviceState.OFFLINE;
device.listener.onConnectivityUpdate(device, RCDeviceListener.RCConnectivityStatus.RCConnectivityStatusNone);
}
device.listener.onStopListening(device, errorCode.ordinal(), errorText);
}
}
};
mainHandler.post(myRunnable);
}
public void onSipUARegisterSuccess(SipEvent event) {
RCLogger.i(TAG, "onSipUARegisterSuccess()");
final RCDevice device = this;
final RCDeviceListener.RCConnectivityStatus state = this.reachabilityState;
// Important: need to fire the event in UI context cause currently we might be in JAIN SIP thread
Handler mainHandler = new Handler(RCClient.getContext().getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
if (device.listener != null) {
if (device.state == DeviceState.OFFLINE) {
device.state = DeviceState.READY;
device.listener.onConnectivityUpdate(device, state);
}
}
}
};
mainHandler.post(myRunnable);
} |
<<<<<<<
// Phone state Intents to capture incoming call event
private void sendIncomingConnectionIntent (String user, RCConnection connection)
{
Intent intent = new Intent ("org.mobicents.restcomm.android.CALL_STATE");
intent.putExtra("STATE", "ringing");
intent.putExtra("INCOMING", true);
intent.putExtra("FROM", user);
Context context = RCClient.getContext();
try {
// Restrict the Intent to MMC Handler running within the same application
Class aclass = Class.forName("com.cortxt.app.mmccore.Services.Intents.MMCIntentHandler");
intent.setClass(context.getApplicationContext(), aclass);
context.sendBroadcast(intent);
}
catch (ClassNotFoundException e)
{
// If there is no MMC class isn't here, no intent
}
}
private void sendNoConnectionIntent (String user, String message) {
Intent intent = new Intent("org.mobicents.restcomm.android.CONNECT_FAILED");
intent.putExtra("STATE", "connect failed");
intent.putExtra("ERRORTEXT", message);
intent.putExtra("ERROR", RCClient.ErrorCodes.NO_CONNECTIVITY.ordinal());
intent.putExtra("INCOMING", false);
intent.putExtra("USER", user);
Context context = RCClient.getContext();
try {
// Restrict the Intent to MMC Handler running within the same application
Class aclass = Class.forName("com.cortxt.app.mmccore.Services.Intents.MMCIntentHandler");
intent.setClass(context.getApplicationContext(), aclass);
context.sendBroadcast(intent);
}
catch (ClassNotFoundException e)
{
// If there is no MMC class isn't here, no intent
}
}
=======
public SipProfile getSipProfile()
{
return sipProfile;
}
>>>>>>>
// Phone state Intents to capture incoming call event
private void sendIncomingConnectionIntent (String user, RCConnection connection)
{
Intent intent = new Intent ("org.mobicents.restcomm.android.CALL_STATE");
intent.putExtra("STATE", "ringing");
intent.putExtra("INCOMING", true);
intent.putExtra("FROM", user);
Context context = RCClient.getContext();
try {
// Restrict the Intent to MMC Handler running within the same application
Class aclass = Class.forName("com.cortxt.app.mmccore.Services.Intents.MMCIntentHandler");
intent.setClass(context.getApplicationContext(), aclass);
context.sendBroadcast(intent);
}
catch (ClassNotFoundException e)
{
// If there is no MMC class isn't here, no intent
}
}
private void sendNoConnectionIntent (String user, String message) {
Intent intent = new Intent("org.mobicents.restcomm.android.CONNECT_FAILED");
intent.putExtra("STATE", "connect failed");
intent.putExtra("ERRORTEXT", message);
intent.putExtra("ERROR", RCClient.ErrorCodes.NO_CONNECTIVITY.ordinal());
intent.putExtra("INCOMING", false);
intent.putExtra("USER", user);
Context context = RCClient.getContext();
try {
// Restrict the Intent to MMC Handler running within the same application
Class aclass = Class.forName("com.cortxt.app.mmccore.Services.Intents.MMCIntentHandler");
intent.setClass(context.getApplicationContext(), aclass);
context.sendBroadcast(intent);
} catch (ClassNotFoundException e) {
// If there is no MMC class isn't here, no intent
}
}
public SipProfile getSipProfile()
{
return sipProfile;
} |
<<<<<<<
=======
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Observable;
import java.util.Observer;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import junit.framework.Assert;
>>>>>>>
<<<<<<<
final CBLReplicator repl = database.getReplicator(remote, false, false, manager.getWorkExecutor());
AsyncTask replicationTask = new AsyncTask<Object, Object, Object>() {
@Override
protected Object doInBackground(Object... aParams) {
// Push them to the remote:
repl.start();
Assert.assertTrue(repl.isRunning());
return null;
}
=======
final CBLReplicator repl = database.getReplicator(remote, false, false, server.getWorkExecutor());
>>>>>>>
final CBLReplicator repl = database.getReplicator(remote, false, false, manager.getWorkExecutor()); |
<<<<<<<
=======
import org.apache.http.impl.client.trunk.BasicCookieStore;
>>>>>>>
import org.apache.http.impl.client.trunk.BasicCookieStore;
<<<<<<<
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.concurrent.ScheduledExecutorService;
=======
import android.net.Uri;
import android.os.Handler;
import android.util.Log;
import com.couchbase.cblite.CBLDatabase;
import com.couchbase.cblite.CBLServer;
>>>>>>>
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.concurrent.ScheduledExecutorService;
import android.net.Uri; |
<<<<<<<
public RemoteMultipartDownloaderRequest(HttpClientFactory clientFactory,
String method,
URL url,
Object body,
Database db,
Map<String, Object> requestHeaders,
RemoteRequestCompletionBlock onCompletion) {
super(clientFactory, method, url, body, db, requestHeaders, onCompletion);
=======
public RemoteMultipartDownloaderRequest(ScheduledExecutorService workExecutor,
HttpClientFactory clientFactory,
String method, URL url,
boolean cancelable,
Object body, Database db,
Map<String, Object> requestHeaders,
RemoteRequestCompletionBlock onCompletion) {
super(workExecutor, clientFactory, method, url, cancelable, body, db, requestHeaders, onCompletion);
>>>>>>>
public RemoteMultipartDownloaderRequest(HttpClientFactory clientFactory,
String method,
URL url,
boolean cancelable,
Object body,
Database db,
Map<String, Object> requestHeaders,
RemoteRequestCompletionBlock onCompletion) {
super(clientFactory, method, url, cancelable, body, db, requestHeaders, onCompletion); |
<<<<<<<
=======
private static final String LSM_LOCAL_METAGRAPH = "lsm-light.server.localMetaGraph";
private static final String LSM_LOCAL_DATAGRAPH = "lsm-light.server.localDataGraph";
<<<<<<< /mnt/batch/tasks/workitems/adfv2-General_1/job-1/e01309fd-1428-47ea-a6e6-4f5b0907aa5f/wd/.temp/athenacommon/27a37284-2dbd-4fb1-8ab2-e7ca8deba142.java
>>>>>>> remotes/origin/sensor-type-support
=======
private static final String LSM_DERI_SERVER = "http://lsm.deri.ie/lsm-light.server/";
>>>>>>>
private static final String LSM_LOCAL_METAGRAPH = "lsm-light.server.localMetaGraph";
private static final String LSM_LOCAL_DATAGRAPH = "lsm-light.server.localDataGraph";
<<<<<<<
=======
public String getLSMLocalMetaGraph(){
return props.getProperty(LSM_LOCAL_METAGRAPH);
}
public String getLSMLocalDataGraph(){
return props.getProperty(LSM_LOCAL_DATAGRAPH);
}
<<<<<<< /mnt/batch/tasks/workitems/adfv2-General_1/job-1/e01309fd-1428-47ea-a6e6-4f5b0907aa5f/wd/.temp/athenacommon/27a37284-2dbd-4fb1-8ab2-e7ca8deba142.java
>>>>>>> remotes/origin/sensor-type-support
=======
>>>>>>>
public String getLSMLocalMetaGraph(){
return props.getProperty(LSM_LOCAL_METAGRAPH);
}
public String getLSMLocalDataGraph(){
return props.getProperty(LSM_LOCAL_DATAGRAPH);
} |
<<<<<<<
import static com.stratio.deep.commons.extractor.server.ExtractorServer.initExtractorServer;
import static com.stratio.deep.commons.extractor.server.ExtractorServer.stopExtractorServer;
=======
import com.mongodb.QueryBuilder;
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
import com.stratio.deep.commons.filter.Filter;
import com.stratio.deep.core.context.DeepSparkContext;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.mongodb.extractor.MongoCellExtractor;
import com.stratio.deep.utils.ContextProperties;
import org.apache.log4j.Logger;
import org.apache.spark.rdd.RDD;
import org.bson.BSONObject;
import org.bson.BasicBSONObject;
>>>>>>>
<<<<<<<
import org.apache.log4j.Logger;
import org.apache.spark.rdd.RDD;
import org.bson.BSONObject;
import org.bson.BasicBSONObject;
import com.mongodb.QueryBuilder;
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.core.context.DeepSparkContext;
import com.stratio.deep.mongodb.extractor.MongoCellExtractor;
import com.stratio.deep.utils.ContextProperties;
=======
import static com.stratio.deep.commons.extractor.server.ExtractorServer.initExtractorServer;
import static com.stratio.deep.commons.extractor.server.ExtractorServer.stopExtractorServer;
import static com.stratio.deep.commons.extractor.utils.ExtractorConstants.FILTER_QUERY;
>>>>>>>
<<<<<<<
initExtractorServer();
=======
>>>>>>>
<<<<<<<
values.put("database", database);
values.put("collection", inputCollection);
values.put("host", host);
=======
values.put(ExtractorConstants.DATABASE, database);
values.put(ExtractorConstants.FILTER_QUERY, filters);
values.put(ExtractorConstants.COLLECTION, inputCollection);
values.put(ExtractorConstants.HOST, host);
>>>>>>>
<<<<<<<
stopExtractorServer();
=======
>>>>>>> |
<<<<<<<
=======
import com.datastax.driver.core.Session;
import com.stratio.deep.commons.config.IDeepJobConfig;
import com.stratio.deep.commons.entity.Cell;
import com.stratio.deep.commons.filter.Filter;
>>>>>>>
import com.datastax.driver.core.Session;
import com.stratio.deep.commons.config.IDeepJobConfig;
import com.stratio.deep.commons.entity.Cell;
import com.stratio.deep.commons.filter.Filter; |
<<<<<<<
import java.text.SimpleDateFormat;
import java.util.Map.Entry;
=======
>>>>>>>
import java.util.Map.Entry; |
<<<<<<<
import com.stratio.deep.commons.querybuilder.UpdateQueryBuilder;
=======
import java.util.List;
>>>>>>>
import com.stratio.deep.commons.querybuilder.UpdateQueryBuilder;
import java.util.List;
<<<<<<<
void initSave(S config, T first, UpdateQueryBuilder queryBuilder);
=======
/**
* Init save.
*
* @param config the config
* @param first the first
*/
void initSave(S config, T first);
/**
* Gets preferred locations.
*
* @param split the split
* @return the preferred locations
*/
List<String> getPreferredLocations(Partition split);
>>>>>>>
void initSave(S config, T first, UpdateQueryBuilder queryBuilder);
/**
* Gets preferred locations.
*
* @param split the split
* @return the preferred locations
*/
List<String> getPreferredLocations(Partition split); |
<<<<<<<
import com.stratio.deep.entity.CassandraCell;
=======
import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.util.*;
>>>>>>>
import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.util.*;
import com.stratio.deep.entity.CassandraCell;
<<<<<<<
@Test
public void testCellList2Tuple() {
Cell domainName = CassandraCell.create("domain_name", "");
Cell id2 = CassandraCell.create("id2", "", false, true);
Cell responseTime = CassandraCell.create("response_time", "");
Cell url = CassandraCell.create("url", "");
Cell id1 = CassandraCell.create("id1", "", true, false);
Cell id3 = CassandraCell.create("id3", "", true, false);
Cell responseCode = CassandraCell.create("response_code", "");
Cell downloadTime = CassandraCell.create("download_time", "");
Cells cells = new Cells(
domainName,
id2,
responseTime,
url,
id1,
id3,
responseCode,
downloadTime);
Tuple2<Cells, Cells> tuple = cellList2tuple(cells);
assertNotNull(tuple);
assertEquals(tuple._1().size(), 3);
assertEquals(tuple._2().size(), 5);
assertEquals(tuple._2().getCellByName("domain_name"), domainName);
assertEquals(tuple._2().getCellByName("response_time"), responseTime);
assertEquals(tuple._2().getCellByName("download_time"), downloadTime);
assertEquals(tuple._2().getCellByName("response_code"), responseCode);
assertEquals(tuple._1().getCellByName("id2"), id2);
assertEquals(tuple._1().getCellByName("id1"), id1);
assertEquals(tuple._1().getCellByName("id3"), id3);
}
=======
>>>>>>> |
<<<<<<<
// //Call async the Extractor netty Server
ExtractorServer.initExtractorServer();
=======
>>>>>>> |
<<<<<<<
=======
/**
* Builds the partition key in {@link ByteBuffer} format for the given values.
*
* @param equalsList
* List of equals field and value pairs.
* @param inValue
* Value for the operator in.
*
* @return {@link ByteBuffer} with the partition key.
*/
private ByteBuffer getPartitionKey(List<Pair<String, Serializable>> equalsList, Serializable inValue) {
assert (equalsList.size() + 1) == ((CompositeType) keyValidator).componentsCount();
>>>>>>>
/**
* Builds the partition key in {@link ByteBuffer} format for the given values.
*
* @param equalsList List of equals field and value pairs.
* @param inValue Value for the operator in.
* @return with the partition key.
*/
private ByteBuffer getPartitionKey(List<Pair<String, Serializable>> equalsList, Serializable inValue) {
assert (equalsList.size() + 1) == ((CompositeType) keyValidator).componentsCount(); |
<<<<<<<
=======
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.rdd.RDD;
>>>>>>>
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.rdd.RDD;
<<<<<<<
import com.stratio.deep.commons.entity.Cells;
=======
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
>>>>>>>
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
<<<<<<<
/**
* Returns the associated JavaSQLContext.
* @return Associated JavaSQLContext.
*/
public JavaSQLContext getSQLContext() {
return this.sqlContext;
}
=======
public JavaRDD<Cells> createHDFSRDD(ExtractorConfig<Cells> config){
Serializable host = config.getValues().get(ExtractorConstants.HOST);
Serializable port = config.getValues().get(ExtractorConstants.PORT);
Serializable path = config.getValues().get(ExtractorConstants.HDFS_FILE_PATH);
final TextFileDataTable textFileDataTable = createTextFileMetaDataFromConfig(config);
if(config.getExtractorImplClassName().equals(ExtractorConstants.HDFS)){
path = ExtractorConstants.HDFS_PREFIX + host.toString() + ":" + port + path.toString();
}else{
path = path.toString();
}
RDD<String> result = this.sc().textFile(path.toString(), 1);
JavaRDD<Cells> resultCells = result.toJavaRDD().map(new MapSchemaFromLines(textFileDataTable));
return resultCells;
}
private TextFileDataTable createTextFileMetaDataFromConfig(ExtractorConfig<Cells> extractorConfig) {
if(extractorConfig.getValues().get(ExtractorConstants.HDFS_FILEDATATABLE)!=null ){
final TextFileDataTable textFileDataTable = (TextFileDataTable)extractorConfig.getValues().get(ExtractorConstants.HDFS_FILEDATATABLE);
return textFileDataTable;
}else {
Serializable separator = extractorConfig.getValues().get(ExtractorConstants.HDFS_FILE_SEPARATOR);
String catalogName = (String) extractorConfig.getValues().get(ExtractorConstants.CATALOG);
String tableName = (String) extractorConfig.getValues().get(ExtractorConstants.TABLE);
final String splitSep = separator.toString();
final ArrayList<SchemaMap<?>> columns = (ArrayList<SchemaMap<?>>) extractorConfig.getValues().get
(ExtractorConstants.HDFS_SCHEMA);
final TextFileDataTable textFileDataTableTemp = new TextFileDataTable(new TableName(catalogName, tableName),
columns);
textFileDataTableTemp.setLineSeparator(splitSep);
return textFileDataTableTemp;
}
}
>>>>>>>
/**
* Returns the associated JavaSQLContext.
* @return Associated JavaSQLContext.
*/
public JavaSQLContext getSQLContext() {
return this.sqlContext;
}
public JavaRDD<Cells> createHDFSRDD(ExtractorConfig<Cells> config){
Serializable host = config.getValues().get(ExtractorConstants.HOST);
Serializable port = config.getValues().get(ExtractorConstants.PORT);
Serializable path = config.getValues().get(ExtractorConstants.HDFS_FILE_PATH);
final TextFileDataTable textFileDataTable = createTextFileMetaDataFromConfig(config);
if(config.getExtractorImplClassName().equals(ExtractorConstants.HDFS)){
path = ExtractorConstants.HDFS_PREFIX + host.toString() + ":" + port + path.toString();
}else{
path = path.toString();
}
RDD<String> result = this.sc().textFile(path.toString(), 1);
JavaRDD<Cells> resultCells = result.toJavaRDD().map(new MapSchemaFromLines(textFileDataTable));
return resultCells;
}
private TextFileDataTable createTextFileMetaDataFromConfig(ExtractorConfig<Cells> extractorConfig) {
if(extractorConfig.getValues().get(ExtractorConstants.HDFS_FILEDATATABLE)!=null ){
final TextFileDataTable textFileDataTable = (TextFileDataTable)extractorConfig.getValues().get(ExtractorConstants.HDFS_FILEDATATABLE);
return textFileDataTable;
}else {
Serializable separator = extractorConfig.getValues().get(ExtractorConstants.HDFS_FILE_SEPARATOR);
String catalogName = (String) extractorConfig.getValues().get(ExtractorConstants.CATALOG);
String tableName = (String) extractorConfig.getValues().get(ExtractorConstants.TABLE);
final String splitSep = separator.toString();
final ArrayList<SchemaMap<?>> columns = (ArrayList<SchemaMap<?>>) extractorConfig.getValues().get
(ExtractorConstants.HDFS_SCHEMA);
final TextFileDataTable textFileDataTableTemp = new TextFileDataTable(new TableName(catalogName, tableName),
columns);
textFileDataTableTemp.setLineSeparator(splitSep);
return textFileDataTableTemp;
}
} |
<<<<<<<
=======
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.entity.Cell;
import com.stratio.deep.core.context.DeepSparkContext;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.extractor.ESCellExtractor;
import com.stratio.deep.commons.extractor.server.ExtractorServer;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
import com.stratio.deep.utils.ContextProperties;
>>>>>>>
<<<<<<<
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
import com.stratio.deep.core.context.DeepSparkContext;
import com.stratio.deep.entity.ESCell;
import com.stratio.deep.extractor.ESCellExtractor;
import com.stratio.deep.utils.ContextProperties;
import scala.Tuple2;
=======
import java.io.Serializable;
import java.util.*;
>>>>>>>
<<<<<<<
String host = "localhost:9200";
String database = "cell/input";
String index = "book";
String type = "test";
String databaseOutput = "cell/output";
=======
String host = "localhost:9200";
String index = "book";
String type = "test";
String typeOut = "out";
>>>>>>>
<<<<<<<
values.put(ExtractorConstants.DATABASE, database);
values.put(ExtractorConstants.HOST, host);
=======
values.put(ExtractorConstants.INDEX, index);
values.put(ExtractorConstants.TYPE, type);
values.put(ExtractorConstants.HOST, host );
>>>>>>>
<<<<<<<
return new Cells(ESCell.create("word", stringIntegerTuple2._1()),
ESCell.create("count", stringIntegerTuple2._2()));
=======
return new Cells(Cell.create("word", stringIntegerTuple2._1()) , Cell.create("count", stringIntegerTuple2._2()));
>>>>>>>
<<<<<<<
outputConfigEntity.putValue(ExtractorConstants.HOST, host).putValue(ExtractorConstants.DATABASE, databaseOutput)
.putValue(ExtractorConstants.CREATE_ON_WRITE, "true");
=======
outputConfigEntity.putValue(ExtractorConstants.HOST, host)
.putValue(ExtractorConstants.INDEX, index)
.putValue(ExtractorConstants.TYPE, typeOut);
>>>>>>> |
<<<<<<<
=======
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import com.stratio.deep.commons.entity.Cells;
import com.stratio.deep.commons.utils.Pair;
>>>>>>>
<<<<<<<
public class ExtractorConfig<T> implements Serializable, Cloneable {
private static final long serialVersionUID = -7342575785285363891L;
=======
public class ExtractorConfig<T> extends BaseConfig<T> implements Serializable {
>>>>>>>
public class ExtractorConfig<T> extends BaseConfig<T> implements Serializable, Cloneable {
<<<<<<<
public String getExtractorImplClassName() {
return extractorImplClassName;
}
public void setExtractorImplClassName(String extractorImplClassName) {
this.extractorImplClassName = extractorImplClassName;
}
public String getString(String key) {
=======
public String getString(String key) {
>>>>>>>
public String getExtractorImplClassName() {
return extractorImplClassName;
}
public void setExtractorImplClassName(String extractorImplClassName) {
this.extractorImplClassName = extractorImplClassName;
}
public String getString(String key) { |
<<<<<<<
=======
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.core.context.DeepSparkContext;
import com.stratio.deep.core.entity.BookEntity;
import com.stratio.deep.core.entity.CantoEntity;
import com.stratio.deep.core.entity.WordCount;
import com.stratio.deep.extractor.ESEntityExtractor;
import com.stratio.deep.commons.extractor.utils.ExtractorConstants;
import com.stratio.deep.utils.ContextProperties;
>>>>>>>
<<<<<<<
String host = "localhost:9200";
String database = "book/word";
String index = "book";
String type = "test";
String database2 = "entity/output";
=======
String host = "localhost:9200";
String index = "book";
String type = "test";
String typeOut = "out";
>>>>>>>
<<<<<<<
values.put(ExtractorConstants.DATABASE, database);
values.put(ExtractorConstants.HOST, host);
=======
values.put(ExtractorConstants.INDEX, index);
values.put(ExtractorConstants.TYPE, type );
>>>>>>> |
<<<<<<<
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
=======
import java.util.List;
>>>>>>>
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import java.util.List; |
<<<<<<<
import java.util.List;
import javax.net.ssl.SSLException;
import org.apache.spark.Partition;
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.config.IDeepJobConfig;
import com.stratio.deep.commons.exception.DeepExtractorinitializationException;
import com.stratio.deep.commons.rdd.IExtractor;
=======
>>>>>>>
import java.util.List;
import javax.net.ssl.SSLException;
import org.apache.spark.Partition;
import com.stratio.deep.commons.config.ExtractorConfig;
import com.stratio.deep.commons.exception.DeepExtractorinitializationException;
import com.stratio.deep.commons.rdd.IExtractor; |
<<<<<<<
for (Cell cell : localCells) {
Cell otherCell = o.getCellByName(entry.getKey(), cell.getCellName());
if (otherCell == null) {
return false;
}
=======
if (otherCell == null || !otherCell.equals(cell)) {
return false;
}
}
}
>>>>>>>
for (Cell cell : localCells) {
Cell otherCell = o.getCellByName(entry.getKey(), cell.getCellName()); |
<<<<<<<
initExtractorServer();
=======
>>>>>>> |
<<<<<<<
import java.util.Timer;
import java.util.TimerTask;
=======
>>>>>>>
import java.util.Timer;
import java.util.TimerTask;
<<<<<<<
protected float mFrameTime;
private boolean mIsProcessing;
private GVRWorldTask gvrWorldTask;
private static final long DEFAULT_INTERVAL = 15;
=======
protected float mFrameTime;
private boolean mIsProcessing;
>>>>>>>
protected float mFrameTime;
private boolean mIsProcessing;
private GVRWorldTask gvrWorldTask;
private static final long DEFAULT_INTERVAL = 15;
<<<<<<<
=======
@Override
public void onDrawFrame(float frameTime) {
mFrameTime += frameTime;
if (mIsProcessing) {
return;
}
mIsProcessing = true;
NativePhysics3DWorld.step(getNative(), mFrameTime);
generateCollisionEvents();
mFrameTime = 0.0f;
mIsProcessing = false;
}
>>>>>>> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.