conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import org.loklak.api.server.FossasiaPushServlet;
import org.loklak.api.server.ImportProfileServlet;
=======
import org.loklak.api.server.push.FossasiaPushServlet;
import org.loklak.api.server.push.OpenWifiMapPushServlet;
import org.loklak.api.server.push.NodelistPushServlet;
import org.loklak.api.server.push.FreifunkNodePushServlet;
import org.loklak.api.server.push.NetmonPushServlet;
>>>>>>>
import org.loklak.api.server.push.FossasiaPushServlet;
import org.loklak.api.server.push.OpenWifiMapPushServlet;
import org.loklak.api.server.push.NodelistPushServlet;
import org.loklak.api.server.push.FreifunkNodePushServlet;
import org.loklak.api.server.push.NetmonPushServlet;
import org.loklak.api.server.ImportProfileServlet; |
<<<<<<<
ListUserSettings.class,
ExpertListService.class,
ExpertExampleService.class,
=======
ListSkillService.class,
ExampleSkillService.class,
>>>>>>>
ListUserSettings.class,
ExpertListService.class,
ExpertExampleService.class,
ListSkillService.class,
ExampleSkillService.class, |
<<<<<<<
import android.os.Parcelable;
import android.support.v4.app.ActionBarDrawerToggle;
=======
>>>>>>>
import android.os.Parcelable; |
<<<<<<<
=======
import de.saxsys.mvvmfx.*;
import net.jodah.typetools.TypeResolver;
import java.lang.annotation.Annotation;
import de.saxsys.mvvmfx.InjectViewModel;
import de.saxsys.mvvmfx.ViewModel;
import net.jodah.typetools.TypeResolver;
>>>>>>>
import java.lang.annotation.Annotation; |
<<<<<<<
import de.saxsys.jfx.mvvm.viewloader.ViewLoader;
import javafx.application.Application;
import javafx.application.HostServices;
import javafx.stage.Stage;
=======
>>>>>>>
import javafx.application.Application;
import javafx.application.HostServices;
import javafx.stage.Stage; |
<<<<<<<
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.saxsys.mvvmfx.ViewModel;
import de.saxsys.mvvmfx.ViewTuple;
=======
>>>>>>>
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.saxsys.mvvmfx.ViewModel;
import de.saxsys.mvvmfx.ViewTuple;
<<<<<<<
if (viewModel != null) {
ResourceBundleInjector.injectResourceBundle(viewModel, resourceBundle);
ViewLoaderReflectionUtils.injectScope(viewModel);
ViewLoaderReflectionUtils.initializeViewModel(viewModel);
ViewLoaderReflectionUtils.injectViewModel(view, viewModel);
}
if (view instanceof Initializable) {
=======
// if no ViewModel is available...
if (viewModel == null) {
// we need to check if the user is trying to inject a viewModel.
final List<Field> viewModelFields = ViewLoaderReflectionUtils.getViewModelFields(viewType);
if(!viewModelFields.isEmpty()) {
throw new RuntimeException("The given view of type <" + view.getClass() + "> has no generic viewModel type declared but tries to inject a viewModel.");
}
} else {
ResourceBundleInjector.injectResourceBundle(viewModel, resourceBundle);
ViewLoaderReflectionUtils.initializeViewModel(viewModel);
ViewLoaderReflectionUtils.injectViewModel(view, viewModel);
}
if (view instanceof Initializable) {
>>>>>>>
// if no ViewModel is available...
if (viewModel == null) {
// we need to check if the user is trying to inject a viewModel.
final List<Field> viewModelFields = ViewLoaderReflectionUtils.getViewModelFields(viewType);
if(!viewModelFields.isEmpty()) {
throw new RuntimeException("The given view of type <" + view.getClass() + "> has no generic viewModel type declared but tries to inject a viewModel.");
}
} else {
ResourceBundleInjector.injectResourceBundle(viewModel, resourceBundle);
ViewLoaderReflectionUtils.injectScope(viewModel);
ViewLoaderReflectionUtils.initializeViewModel(viewModel);
ViewLoaderReflectionUtils.injectViewModel(view, viewModel);
}
if (view instanceof Initializable) { |
<<<<<<<
//currently we only examine the first class that is annotated with @ApplicationPath so best
//fail if there the user code has multiple such annotations instead of surprising the user
//at runtime
if (app.size() > 1) {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (AnnotationInstance annotationInstance : app) {
if (first) {
first = false;
} else {
sb.append(",");
}
sb.append(annotationInstance.target().asClass().name().toString());
}
throw new RuntimeException("Multiple classes ( "+ sb.toString() + ") have been annotated with @ApplicationPath which is currently not supported");
}
AnnotationInstance appPath = app.iterator().next();
String path = appPath.value().asString();
String appClass = appPath.target().asClass().name().toString();
=======
>>>>>>>
//currently we only examine the first class that is annotated with @ApplicationPath so best
//fail if there the user code has multiple such annotations instead of surprising the user
//at runtime
if (app.size() > 1) {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (AnnotationInstance annotationInstance : app) {
if (first) {
first = false;
} else {
sb.append(",");
}
sb.append(annotationInstance.target().asClass().name().toString());
}
throw new RuntimeException("Multiple classes ( "+ sb.toString() + ") have been annotated with @ApplicationPath which is currently not supported");
} |
<<<<<<<
=======
private void sortByDate(boolean ascending){
getListOfFilesFragment().sortByDate(ascending);
}
private void sortBySize(boolean ascending){
getListOfFilesFragment().sortBySize(ascending);
}
private void sortByName(boolean ascending){
getListOfFilesFragment().sortByName(ascending);
}
>>>>>>>
private void sortByDate(boolean ascending){
getListOfFilesFragment().sortByDate(ascending);
}
private void sortBySize(boolean ascending){
getListOfFilesFragment().sortBySize(ascending);
}
private void sortByName(boolean ascending){
getListOfFilesFragment().sortByName(ascending);
} |
<<<<<<<
if(OrbotHelper.isOrbotRunning(mContext)) {
Log.d("DOWNLOAD/TOR", "ORBOT RUNNING, USE TOR");
=======
if(orbotHelper.isOrbotRunning()) {
Timber.d("ORBOT RUNNING, USE TOR");
>>>>>>>
if(OrbotHelper.isOrbotRunning(mContext)) {
Timber.d("ORBOT RUNNING, USE TOR"); |
<<<<<<<
import org.storymaker.app.R;
import timber.log.Timber;
=======
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import net.sqlcipher.database.SQLiteDatabase;
>>>>>>>
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.SharedPreferences;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import android.preference.PreferenceManager;
import net.sqlcipher.database.SQLiteDatabase;
<<<<<<<
import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteQueryBuilder;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.SharedPreferences;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.util.Log;
import java.util.Timer;
import java.util.TimerTask;
import info.guardianproject.cacheword.CacheWordHandler;
import info.guardianproject.cacheword.ICacheWordSubscriber;
=======
>>>>>>>
import java.util.Timer;
import java.util.TimerTask;
import info.guardianproject.cacheword.CacheWordHandler;
import info.guardianproject.cacheword.ICacheWordSubscriber; |
<<<<<<<
protected String section;
protected String location;
protected ArrayList<String> tags = new ArrayList<String>();
=======
protected Date createdAt; // long stored in database as 8-bit int
protected Date updatedAt; // long stored in database as 8-bit int
>>>>>>>
protected String section;
protected String location;
protected ArrayList<String> tags = new ArrayList<String>();
protected Date createdAt; // long stored in database as 8-bit int
protected Date updatedAt; // long stored in database as 8-bit int |
<<<<<<<
import org.apache.commons.io.FilenameUtils;
import org.storymaker.app.db.ExpansionIndexItemDao;
import org.storymaker.app.db.InstanceIndexItemDao;
import org.storymaker.app.model.Project;
import org.storymaker.app.server.LoginActivity;
import org.storymaker.app.server.ServerManager;
import info.guardianproject.onionkit.ui.OrbotHelper;
import rx.functions.Action1;
import scal.io.liger.DownloadHelper;
import scal.io.liger.IndexManager;
import scal.io.liger.JsonHelper;
import scal.io.liger.MainActivity;
import scal.io.liger.QueueManager;
import scal.io.liger.StorageHelper;
import scal.io.liger.ZipHelper;
import scal.io.liger.model.BaseIndexItem;
import scal.io.liger.model.ContentPackMetadata;
import scal.io.liger.model.ExpansionIndexItem;
import scal.io.liger.model.InstanceIndexItem;
import scal.io.liger.model.StoryPathLibrary;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import net.hockeyapp.android.CrashManager;
import net.hockeyapp.android.CrashManagerListener;
import net.hockeyapp.android.UpdateManager;
=======
>>>>>>>
<<<<<<<
import android.database.sqlite.SQLiteConstraintException;
=======
>>>>>>>
<<<<<<<
=======
import com.hannesdorfmann.sqlbrite.dao.DaoManager;
import net.hockeyapp.android.CrashManager;
import net.hockeyapp.android.CrashManagerListener;
import net.hockeyapp.android.UpdateManager;
import org.apache.commons.io.FilenameUtils;
import org.storymaker.app.model.Project;
import org.storymaker.app.server.LoginActivity;
import org.storymaker.app.server.ServerManager;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import info.guardianproject.onionkit.ui.OrbotHelper;
import rx.functions.Action1;
import scal.io.liger.JsonHelper;
import scal.io.liger.MainActivity;
import scal.io.liger.StorageHelper;
import scal.io.liger.StorymakerIndexManager;
import scal.io.liger.model.ContentPackMetadata;
import scal.io.liger.model.StoryPathLibrary;
import scal.io.liger.model.sqlbrite.AvailableIndexItem;
import scal.io.liger.model.sqlbrite.AvailableIndexItemDao;
import scal.io.liger.model.sqlbrite.BaseIndexItem;
import scal.io.liger.model.sqlbrite.ExpansionIndexItem;
import scal.io.liger.model.sqlbrite.InstalledIndexItem;
import scal.io.liger.model.sqlbrite.InstalledIndexItemDao;
import scal.io.liger.model.sqlbrite.InstanceIndexItem;
import scal.io.liger.model.sqlbrite.InstanceIndexItemDao;
import scal.io.liger.model.sqlbrite.QueueItemDao;
//import scal.io.liger.DownloadHelper;
//import scal.io.liger.IndexManager;
//import scal.io.liger.model.BaseIndexItem;
//import scal.io.liger.model.ExpansionIndexItem;
//import scal.io.liger.model.InstanceIndexItem;
>>>>>>>
import com.hannesdorfmann.sqlbrite.dao.DaoManager;
import net.hockeyapp.android.CrashManager;
import net.hockeyapp.android.CrashManagerListener;
import net.hockeyapp.android.UpdateManager;
import org.apache.commons.io.FilenameUtils;
import org.storymaker.app.model.Project;
import org.storymaker.app.server.LoginActivity;
import org.storymaker.app.server.ServerManager;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import info.guardianproject.onionkit.ui.OrbotHelper;
import rx.functions.Action1;
import scal.io.liger.JsonHelper;
import scal.io.liger.MainActivity;
import scal.io.liger.StorageHelper;
import scal.io.liger.StorymakerIndexManager;
import scal.io.liger.model.ContentPackMetadata;
import scal.io.liger.model.StoryPathLibrary;
import scal.io.liger.model.sqlbrite.AvailableIndexItem;
import scal.io.liger.model.sqlbrite.AvailableIndexItemDao;
import scal.io.liger.model.sqlbrite.BaseIndexItem;
import scal.io.liger.model.sqlbrite.ExpansionIndexItem;
import scal.io.liger.model.sqlbrite.InstalledIndexItem;
import scal.io.liger.model.sqlbrite.InstalledIndexItemDao;
import scal.io.liger.model.sqlbrite.InstanceIndexItem;
import scal.io.liger.model.sqlbrite.InstanceIndexItemDao;
import scal.io.liger.model.sqlbrite.QueueItemDao;
//import scal.io.liger.DownloadHelper;
//import scal.io.liger.IndexManager;
//import scal.io.liger.model.BaseIndexItem;
//import scal.io.liger.model.ExpansionIndexItem;
//import scal.io.liger.model.InstanceIndexItem;
<<<<<<<
import com.hannesdorfmann.sqlbrite.dao.DaoManager;
=======
>>>>>>>
<<<<<<<
// new stuff
private InstanceIndexItemDao instanceIndexItemDao;
private ExpansionIndexItemDao expansionIndexItemDao;
private DaoManager daoManager;
private int dbVersion = 1;
// must set dao stuff in constructor?
public HomeActivity() {
instanceIndexItemDao = new InstanceIndexItemDao();
expansionIndexItemDao = new ExpansionIndexItemDao();
daoManager = new DaoManager(HomeActivity.this, "Storymaker.db", dbVersion, instanceIndexItemDao, expansionIndexItemDao);
daoManager.setLogging(true);
}
=======
// new stuff
private InstanceIndexItemDao instanceIndexItemDao;
private AvailableIndexItemDao availableIndexItemDao;
private InstalledIndexItemDao installedIndexItemDao;
private QueueItemDao queueItemDao;
private DaoManager daoManager;
private int dbVersion = 1;
private HashMap<String, ArrayList<Thread>> downloadThreads = new HashMap<String, ArrayList<Thread>>();
// must set dao stuff in constructor?
public HomeActivity() {
instanceIndexItemDao = new InstanceIndexItemDao();
availableIndexItemDao = new AvailableIndexItemDao();
installedIndexItemDao = new InstalledIndexItemDao();
queueItemDao = new QueueItemDao();
daoManager = new DaoManager(HomeActivity.this, "Storymaker.db", dbVersion, instanceIndexItemDao, availableIndexItemDao, installedIndexItemDao, queueItemDao);
daoManager.setLogging(false);
}
>>>>>>>
// new stuff
private InstanceIndexItemDao instanceIndexItemDao;
private AvailableIndexItemDao availableIndexItemDao;
private InstalledIndexItemDao installedIndexItemDao;
private QueueItemDao queueItemDao;
private DaoManager daoManager;
private int dbVersion = 1;
private HashMap<String, ArrayList<Thread>> downloadThreads = new HashMap<String, ArrayList<Thread>>();
// must set dao stuff in constructor?
public HomeActivity() {
instanceIndexItemDao = new InstanceIndexItemDao();
availableIndexItemDao = new AvailableIndexItemDao();
installedIndexItemDao = new InstalledIndexItemDao();
queueItemDao = new QueueItemDao();
daoManager = new DaoManager(HomeActivity.this, "Storymaker.db", dbVersion, instanceIndexItemDao, availableIndexItemDao, installedIndexItemDao, queueItemDao);
daoManager.setLogging(false);
}
<<<<<<<
// dumb test
// put in values
for (InstanceIndexItem item : instanceIndex.values()) {
instanceIndexItemDao.addInstanceIndexItem(item);
}
// read out values
instanceIndexItemDao.getInstanceIndexItems().subscribe(new Action1<List<org.storymaker.app.db.InstanceIndexItem>>() {
@Override
public void call(List<org.storymaker.app.db.InstanceIndexItem> instanceIndexItems) {
// just process the list
for (org.storymaker.app.db.InstanceIndexItem item : instanceIndexItems) {
Log.d("RX_DB", "GOT ITEM " + item.getId() + ", TITLE: " + item.getTitle());
}
}
});
=======
// dumb test
// put in values
/*
for (InstanceIndexItem item : instanceIndex.values()) {
instanceIndexItemDao.addInstanceIndexItem(item);
}
// read out values
instanceIndexItemDao.getInstanceIndexItems().subscribe(new Action1<List<org.storymaker.app.db.InstanceIndexItem>>() {
@Override
public void call(List<org.storymaker.app.db.InstanceIndexItem> instanceIndexItems) {
// just process the list
for (org.storymaker.app.db.InstanceIndexItem item : instanceIndexItems) {
Log.d("RX_DB", "GOT ITEM " + item.getId() + ", TITLE: " + item.getTitle());
}
}
});
*/
>>>>>>>
// dumb test
// put in values
/*
for (InstanceIndexItem item : instanceIndex.values()) {
instanceIndexItemDao.addInstanceIndexItem(item);
}
// read out values
instanceIndexItemDao.getInstanceIndexItems().subscribe(new Action1<List<org.storymaker.app.db.InstanceIndexItem>>() {
@Override
public void call(List<org.storymaker.app.db.InstanceIndexItem> instanceIndexItems) {
// just process the list
for (org.storymaker.app.db.InstanceIndexItem item : instanceIndexItems) {
Log.d("RX_DB", "GOT ITEM " + item.getId() + ", TITLE: " + item.getTitle());
}
}
});
*/ |
<<<<<<<
if ((!OrbotHelper.isOrbotInstalled(getApplicationContext())) || (!OrbotHelper.isOrbotRunning(getApplicationContext()))) {
Log.e(TAG, "user selected \"use tor\" but orbot is not installed or not running");
=======
OrbotHelper orbotHelper = new OrbotHelper(getApplicationContext());
if ((!orbotHelper.isOrbotInstalled()) || (!orbotHelper.isOrbotRunning())) {
Timber.e("user selected \"use tor\" but orbot is not installed or not running");
>>>>>>>
if ((!OrbotHelper.isOrbotInstalled(getApplicationContext())) || (!OrbotHelper.isOrbotRunning(getApplicationContext()))) {
Timber.e("user selected \"use tor\" but orbot is not installed or not running"); |
<<<<<<<
/**
* the env variable containing the workflow label assigned by pegasus
*/
public static final String PEGASUS_WF_LABEL_ENV_KEY = "PEGASUS_WF_LABEL";
/**
* site which the job was mapped to
*/
public static final String PEGASUS_SITE_ID_ENV_KEY = "PEGASUS_SITE";
=======
public static final String PEGASUS_SITE_ID_ENV_KEY = "PEGASUS_SITE";
/**
* The env variable pointing to the scratch directory a job will be executed
* in , in a shared fs configuration
*/
public static final String PEGASUS_SCRATCH_DIR_KEY = "PEGASUS_SCRATCH_DIR";
>>>>>>>
/**
* the env variable containing the workflow label assigned by pegasus
*/
public static final String PEGASUS_WF_LABEL_ENV_KEY = "PEGASUS_WF_LABEL";
/**
* site which the job was mapped to
*/
public static final String PEGASUS_SITE_ID_ENV_KEY = "PEGASUS_SITE";
/**
* The env variable pointing to the scratch directory a job will be executed
* in , in a shared fs configuration
*/
public static final String PEGASUS_SCRATCH_DIR_KEY = "PEGASUS_SCRATCH_DIR"; |
<<<<<<<
testKey( Pegasus.ENABLE_FOR_DATA_REUSE_KEY, "dummy", Namespace.VALID_KEY );
mLogger.logEventCompletion();
mLogger.logEventStart( "test.namespace.Pegasus", "set", Integer.toString(set++) );
testKey( Pegasus.EXITCODE_FAILURE_MESSAGE, "dummy", Namespace.VALID_KEY );
=======
testKey( Pegasus.EXITCODE_FAILURE_MESSAGE, "dummy", Namespace.MERGE_KEY );
>>>>>>>
testKey( Pegasus.ENABLE_FOR_DATA_REUSE_KEY, "dummy", Namespace.VALID_KEY );
mLogger.logEventCompletion();
mLogger.logEventStart( "test.namespace.Pegasus", "set", Integer.toString(set++) );
testKey( Pegasus.EXITCODE_FAILURE_MESSAGE, "dummy", Namespace.MERGE_KEY ); |
<<<<<<<
import com.owncloud.android.datamodel.DataStorageManager;
import com.owncloud.android.datamodel.FileDataStorageManager;
=======
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.authentication.AccountUtils.AccountNotFoundException;
>>>>>>>
import com.owncloud.android.datamodel.DataStorageManager;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.authentication.AccountUtils.AccountNotFoundException;
<<<<<<<
=======
if (mFile != null) {
if (mFile.isDown()) {
mVideoPlayer.setVideoPath(mFile.getStoragePath());
} else if (mAccount != null) {
// not working yet
String url;
try {
url = AccountUtils.constructFullURLForAccount(this, mAccount) + mFile.getRemotePath();
mVideoPlayer.setVideoURI(Uri.parse(url));
} catch (AccountNotFoundException e) {
onError(null, MediaService.OC_MEDIA_ERROR, R.string.media_err_no_account);
}
} else {
onError(null, MediaService.OC_MEDIA_ERROR, R.string.media_err_no_account);
}
// create and prepare control panel for the user
mMediaController = new MediaController(this);
mMediaController.setMediaPlayer(mVideoPlayer);
mMediaController.setAnchorView(mVideoPlayer);
mVideoPlayer.setMediaController(mMediaController);
} else {
onError(null, MediaService.OC_MEDIA_ERROR, R.string.media_err_nothing_to_play);
}
>>>>>>> |
<<<<<<<
=======
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.owncloud.android.R;
>>>>>>>
<<<<<<<
=======
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialogABSTRACT;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
>>>>>>>
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialogABSTRACT;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
<<<<<<<
} else {
// Show a dialog with the certificate info
((AuthenticatorActivity)mContext).showUntrustedCertDialog(x509Certificate, error);
// SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(mContext, x509Certificate, error);
// FragmentManager fm = ((FragmentActivity)mContext).getSupportFragmentManager();
// FragmentTransaction ft = fm.beginTransaction();
// dialog.show(ft, DIALOG_UNTRUSTED_CERT);
=======
} else if (x509Certificate != null) {
// Show a dialog with all the certificate info
SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(mContext, x509Certificate, this, handler);
FragmentManager fm = ((SherlockFragmentActivity)mContext).getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
dialog.show(ft, DIALOG_UNTRUSTED_CERT);
>>>>>>>
} else if (x509Certificate != null) {
// Show a dialog with the certificate info
((AuthenticatorActivity)mContext).showUntrustedCertDialog(x509Certificate, error); |
<<<<<<<
import com.calsignlabs.apde.build.dag.ModularBuild;
=======
import com.calsignlabs.apde.build.SketchPreviewerBuilder;
>>>>>>>
import com.calsignlabs.apde.build.dag.ModularBuild;
import com.calsignlabs.apde.build.SketchPreviewerBuilder;
<<<<<<<
public void onTabSelected(TabLayout.Tab tab) {
// If there are problems displayed, then we might want to switch the one visible in
// the message area when we switch tabs
if (getSelectedCodeArea() != null) {
getSelectedCodeArea().updateCursorCompilerProblem();
}
}
=======
public void onTabSelected(TabLayout.Tab tab) {
// Different undo/redo history for different tabs
correctUndoRedoEnabled();
}
>>>>>>>
public void onTabSelected(TabLayout.Tab tab) {
// If there are problems displayed, then we might want to switch the one visible in
// the message area when we switch tabs
if (getSelectedCodeArea() != null) {
getSelectedCodeArea().updateCursorCompilerProblem();
}
// Different undo/redo history for different tabs
correctUndoRedoEnabled();
}
<<<<<<<
View buffer = findViewById(R.id.buffer);
TextView messageArea = findViewById(R.id.message);
View console = findViewById(R.id.console_wrapper);
=======
LinearLayout buffer = (LinearLayout) findViewById(R.id.buffer);
TextView messageArea = (TextView) findViewById(R.id.message);
View console = findViewById(R.id.console_scroller);
>>>>>>>
View buffer = findViewById(R.id.buffer);
TextView messageArea = findViewById(R.id.message);
View console = findViewById(R.id.console_wrapper);
<<<<<<<
View codeArea = getSelectedCodeAreaScroller();
View consoleArea = findViewById(R.id.console_wrapper);
ViewGroup content = findViewById(R.id.content);
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0);
=======
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0) - tabBarContainer.getHeight();
>>>>>>>
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0);
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0) - tabBarContainer.getHeight();
<<<<<<<
hideCharInsertsNoAnimation(false);
=======
findViewById(R.id.message).setVisibility(View.VISIBLE);
findViewById(R.id.char_insert_tray).setVisibility(View.GONE);
} else if (!firstResize) {
// Fix console height
// This is necessary when toggling between fullscreen and non-fullscreen
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0) - tabBarContainer.getHeight();
consoleArea.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, totalHeight - codePager.getHeight()));
>>>>>>>
findViewById(R.id.message).setVisibility(View.VISIBLE);
findViewById(R.id.char_insert_tray).setVisibility(View.GONE);
hideCharInsertsNoAnimation(false);
} else if (!firstResize) {
// Fix console height
// This is necessary when toggling between fullscreen and non-fullscreen
int totalHeight = content.getHeight() - message - (extraHeaderView != null ? extraHeaderView.getHeight() : 0) - tabBarContainer.getHeight();
consoleArea.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, totalHeight - codePager.getHeight())); |
<<<<<<<
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockPreferenceActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.owncloud.android.BuildConfig;
=======
>>>>>>>
import com.owncloud.android.BuildConfig; |
<<<<<<<
getMenuInflater().inflate(R.menu.activity_sketch_properties, menu);
if(getGlobalState().isExample()) {
//Don't let them mess with the examples!
menu.findItem(R.id.menu_change_sketch_name).setVisible(false);
menu.findItem(R.id.menu_delete).setVisible(false);
} else {
menu.findItem(R.id.menu_change_sketch_name).setVisible(true);
menu.findItem(R.id.menu_delete).setVisible(true);
}
//Not using this - we have "Export Eclipse Project" and "Export Signed Package" tools now
menu.findItem(R.id.menu_export).setVisible(false);
switch(getGlobalState().getSketchLocationType()) {
case SKETCHBOOK:
menu.findItem(R.id.menu_save).setVisible(true);
menu.findItem(R.id.menu_copy_to_sketchbook).setVisible(false);
menu.findItem(R.id.menu_copy_sketch).setVisible(true);
break;
case TEMPORARY:
menu.findItem(R.id.menu_save).setVisible(true);
menu.findItem(R.id.menu_copy_to_sketchbook).setVisible(false);
menu.findItem(R.id.menu_copy_sketch).setVisible(false);
break;
case EXTERNAL:
menu.findItem(R.id.menu_save).setVisible(true);
menu.findItem(R.id.menu_copy_to_sketchbook).setVisible(true);
menu.findItem(R.id.menu_copy_sketch).setVisible(false);
break;
case EXAMPLE:
case LIBRARY_EXAMPLE:
menu.findItem(R.id.menu_save).setVisible(false);
menu.findItem(R.id.menu_copy_to_sketchbook).setVisible(true);
menu.findItem(R.id.menu_copy_sketch).setVisible(false);
break;
}
=======
initOptionsMenu(menu);
>>>>>>>
initOptionsMenu(menu);
<<<<<<<
switch(item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.menu_change_sketch_name:
changeSketchName();
return true;
case R.id.action_settings:
launchSettings();
return true;
case R.id.menu_save:
saveSketch();
return true;
case R.id.menu_copy_to_sketchbook:
copyToSketchbook();
return true;
case R.id.menu_delete:
deleteSketch();
return true;
case R.id.menu_new:
newSketch();
return true;
case R.id.menu_copy_sketch:
copySketch();
return true;
default:
return super.onOptionsItemSelected(item);
}
=======
switch(item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.menu_change_sketch_name:
changeSketchName();
return true;
case R.id.action_settings:
launchSettings();
return true;
case R.id.menu_copy_to_sketchbook:
copyToSketchbook();
return true;
case R.id.menu_move_to_sketchbook:
moveToSketchbook();
return true;
case R.id.menu_delete:
deleteSketch();
return true;
case R.id.menu_new:
newSketch();
return true;
default:
return super.onOptionsItemSelected(item);
}
>>>>>>>
switch(item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.menu_change_sketch_name:
changeSketchName();
return true;
case R.id.action_settings:
launchSettings();
return true;
case R.id.menu_copy_to_sketchbook:
copyToSketchbook();
return true;
case R.id.menu_move_to_sketchbook:
moveToSketchbook();
return true;
case R.id.menu_delete:
deleteSketch();
return true;
case R.id.menu_new:
newSketch();
return true;
case R.id.menu_copy_sketch:
copySketch();
return true;
default:
return super.onOptionsItemSelected(item);
}
<<<<<<<
public void copySketch() {
//If we cannot write to the external storage (and the user wants to), make sure to inform the user
if(!externalStorageWritable() && (getGlobalState().getSketchbookDrive().type.equals(APDE.StorageDrive.StorageDriveType.EXTERNAL)
|| getGlobalState().getSketchbookDrive().type.equals(APDE.StorageDrive.StorageDriveType.PRIMARY_EXTERNAL))) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getResources().getText(R.string.external_storage_dialog_title))
.setMessage(getResources().getText(R.string.external_storage_dialog_message)).setCancelable(false)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).show();
return;
}
//The original sketch location
File oldLoc = getGlobalState().getSketchLocation();
String before = getGlobalState().getSketchName();
//Append "_copy" to the sketch name so that they don't overlap
String after = before + getResources().getString(R.string.copy_suffix);
//Do the same thing to the path
String sketchPath = getGlobalState().getSketchPath() + getResources().getString(R.string.copy_suffix);
//Obtain the location of the sketch
File sketchLoc = getGlobalState().getSketchLocation(sketchPath, APDE.SketchLocation.SKETCHBOOK);
//Ensure that the sketch folder exists
sketchLoc.mkdirs();
try {
APDE.copyFile(oldLoc, sketchLoc);
//We need to add it to the recent list
getGlobalState().putRecentSketch(APDE.SketchLocation.SKETCHBOOK, sketchPath);
getGlobalState().selectSketch(sketchPath, APDE.SketchLocation.SKETCHBOOK);
//Make sure the code area is editable
((CodeEditText) getGlobalState().getEditor().findViewById(R.id.code)).setFocusable(true);
((CodeEditText) getGlobalState().getEditor().findViewById(R.id.code)).setFocusableInTouchMode(true);
//Force the drawer to reload
getGlobalState().getEditor().forceDrawerReload();
getGlobalState().getEditor().supportInvalidateOptionsMenu();
getGlobalState().setSketchName(after);
getGlobalState().getEditor().setSaved(true);
} catch (IOException e) {
//Inform the user of failure
getGlobalState().getEditor().error(getResources().getText(R.string.sketch_save_failure));
}
}
=======
private void moveToSketchbook() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.move_temp_to_sketchbook_title);
builder.setMessage(String.format(Locale.US, getResources().getString(R.string.move_temp_to_sketchbook_message), getGlobalState().getSketchName()));
builder.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
APDE.SketchMeta source = new APDE.SketchMeta(getGlobalState().getSketchLocationType(), getGlobalState().getSketchPath());
APDE.SketchMeta dest = new APDE.SketchMeta(APDE.SketchLocation.SKETCHBOOK, "/" + source.getName());
// Let's not overwrite anything...
// TODO Maybe give the user options to replace / keep both in the new location?
// We don't need that much right now, they can deal with things manually...
if (getGlobalState().getSketchLocation(dest.getPath(), dest.getLocation()).exists()) {
AlertDialog.Builder builder = new AlertDialog.Builder(SketchPropertiesActivity.this);
builder.setTitle(R.string.cannot_move_sketch_title);
builder.setMessage(R.string.cannot_move_folder_message);
builder.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {}
});
builder.create().show();
return;
}
getGlobalState().moveFolder(source, dest, SketchPropertiesActivity.this);
restartActivity();
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {}
});
builder.create().show();
}
>>>>>>>
public void copySketch() {
//If we cannot write to the external storage (and the user wants to), make sure to inform the user
if(!externalStorageWritable() && (getGlobalState().getSketchbookDrive().type.equals(APDE.StorageDrive.StorageDriveType.EXTERNAL)
|| getGlobalState().getSketchbookDrive().type.equals(APDE.StorageDrive.StorageDriveType.PRIMARY_EXTERNAL))) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getResources().getText(R.string.external_storage_dialog_title))
.setMessage(getResources().getText(R.string.external_storage_dialog_message)).setCancelable(false)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).show();
return;
}
//The original sketch location
File oldLoc = getGlobalState().getSketchLocation();
String before = getGlobalState().getSketchName();
//Append "_copy" to the sketch name so that they don't overlap
String after = before + getResources().getString(R.string.copy_suffix);
//Do the same thing to the path
String sketchPath = getGlobalState().getSketchPath() + getResources().getString(R.string.copy_suffix);
//Obtain the location of the sketch
File sketchLoc = getGlobalState().getSketchLocation(sketchPath, APDE.SketchLocation.SKETCHBOOK);
//Ensure that the sketch folder exists
sketchLoc.mkdirs();
try {
APDE.copyFile(oldLoc, sketchLoc);
//We need to add it to the recent list
getGlobalState().putRecentSketch(APDE.SketchLocation.SKETCHBOOK, sketchPath);
getGlobalState().selectSketch(sketchPath, APDE.SketchLocation.SKETCHBOOK);
//Make sure the code area is editable
((CodeEditText) getGlobalState().getEditor().findViewById(R.id.code)).setFocusable(true);
((CodeEditText) getGlobalState().getEditor().findViewById(R.id.code)).setFocusableInTouchMode(true);
//Force the drawer to reload
getGlobalState().getEditor().forceDrawerReload();
getGlobalState().getEditor().supportInvalidateOptionsMenu();
getGlobalState().setSketchName(after);
getGlobalState().getEditor().setSaved(true);
} catch (IOException e) {
//Inform the user of failure
getGlobalState().getEditor().error(getResources().getText(R.string.sketch_save_failure));
}
}
private void moveToSketchbook() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.move_temp_to_sketchbook_title);
builder.setMessage(String.format(Locale.US, getResources().getString(R.string.move_temp_to_sketchbook_message), getGlobalState().getSketchName()));
builder.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
APDE.SketchMeta source = new APDE.SketchMeta(getGlobalState().getSketchLocationType(), getGlobalState().getSketchPath());
APDE.SketchMeta dest = new APDE.SketchMeta(APDE.SketchLocation.SKETCHBOOK, "/" + source.getName());
// Let's not overwrite anything...
// TODO Maybe give the user options to replace / keep both in the new location?
// We don't need that much right now, they can deal with things manually...
if (getGlobalState().getSketchLocation(dest.getPath(), dest.getLocation()).exists()) {
AlertDialog.Builder builder = new AlertDialog.Builder(SketchPropertiesActivity.this);
builder.setTitle(R.string.cannot_move_sketch_title);
builder.setMessage(R.string.cannot_move_folder_message);
builder.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {}
});
builder.create().show();
return;
}
getGlobalState().moveFolder(source, dest, SketchPropertiesActivity.this);
restartActivity();
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {}
});
builder.create().show();
} |
<<<<<<<
if (codePager.getHeight() - codeTabStrip.getHeight() >= height) {
resizeCode = new ResizeAnimation<>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight(), LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight() - height, false);
=======
if (codePager.getHeight() >= height) {
resizeCode = new ResizeAnimation<LinearLayout>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight(), LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight() - height, false);
>>>>>>>
if (codePager.getHeight() >= height) {
resizeCode = new ResizeAnimation<>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight(), LinearLayout.LayoutParams.MATCH_PARENT, codePager.getHeight() - height, false);
<<<<<<<
resizeCode = new ResizeAnimation<>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, codeTabStrip.getHeight(), false);
resizeConsole = new ResizeAnimation<>(console, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, console.getHeight() - (height - codePager.getHeight() + codeTabStrip.getHeight()), false);
=======
resizeCode = new ResizeAnimation<LinearLayout>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, 0, false);
resizeConsole = new ResizeAnimation<LinearLayout>(console, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, console.getHeight() - (height - codePager.getHeight()), false);
>>>>>>>
resizeCode = new ResizeAnimation<>(codePager, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, 0, false);
resizeConsole = new ResizeAnimation<>(console, LinearLayout.LayoutParams.MATCH_PARENT, ResizeAnimation.DEFAULT, LinearLayout.LayoutParams.MATCH_PARENT, console.getHeight() - (height - codePager.getHeight()), false); |
<<<<<<<
int[] blarr = new int[4];
level.copyTo(blarr,0);
//BlackLevel
Core.subtract(out,new Scalar(blarr[0],blarr[1],blarr[2],blarr[3]),out);
//CFA PATERN
if(Interface.i.settings.cfaPatern >0)
{
switch (Interface.i.settings.cfaPatern)
{
case 1:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
case 2:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerRG2BGR);
break;
case 3:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGB2BGR);
break;
case 4:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGR2BGR);
break;
default:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
}
}
else {
int pattern = CameraFragment.mCameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT);
switch (pattern) {
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGB2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerRG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGR2BGR);
break;
default:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
}
}
Core.multiply(out,new Scalar(1.0f/vec2[2].floatValue(),1.0f/(vec2[1].floatValue()),1.0f/vec2[0].floatValue()),out);
=======
//BlackLevel
Core.max(out,new Scalar(blarr[0]+1),out);
Core.subtract(out,new Scalar(blarr[0],blarr[1],blarr[2],blarr[3]),out);
//CFA PATERN
int pattern = CameraFragment.mCameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT);
switch (pattern)
{
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB:
Imgproc.cvtColor(out,out,Imgproc.COLOR_BayerBG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG:
Imgproc.cvtColor(out,out,Imgproc.COLOR_BayerGB2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR:
Imgproc.cvtColor(out,out,Imgproc.COLOR_BayerRG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG:
Imgproc.cvtColor(out,out,Imgproc.COLOR_BayerGR2BGR);
break;
default:
Imgproc.cvtColor(out,out,Imgproc.COLOR_BayerBG2BGR);
break;
}
Core.multiply(out,new Scalar(1/vec2[2].floatValue(),1/vec2[1].floatValue(),1/vec2[0].floatValue()),out);
>>>>>>>
//BlackLevel
Core.max(out,new Scalar(blarr[0]+1),out);
Core.subtract(out,new Scalar(blarr[0],blarr[1],blarr[2],blarr[3]),out);
//whitelevel
Core.min(out,new Scalar(1023-blarr[0],1023-blarr[0],1023-blarr[0],1023-blarr[0]),out);
//CFA PATERN
if(Interface.i.settings.cfaPatern >0)
{
switch (Interface.i.settings.cfaPatern)
{
case 1:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
case 2:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerRG2BGR);
break;
case 3:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGB2BGR);
break;
case 4:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGR2BGR);
break;
default:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
}
}
else {
int pattern = CameraFragment.mCameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT);
switch (pattern) {
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGB2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerRG2BGR);
break;
case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerGR2BGR);
break;
default:
Imgproc.cvtColor(out, out, Imgproc.COLOR_BayerBG2BGR);
break;
}
}
Core.multiply(out,new Scalar(1/vec2[2].floatValue(),1/vec2[1].floatValue(),1/vec2[0].floatValue()),out);
<<<<<<<
float[] fArr2 = new float[9];
if(a3!= null)
{
a4.copyElements(rationalArr, 0);
for (int i = 0; i < 9; i++) {
fArr2[i] = rationalArr[i].floatValue();
}
}
=======
>>>>>>>
<<<<<<<
Core.gemm(ccmCMat,ccmMat,1,new Mat(), 0,ccmMat);
//ccmMat = ccmCMat.mul(ccmMat);
=======
>>>>>>> |
<<<<<<<
=======
import android.app.ActivityManager;
import android.renderscript.RenderScript;
>>>>>>>
<<<<<<<
private static Interface sInterface;
private final MainActivity mainActivity;
private final Settings settings;
private final Photo photo;
private final Wrapper wrapper;
private final ImageProcessing imageProcessing;
private final Swipe swipe;
private final Gravity gravity;
private final Sensors sensors;
private final Parameters parameters;
private final TouchFocus touchFocus;
private final CameraUI cameraUI;
private CameraFragment cameraFragment;
private Manual manual;
private SettingsActivity settingsActivity;
=======
public static Interface i;
public final MainActivity mainActivity;
public CameraFragment camera;
public final Settings settings;
public final Photo photo;
public final Wrapper wrapper;
public final ImageProcessing processing;
public final Swipe swipedetection;
public final Gravity gravity;
public final Sensors sensors;
public Manual manual;
public RenderScript rs;
public final Parameters parameters;
public final TouchFocus touchFocus;
public final CameraUI cameraui;
public SettingsActivity settingsActivity;
public ManualMode manualMode;
>>>>>>>
private static Interface sInterface;
private final MainActivity mainActivity;
private final Settings settings;
private final Photo photo;
private final Wrapper wrapper;
private final ImageProcessing imageProcessing;
private final Swipe swipe;
private final Gravity gravity;
private final Sensors sensors;
private final Parameters parameters;
private final TouchFocus touchFocus;
private final CameraUI cameraUI;
private CameraFragment cameraFragment;
private Manual manual;
private ManualMode manualMode;
private SettingsActivity settingsActivity;
<<<<<<<
cameraUI = new CameraUI();
}
public static MainActivity getMainActivity() {
return sInterface.mainActivity;
}
public static Settings getSettings() {
return sInterface.settings;
}
public static Photo getPhoto() {
return sInterface.photo;
}
public static Wrapper getWrapper() {
return sInterface.wrapper;
}
public static ImageProcessing getImageProcessing() {
return sInterface.imageProcessing;
}
public static Swipe getSwipe() {
return sInterface.swipe;
}
public static Gravity getGravity() {
return sInterface.gravity;
}
public static Sensors getSensors() {
return sInterface.sensors;
=======
cameraui = new CameraUI();
manualMode = ManualMode.getInstance(act);
>>>>>>>
cameraUI = new CameraUI();
manualMode = ManualMode.getInstance(act);
}
public static MainActivity getMainActivity() {
return sInterface.mainActivity;
}
public static Settings getSettings() {
return sInterface.settings;
}
public static Photo getPhoto() {
return sInterface.photo;
}
public static Wrapper getWrapper() {
return sInterface.wrapper;
}
public static ImageProcessing getImageProcessing() {
return sInterface.imageProcessing;
}
public static Swipe getSwipe() {
return sInterface.swipe;
}
public static Gravity getGravity() {
return sInterface.gravity;
}
public static Sensors getSensors() {
return sInterface.sensors; |
<<<<<<<
Interface.getTouchFocus().processTochToFocus(translateX,translateY);
=======
if (Interface.i.manualMode.getCurrentFocusValue() == -1.0)
// Interface.i.touchFocus.processTochToFocus(camera_container, translateX, translateY);
Interface.i.touchFocus.processTochToFocus(translateX, translateY);
>>>>>>>
if (Interface.i.manualMode.getCurrentFocusValue() == -1.0)
Interface.getTouchFocus().processTochToFocus(translateX,translateY);
<<<<<<<
public void SwipeUp(){
if(!Interface.getSettings().ManualMode) {
=======
public void SwipeUp() {
if (!Interface.i.settings.ManualMode) {
>>>>>>>
public void SwipeUp(){
if(!Interface.getSettings().ManualMode) {
<<<<<<<
Interface.getCameraFragment().rebuildPreview();
=======
>>>>>>>
Interface.getCameraFragment().rebuildPreview(); |
<<<<<<<
=======
import org.edx.mobile.logger.Logger;
import org.edx.mobile.module.analytics.SegmentTracker;
>>>>>>>
import org.edx.mobile.logger.Logger;
import org.edx.mobile.module.analytics.SegmentTracker; |
<<<<<<<
.sizeRes(context, R.dimen.icon_view_standard_width_height)
.colorRes(context, R.color.white),
=======
.sizeRes(context, R.dimen.small_icon_size)
.colorRes(context, R.color.edx_grayscale_neutral_white_t),
>>>>>>>
.sizeRes(context, R.dimen.small_icon_size)
.colorRes(context, R.color.white), |
<<<<<<<
import org.edx.mobile.util.UiUtil;
=======
>>>>>>>
<<<<<<<
handler.sendEmptyMessage(MSG_TYPE_TICK);
PrefManager pmFeatures = new PrefManager(this, PrefManager.Pref.FEATURES);
boolean enableSocialFeatures = NetworkUtil.isSocialFeatureFlagEnabled(this);
pmFeatures.put(PrefManager.Key.ALLOW_SOCIAL_FEATURES, enableSocialFeatures);
=======
// register receiver for showing flying message
IntentFilter filter = new IntentFilter(ACTION_SHOW_MESSAGE);
filter.addCategory(Intent.CATEGORY_DEFAULT);
registerReceiver(showFlyingMessageReceiver, filter);
>>>>>>>
handler.sendEmptyMessage(MSG_TYPE_TICK);
PrefManager pmFeatures = new PrefManager(this, PrefManager.Pref.FEATURES);
boolean enableSocialFeatures = NetworkUtil.isSocialFeatureFlagEnabled(this);
pmFeatures.put(PrefManager.Key.ALLOW_SOCIAL_FEATURES, enableSocialFeatures);
// register receiver for showing flying message
IntentFilter filter = new IntentFilter(ACTION_SHOW_MESSAGE);
filter.addCategory(Intent.CATEGORY_DEFAULT);
registerReceiver(showFlyingMessageReceiver, filter);
<<<<<<<
=======
* Animate / show the download started message
* @param message - Message to display on the Download Panel
* @return boolean - Returns true if message shown, false otherwise.
*/
public boolean showMessage(String message){
TextView downloadMessageTv = (TextView) findViewById(R.id.downloadMessage);
if(downloadMessageTv!=null) {
downloadMessageTv.setText(message);
animateLayouts(downloadMessageTv);
return true;
} else {
logger.warn("textview not available, so couldn't show flying message");
}
return false;
}
/**
>>>>>>>
* Animate / show the download started message
* @param message - Message to display on the Download Panel
* @return boolean - Returns true if message shown, false otherwise.
*/
public boolean showMessage(String message){
TextView downloadMessageTv = (TextView) findViewById(R.id.downloadMessage);
if(downloadMessageTv!=null) {
downloadMessageTv.setText(message);
animateLayouts(downloadMessageTv);
return true;
} else {
logger.warn("TextView not available, so couldn't show flying message");
}
return false;
}
/**
<<<<<<<
public void showMessage(String message) {
UiUtil.showMessage(findViewById(android.R.id.content), message);
}
=======
protected void hideSoftKeypad() {
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
/**
* Sends a sticky broadcast message which will be displayed by any activity which receives this
* broadcast.
* Message is one-shot and gets removed when it is shown by any activity.
* @param message
*/
protected void sendBroadcastFlyingMessage(String message) {
Intent intent = new Intent();
intent.putExtra("message", message);
intent.setAction(ACTION_SHOW_MESSAGE);
sendStickyBroadcast(intent);
}
/**
* Receives the sticky broadcast message and attempts showing flying message.
* If message gets shown then removes this sticky broadcast.
*/
private BroadcastReceiver showFlyingMessageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
try {
if (intent.getAction().equals(ACTION_SHOW_MESSAGE)) {
String message = intent.getStringExtra("message");
if (showMessage(message)) {
// make this message one-shot
removeStickyBroadcast(intent);
} else {
// may be some other screen will display this message
// do nothing here, do NOT remove broadcast
}
}
} catch(Exception ex) {
logger.error(ex);
}
}
};
>>>>>>>
protected void hideSoftKeypad() {
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
/**
* Sends a sticky broadcast message which will be displayed by any activity which receives this
* broadcast.
* Message is one-shot and gets removed when it is shown by any activity.
* @param message
*/
protected void sendBroadcastFlyingMessage(String message) {
Intent intent = new Intent();
intent.putExtra("message", message);
intent.setAction(ACTION_SHOW_MESSAGE);
sendStickyBroadcast(intent);
}
/**
* Receives the sticky broadcast message and attempts showing flying message.
* If message gets shown then removes this sticky broadcast.
*/
private BroadcastReceiver showFlyingMessageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
try {
if (intent.getAction().equals(ACTION_SHOW_MESSAGE)) {
String message = intent.getStringExtra("message");
if (showMessage(message)) {
// make this message one-shot
removeStickyBroadcast(intent);
} else {
// may be some other screen will display this message
// do nothing here, do NOT remove broadcast
}
}
} catch(Exception ex) {
logger.error(ex);
}
}
}; |
<<<<<<<
import org.edx.mobile.util.EmailUtil;
import org.edx.mobile.util.Environment;
=======
import org.edx.mobile.util.Config;
import org.edx.mobile.util.Emailutill;
>>>>>>>
import org.edx.mobile.util.EmailUtil;
import org.edx.mobile.util.Config; |
<<<<<<<
import org.edx.mobile.util.LogUtil;
import org.edx.mobile.util.NetworkUtil;
=======
import android.app.ActionBar;
>>>>>>>
import org.edx.mobile.util.NetworkUtil; |
<<<<<<<
import android.text.TextUtils;
import android.util.Log;
=======
>>>>>>>
import android.text.TextUtils; |
<<<<<<<
import android.content.ContentValues;
import android.content.Context;
=======
import java.util.List;
>>>>>>>
import android.content.ContentValues;
import android.content.Context;
import java.util.List;
<<<<<<<
import org.edx.mobile.util.LogUtil;
import java.util.List;
=======
import android.content.ContentValues;
import android.content.Context;
>>>>>>> |
<<<<<<<
=======
import java.io.IOException;
import org.edx.mobile.R;
import org.edx.mobile.base.BaseFragmentActivity;
>>>>>>>
import java.io.IOException;
import org.edx.mobile.R;
import org.edx.mobile.base.BaseFragmentActivity; |
<<<<<<<
import org.edx.mobile.task.GetLastAccessedTask;
import org.edx.mobile.util.DateUtil;
import org.edx.mobile.util.NetworkUtil;
import org.edx.mobile.view.custom.ETextView;
import org.edx.mobile.view.dialog.DownloadSizeExceedDialog;
import org.edx.mobile.view.dialog.ProgressDialogFragment;
import org.edx.mobile.model.api.EnrolledCoursesResponse;
=======
>>>>>>>
import org.edx.mobile.task.GetLastAccessedTask;
import org.edx.mobile.util.DateUtil;
import org.edx.mobile.util.NetworkUtil;
import org.edx.mobile.view.custom.ETextView;
import org.edx.mobile.view.dialog.DownloadSizeExceedDialog;
import org.edx.mobile.view.dialog.ProgressDialogFragment; |
<<<<<<<
if (writeKey != null) {
String debugging = context.getString(R.string.analytics_debug);
int queueSize = context.getResources().getInteger(R.integer.analytics_queue_size);
LogUtil.log(getClass().getName(), "SegmentTracker created with write key: " + writeKey);
=======
if(writeKey!=null) {
logger.debug("SegmentTracker created with write key: " + writeKey);
>>>>>>>
if (writeKey != null) {
logger.debug("SegmentTracker created with write key: " + writeKey);
String debugging = context.getString(R.string.analytics_debug);
int queueSize = context.getResources().getInteger(R.integer.analytics_queue_size);
<<<<<<<
} catch (RuntimeException ex) {
LogUtil.error(getClass().getName(), "Analytics init failed: " + ex.getMessage());
} catch (Exception ex) {
LogUtil.error(getClass().getName(), "Analytics init failed: " + ex.getMessage());
=======
} catch(RuntimeException ex) {
logger.error(ex);
} catch(Exception ex) {
logger.error(ex);
>>>>>>>
} catch(RuntimeException ex) {
logger.error(ex);
} catch(Exception ex) {
logger.error(ex); |
<<<<<<<
import android.database.sqlite.SQLiteDatabase;
=======
import org.edx.mobile.logger.Logger;
>>>>>>>
import android.database.sqlite.SQLiteDatabase;
import org.edx.mobile.logger.Logger; |
<<<<<<<
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
=======
import org.edx.mobile.logger.Logger;
>>>>>>>
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.edx.mobile.logger.Logger; |
<<<<<<<
=======
import org.edx.mobile.R;
import org.edx.mobile.logger.Logger;
>>>>>>>
import org.edx.mobile.R;
import org.edx.mobile.logger.Logger; |
<<<<<<<
import android.media.MediaScannerConnection;
import android.media.MediaScannerConnection.OnScanCompletedListener;
import android.net.Uri;
=======
import android.content.SharedPreferences;
import android.os.Build;
>>>>>>>
import android.media.MediaScannerConnection;
import android.media.MediaScannerConnection.OnScanCompletedListener;
import android.net.Uri;
import android.content.SharedPreferences;
import android.os.Build;
<<<<<<<
final OCFile file = mStorageManager.getFileByPath(downloadedRemotePath);
=======
OCFile file = getStorageManager().getFileByPath(downloadedRemotePath);
>>>>>>>
OCFile file = getStorageManager().getFileByPath(downloadedRemotePath); |
<<<<<<<
public GroupInfo(final String name, final boolean sql, final boolean sqlread, final boolean admin, final boolean defaultproc, final boolean defaultprocread){
=======
public GroupInfo(final String name, final boolean adhoc, final boolean admin, final boolean defaultproc, final boolean defaultprocread, final boolean allproc){
>>>>>>>
public GroupInfo(final String name, final boolean sql, final boolean sqlread, final boolean admin, final boolean defaultproc, final boolean defaultprocread, final boolean allproc){
<<<<<<<
if(info.sql || info.sqlread || info.defaultproc || info.admin || info.defaultprocread) {
=======
if(info.adhoc || info.defaultproc || info.admin || info.defaultprocread || info.allproc) {
>>>>>>>
if(info.sql || info.sqlread || info.defaultproc || info.admin || info.defaultprocread || info.allproc) { |
<<<<<<<
cl.m_datasourceClusterId = m_datasourceClusterId;
=======
cl.m_placementGroup = m_placementGroup;
>>>>>>>
cl.m_datasourceClusterId = m_datasourceClusterId;
cl.m_placementGroup = m_placementGroup;
<<<<<<<
if (m_datasourceClusterId != -1)
{
cmdline.add("datasourcecluster"); cmdline.add(Byte.toString(m_datasourceClusterId));
}
=======
if (m_placementGroup != null) {
cmdline.add("placementgroup"); cmdline.add(m_placementGroup);
}
>>>>>>>
if (m_datasourceClusterId != -1)
{
cmdline.add("datasourcecluster"); cmdline.add(Byte.toString(m_datasourceClusterId));
}
if (m_placementGroup != null) {
cmdline.add("placementgroup"); cmdline.add(m_placementGroup);
} |
<<<<<<<
byte[] planHash = m_task.getPlanHash(frag);
final int outputDepId = m_task.getOutputDepId(frag);
=======
long fragmentId = m_fragmentMsg.getFragmentId(frag);
final int outputDepId = m_fragmentMsg.getOutputDepId(frag);
>>>>>>>
byte[] planHash = m_fragmentMsg.getPlanHash(frag);
final int outputDepId = m_fragmentMsg.getOutputDepId(frag);
<<<<<<<
fragmentPlan = m_task.getFragmentPlan(frag);
=======
byte[] fragmentPlan = m_fragmentMsg.getFragmentPlan(frag);
>>>>>>>
fragmentPlan = m_fragmentMsg.getFragmentPlan(frag);
<<<<<<<
hostLog.l7dlog( Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(), new Object[] { Encoder.hexEncode(planHash) }, e);
=======
hostLog.l7dlog(Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(),
new Object[] { fragmentId }, e);
>>>>>>>
hostLog.l7dlog( Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(), new Object[] { Encoder.hexEncode(planHash) }, e);
<<<<<<<
hostLog.l7dlog( Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(), new Object[] { Encoder.hexEncode(planHash) }, e);
=======
hostLog.l7dlog(Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(),
new Object[] { fragmentId }, e);
>>>>>>>
hostLog.l7dlog( Level.TRACE, LogKeys.host_ExecutionSite_ExceptionExecutingPF.name(), new Object[] { Encoder.hexEncode(planHash) }, e); |
<<<<<<<
import com.owncloud.android.files.services.FileUploadService;
import com.owncloud.android.files.services.FileUploadService.FileUploaderBinder;
import com.owncloud.android.services.OperationsService;
=======
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.OCCapability;
>>>>>>>
import com.owncloud.android.files.services.FileUploadService;
import com.owncloud.android.files.services.FileUploadService.FileUploaderBinder;
import com.owncloud.android.services.OperationsService;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.OCCapability; |
<<<<<<<
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
=======
>>>>>>>
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
<<<<<<<
// Schemas of the tables
private final Map<Integer, byte[]> m_schemas = new HashMap<Integer, byte[]>();
// buffer for a single block
private ByteBuffer m_buffer = null;
=======
// Schema of the table currently streaming
private byte[] m_schema = null;
>>>>>>>
// Schemas of the tables
private final Map<Integer, byte[]> m_schemas = new HashMap<Integer, byte[]>();
<<<<<<<
private ByteBuffer getNextChunk(int tableId, ByteBuffer buf) {
byte[] schemaBytes = m_schemas.get(tableId);
=======
private ByteBuffer getNextChunk(ByteBuffer buf, CachedByteBufferAllocator resultBufferAllocator) {
>>>>>>>
private ByteBuffer getNextChunk(int tableId, ByteBuffer buf,
CachedByteBufferAllocator resultBufferAllocator) {
byte[] schemaBytes = m_schemas.get(tableId);
<<<<<<<
ByteBuffer outputBuffer = getOutputBuffer(length);
outputBuffer.put(schemaBytes);
=======
ByteBuffer outputBuffer = resultBufferAllocator.allocate(length);
outputBuffer.put(m_schema);
>>>>>>>
ByteBuffer outputBuffer = resultBufferAllocator.allocate(length);
outputBuffer.put(schemaBytes);
<<<<<<<
Pair<Long, Pair<Long, BBContainer>> msg = m_in.take();
result = processMessage(msg);
=======
Pair<Long, BBContainer> msg = m_in.take();
result = processMessage(msg, resultBufferAllocator);
>>>>>>>
Pair<Long, Pair<Long, BBContainer>> msg = m_in.take();
result = processMessage(msg, resultBufferAllocator);
<<<<<<<
Pair<Long, Pair<Long, BBContainer>> msg = m_in.poll();
return processMessage(msg);
=======
Pair<Long, BBContainer> msg = m_in.poll();
return processMessage(msg, resultBufferAllocator);
>>>>>>>
Pair<Long, Pair<Long, BBContainer>> msg = m_in.poll();
return processMessage(msg, resultBufferAllocator);
<<<<<<<
private Pair<Integer, ByteBuffer> processMessage(Pair<Long, Pair<Long, BBContainer>> msg) {
=======
private Pair<Integer, ByteBuffer> processMessage(Pair<Long, BBContainer> msg,
CachedByteBufferAllocator resultBufferAllocator) {
>>>>>>>
private Pair<Integer, ByteBuffer> processMessage(Pair<Long, Pair<Long, BBContainer>> msg,
CachedByteBufferAllocator resultBufferAllocator) {
<<<<<<<
ByteBuffer nextChunk = getNextChunk(tableId, block);
=======
ByteBuffer nextChunk = getNextChunk(block, resultBufferAllocator);
>>>>>>>
ByteBuffer nextChunk = getNextChunk(tableId, block, resultBufferAllocator); |
<<<<<<<
// require deployment file location
if (m_rejoinToHostAndPort == null) {
if (m_pathToDeployment == null) {
=======
// require deployment file location (null is allowed to receive default deployment)
if (m_pathToDeployment != null && m_pathToDeployment.isEmpty()) {
isValid = false;
hostLog.fatal("The deployment file location is empty.");
}
if (m_replicationRole == ReplicationRole.REPLICA) {
if (m_startAction == START_ACTION.RECOVER) {
>>>>>>>
// require deployment file location
if (m_rejoinToHostAndPort == null) {
// require deployment file location (null is allowed to receive default deployment)
if (m_pathToDeployment != null && m_pathToDeployment.isEmpty()) {
<<<<<<<
if (org.voltdb.utils.MiscUtils.isPro()) {
hostLog.fatal("Usage: org.voltdb.VoltDB [create|recover|replica] leader <hostname> deployment <deployment.xml> license <license.xml> catalog <catalog.jar>");
=======
if (MiscUtils.isPro()) {
hostLog.fatal("Usage: org.voltdb.VoltDB (create|recover|replica) leader <hostname> [deployment <deployment.xml>] license <license.xml> catalog <catalog.jar>");
>>>>>>>
if (org.voltdb.utils.MiscUtils.isPro()) {
hostLog.fatal("Usage: org.voltdb.VoltDB (create|recover|replica) leader <hostname> [deployment <deployment.xml>] license <license.xml> catalog <catalog.jar>"); |
<<<<<<<
=======
SnapshotRestore.m_haveDoneRestore = false;
m_config.setCallingMethodName(m_methodName);
>>>>>>>
m_config.setCallingMethodName(m_methodName); |
<<<<<<<
// Flag marking the sub-query plan
protected boolean m_isSubQuery = false;
=======
protected StmtTableScan m_tableScan = null;
>>>>>>>
// Flag marking the sub-query plan
protected boolean m_isSubQuery = false;
protected StmtTableScan m_tableScan = null;
<<<<<<<
if (jobj.has("SUBQUERY_INDICATOR")) {
m_isSubQuery = "TRUE".equalsIgnoreCase(jobj.getString( Members.SUBQUERY_INDICATOR.name() ));
}
=======
>>>>>>>
if (jobj.has("SUBQUERY_INDICATOR")) {
m_isSubQuery = "TRUE".equalsIgnoreCase(jobj.getString( Members.SUBQUERY_INDICATOR.name() ));
} |
<<<<<<<
if (! colType.isIndexable()) {
String emsg = colType.getName() + " values are not currently supported as index keys: '" + colNames[i] + "'";
throw this.m_compiler.new VoltCompilerException(emsg);
}
if (colType == VoltType.DECIMAL || colType == VoltType.FLOAT || colType == VoltType.STRING) {
=======
if (! colType.isBackendIntegerType()) {
>>>>>>>
if (! colType.isIndexable()) {
String emsg = colType.getName() + " values are not currently supported as index keys: '" + colNames[i] + "'";
throw this.m_compiler.new VoltCompilerException(emsg);
}
if (! colType.isBackendIntegerType()) {
<<<<<<<
if (! colType.isIndexable()) {
String emsg = colType.getName() + " expressions are not currently supported as index keys.";
throw this.m_compiler.new VoltCompilerException(emsg);
}
if (colType == VoltType.DECIMAL || colType == VoltType.FLOAT || colType == VoltType.STRING) {
=======
if (! colType.isBackendIntegerType()) {
>>>>>>>
if (! colType.isIndexable()) {
String emsg = colType.getName() + " expressions are not currently supported as index keys.";
throw this.m_compiler.new VoltCompilerException(emsg);
}
if (! colType.isBackendIntegerType()) { |
<<<<<<<
import java.util.HashMap;
import java.util.Map;
=======
import java.util.Iterator;
import java.util.List;
>>>>>>>
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.List;
<<<<<<<
static final int PART_ID_BITS = 15;
static final int MP_PART_ID = (1 << (PART_ID_BITS - 1)) - 1;
static final int SHORT_CIRCUIT_PART_ID = MP_PART_ID + 1;
static final long PART_ID_SHIFT = 49;
static final long SEQNUM_MAX = (1L << PART_ID_SHIFT) - 1L;
=======
static final long READ_BIT = 1L << 63;
static final int PART_ID_BITS = 14;
static final int MP_PART_ID = (1 << PART_ID_BITS) - 1;
static final int PART_ID_SHIFT = 49;
static final long SEQNUM_MAX = (1L << PART_ID_SHIFT) - 1L;
>>>>>>>
static final long READ_BIT = 1L << 63;
//Add an extra bit so compared to the 14-bits in txnids so there
//can be a short circuit read partition id
static final int PART_ID_BITS = 15;
static final int MP_PART_ID = (1 << PART_ID_BITS) - 1;
static final int SHORT_CIRCUIT_PART_ID = MP_PART_ID + 1;
static final long PART_ID_SHIFT = 48;
static final long SEQNUM_MAX = (1L << PART_ID_SHIFT) - 1L;
<<<<<<<
long clientHandle, int messageSize, long creationTime, String procName, boolean isShortCircuitRead) {
=======
long clientHandle, int messageSize, long creationTime, String procName, long initiatorHSId, boolean readOnly) {
>>>>>>>
long clientHandle, int messageSize, long creationTime, String procName, long initiatorHSId,
boolean readOnly, boolean isShortCircuitRead) {
<<<<<<<
clientHandle, messageSize, creationTime, procName, isShortCircuitRead);
=======
clientHandle, messageSize, creationTime, procName, initiatorHSId, readOnly);
}
@Override
synchronized boolean removeHandle(long ciHandle) {
return super.removeHandle(ciHandle);
>>>>>>>
clientHandle, messageSize, creationTime, procName, initiatorHSId, readOnly, isShortCircuitRead);
<<<<<<<
String procName,
boolean isShortCircuitRead)
=======
String procName,
long initiatorHSId,
boolean readOnly)
>>>>>>>
String procName,
long initiatorHSId,
boolean readOnly,
boolean isShortCircuitRead)
<<<<<<<
if (!isSinglePartition && isShortCircuitRead) {
throw new RuntimeException("Can't short circuit read a multi-part transaction");
}
HandleGenerator generator;
Deque<Iv2InFlight> perPartDeque;
Pair<HandleGenerator, Deque<Iv2InFlight>> partitionStuff = m_partitionStuff.get(partitionId);
=======
PartitionData partitionStuff = m_partitionStuff.get(partitionId);
>>>>>>>
if (!isSinglePartition && isShortCircuitRead) {
throw new RuntimeException("Can't short circuit read a multi-part transaction");
}
PartitionData partitionStuff = m_partitionStuff.get(partitionId);
<<<<<<<
for (Pair<HandleGenerator, Deque<Iv2InFlight>> p : m_partitionStuff.values()) {
for (Iv2InFlight inflight : p.getSecond()) {
m_outstandingTxns--;
=======
for (PartitionData pd : m_partitionStuff.values()) {
for (Iv2InFlight inflight : pd.m_reads) {
m_acg.reduceBackpressure(inflight.m_messageSize);
}
for (Iv2InFlight inflight : pd.m_writes) {
>>>>>>>
for (PartitionData pd : m_partitionStuff.values()) {
for (Iv2InFlight inflight : pd.m_reads) {
m_outstandingTxns--;
m_acg.reduceBackpressure(inflight.m_messageSize);
}
for (Iv2InFlight inflight : pd.m_writes) {
m_outstandingTxns--; |
<<<<<<<
import org.voltdb.SystemProcedureCatalog;
=======
>>>>>>> |
<<<<<<<
import org.voltdb.NodeDRGateway;
import org.voltdb.PartitionDRGateway;
=======
import org.voltdb.BackendTarget;
import org.voltdb.CatalogContext;
import org.voltdb.CatalogSpecificPlanner;
import org.voltdb.CommandLog;
>>>>>>>
import org.voltdb.NodeDRGateway;
import org.voltdb.PartitionDRGateway;
import org.voltdb.BackendTarget;
import org.voltdb.CatalogContext;
import org.voltdb.CatalogSpecificPlanner;
import org.voltdb.CommandLog; |
<<<<<<<
3, 3, 2, 42, 42, Long.MAX_VALUE)[0];
=======
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, Long.MAX_VALUE)[0];
>>>>>>>
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, 42, Long.MAX_VALUE)[0];
<<<<<<<
3, 3, 2, 42, 42, Long.MAX_VALUE)[0];
=======
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, Long.MAX_VALUE)[0];
>>>>>>>
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, 42, Long.MAX_VALUE)[0];
<<<<<<<
3, 3, 2, 42, 42, Long.MAX_VALUE)[0];
=======
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, Long.MAX_VALUE)[0];
>>>>>>>
new String[] { selectStmt.getSqltext() },
3, 3, 2, 42, 42, Long.MAX_VALUE)[0]; |
<<<<<<<
try {
try {
actual = vt.getDecimalAsBigDecimal(i).longValueExact();
} catch (IllegalArgumentException newerEx) {
newerEx.printStackTrace();
fail();
}
} catch (ArithmeticException newestEx) {
newestEx.printStackTrace();
fail();
}
=======
try {
actual = vt.getTimestampAsLong(i);
} catch (IllegalArgumentException exTm) {
fail();
}
>>>>>>>
try {
actual = vt.getTimestampAsLong(i);
} catch (IllegalArgumentException exTm) {
try {
actual = vt.getDecimalAsBigDecimal(i).longValueExact();
} catch (IllegalArgumentException newerEx) {
newerEx.printStackTrace();
fail();
}
} catch (ArithmeticException newestEx) {
newestEx.printStackTrace();
fail();
} |
<<<<<<<
/**
* Update the EE hashinator with the given configuration.
*/
public void updateHashinator(Pair<TheHashinator.HashinatorType, byte[]> config);
=======
/**
* Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
*/
public long getFragmentIdForPlanHash(byte[] planHash);
/**
* Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
* If the plan isn't known to this SPC, load it up. Otherwise addref it.
*/
public long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan);
/**
* Decref the plan associated with this site-local fragment id. If the refcount
* goes to 0, the plan may be removed (depending on caching policy).
*/
public void decrefPlanFragmentById(long fragmentId);
/**
* Get the full JSON plan associated with a given site-local fragment id.
*/
public byte[] planForFragmentId(long fragmentId);
>>>>>>>
/**
* Update the EE hashinator with the given configuration.
*/
public void updateHashinator(Pair<TheHashinator.HashinatorType, byte[]> config);
/**
* Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
*/
public long getFragmentIdForPlanHash(byte[] planHash);
/**
* Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
* If the plan isn't known to this SPC, load it up. Otherwise addref it.
*/
public long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan);
/**
* Decref the plan associated with this site-local fragment id. If the refcount
* goes to 0, the plan may be removed (depending on caching policy).
*/
public void decrefPlanFragmentById(long fragmentId);
/**
* Get the full JSON plan associated with a given site-local fragment id.
*/
public byte[] planForFragmentId(long fragmentId); |
<<<<<<<
import org.voltdb.importer.formatter.Formatter;
import org.voltdb.importer.formatter.FormatterBuilder;
=======
>>>>>>>
<<<<<<<
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
Object[] results = formatter.transform("\"12\",\"10.05\",t\"es\"t");
=======
o.configureFormatterFactory("csv", prop);
Formatter formatter = o.create();
Object[] results = formatter.transform("\"12\",\"10.05\",\"es\"");
>>>>>>>
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
Object[] results = formatter.transform("\"12\",\"10.05\",\"es\"");
<<<<<<<
prop.setProperty("ignoreleadingwhitespace", "false");
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
=======
prop.setProperty("trimunquoted", "true");
o.configureFormatterFactory("csv", prop);
Formatter formatter = o.create();
>>>>>>>
prop.setProperty("trimunquoted", "true");
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
<<<<<<<
@Override
=======
@Test
public void testBlankError() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("blank", "error");
o.configureFormatterFactory("csv", prop);
Formatter formatter = o.create();
try {
Object[] results = formatter.transform("12,,test");
fail();
} catch (RuntimeException e) {
}
}
@Test
public void testBlankEmpty() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("blank", "empty");
o.configureFormatterFactory("csv", prop);
Formatter formatter = o.create();
Object[] results = formatter.transform("12,,test");
assertEquals(results.length, 3);
assertEquals(results[0], "12");
assertEquals(results[1], null);
assertEquals(results[2], "test");
}
@Test
public void testCustomNull() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("nullstring", "empty");
o.configureFormatterFactory("csv", prop);
Formatter formatter = o.create();
Object[] results = formatter.transform("12,empty,test");
assertEquals(results.length, 3);
assertEquals(results[0], "12");
assertEquals(results[1], null);
assertEquals(results[2], "test");
}
@Override
>>>>>>>
@Test
public void testBlankError() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("blank", "error");
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
try {
Object[] results = formatter.transform("12,,test");
fail();
} catch (RuntimeException e) {
}
}
@Test
public void testBlankEmpty() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("blank", "empty");
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
Object[] results = formatter.transform("12,,test");
assertEquals(results.length, 3);
assertEquals(results[0], "12");
assertEquals(results[1], null);
assertEquals(results[2], "test");
}
@Test
public void testCustomNull() throws Exception {
ServiceReference refs[] = m_bundle.getRegisteredServices();
ServiceReference<AbstractFormatterFactory> reference = refs[0];
AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference);
Properties prop = new Properties();
prop.setProperty("separator", ",");
prop.setProperty("nullstring", "empty");
FormatterBuilder builder = new FormatterBuilder("csv", prop);
builder.setFormatterFactory(o);
Formatter formatter = builder.create();
Object[] results = formatter.transform("12,empty,test");
assertEquals(results.length, 3);
assertEquals(results[0], "12");
assertEquals(results[1], null);
assertEquals(results[2], "test");
}
@Override |
<<<<<<<
static boolean debuggingSoRetryOnError = true;
=======
static boolean m_debuggingStaticModeToRetryOnError = true;
>>>>>>>
static boolean m_debuggingStaticModeToRetryOnError = true;
<<<<<<<
if (plan != null) {
m_wasParameterizedPlan = plan.extractParamValues(m_paramzInfo);
if (m_wasParameterizedPlan) {
return plan;
}
} else {
if (debuggingSoRetryOnError) {
plan = compileFromXML(m_paramzInfo.parameterizedXmlSQL,
m_paramzInfo.paramLiteralValues);
}
=======
if (plan != null) {
VoltType[] paramTypes = plan.parameterTypes();
if (paramTypes.length <= CompiledPlan.MAX_PARAM_COUNT) {
Object[] params = m_paramzInfo.extractedParamValues(paramTypes);
plan.extractedParamValues = ParameterSet.fromArrayNoCopy(params);
m_wasParameterizedPlan = true;
return plan;
}
} else {
if (m_debuggingStaticModeToRetryOnError) {
plan = compileFromXML(m_paramzInfo.parameterizedXmlSQL,
m_paramzInfo.paramLiteralValues);
}
>>>>>>>
if (plan != null) {
m_wasParameterizedPlan = plan.extractParamValues(m_paramzInfo);
if (m_wasParameterizedPlan) {
return plan;
}
} else {
if (m_debuggingStaticModeToRetryOnError) {
plan = compileFromXML(m_paramzInfo.parameterizedXmlSQL,
m_paramzInfo.paramLiteralValues);
}
<<<<<<<
if (debuggingSoRetryOnError) {
assembler.getBestCostPlan(parsedStmt, true);
}
=======
if (m_debuggingStaticModeToRetryOnError) {
assembler.getBestCostPlan(parsedStmt);
}
>>>>>>>
if (m_debuggingStaticModeToRetryOnError) {
assembler.getBestCostPlan(parsedStmt, true);
} |
<<<<<<<
assertEquals(String.format("Role \"%s\" adhoc flag mismatch:", role.name), role.adhoc, group.getSql());
assertEquals(String.format("Role \"%s\" sql flag mismatch:", role.name), role.sql, group.getSql());
assertEquals(String.format("Role \"%s\" sqlread flag mismatch:", role.name), role.sqlread, group.getSqlread());
assertEquals(String.format("Role \"%s\" sysproc flag mismatch:", role.name), role.sysproc, group.getSysproc());
=======
assertEquals(String.format("Role \"%s\" adhoc flag mismatch:", role.name), role.adhoc, group.getAdhoc());
assertEquals(String.format("Role \"%s\" admin flag mismatch:", role.name), role.sysproc, group.getAdmin());
>>>>>>>
assertEquals(String.format("Role \"%s\" adhoc flag mismatch:", role.name), role.adhoc, group.getSql());
assertEquals(String.format("Role \"%s\" sql flag mismatch:", role.name), role.sql, group.getSql());
assertEquals(String.format("Role \"%s\" sqlread flag mismatch:", role.name), role.sqlread, group.getSqlread());
assertEquals(String.format("Role \"%s\" sysproc flag mismatch:", role.name), role.sysproc, group.getSysproc());
assertEquals(String.format("Role \"%s\" admin flag mismatch:", role.name), role.sysproc, group.getAdmin());
<<<<<<<
goodRoleDDL("create role r1 with adhoc;", new TestRole("r1", true, true, false, false, false, false));
goodRoleDDL("create role r1 with sql;", new TestRole("r1", true, true, false, false, false, false));
goodRoleDDL("create role r1 with sqlread;", new TestRole("r1", false, false, true, false, false, false));
goodRoleDDL("create role r1 with sysproc;", new TestRole("r1", false, false, false, true, false, false));
goodRoleDDL("create role r1 with defaultproc;", new TestRole("r1", false, false, false, false, true, false));
goodRoleDDL("create role r1 with adhoc,sysproc,defaultproc;", new TestRole("r1", true, true, false, true, true, false));
goodRoleDDL("create role r1 with adhoc,sysproc,sysproc;", new TestRole("r1", true, true, false, true, false, false));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc;", new TestRole("r1", true, true, false, true, true, false));
=======
goodRoleDDL("create role r1 with adhoc;", new TestRole("r1", true, false, false, false));
goodRoleDDL("create role r1 with sysproc;", new TestRole("r1", true, true, true, true));
goodRoleDDL("create role r1 with defaultproc;", new TestRole("r1", false, false, true, false));
goodRoleDDL("create role r1 with adhoc,sysproc,defaultproc;", new TestRole("r1", true, true, true, true));
goodRoleDDL("create role r1 with adhoc,sysproc,sysproc;", new TestRole("r1", true, true, true, true));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc;", new TestRole("r1", true, true, true, true));
>>>>>>>
goodRoleDDL("create role r1 with adhoc;", new TestRole("r1", true, true, false, false, false, false));
goodRoleDDL("create role r1 with sql;", new TestRole("r1", true, true, false, false, false, false));
goodRoleDDL("create role r1 with sqlread;", new TestRole("r1", false, false, true, false, false, false));
goodRoleDDL("create role r1 with sysproc;", new TestRole("r1", true, true, true, true, true, true));
goodRoleDDL("create role r1 with defaultproc;", new TestRole("r1", false, false, false, false, true, false));
goodRoleDDL("create role r1 with adhoc,sysproc,defaultproc;", new TestRole("r1", true, true, true, true, true, true));
goodRoleDDL("create role r1 with adhoc,sysproc,sysproc;", new TestRole("r1", true, true, true, true, true, true));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc;", new TestRole("r1", true, true, true, true, true, true));
<<<<<<<
goodRoleDDL("create role r1 with defaultprocread;", new TestRole("r1", false, false, false, false, false, true));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc,DefaultProcRead;", new TestRole("r1", true, true, false, true, true, true));
=======
goodRoleDDL("create role r1 with defaultprocread;", new TestRole("r1", false, false, false, true));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc,DefaultProcRead;", new TestRole("r1", true, true, true, true));
goodRoleDDL("create role r1 with AdHoc,Admin,DefaultProc,DefaultProcRead;", new TestRole("r1", true, true, true, true));
>>>>>>>
goodRoleDDL("create role r1 with defaultprocread;", new TestRole("r1", false, false, false, false, false, true));
goodRoleDDL("create role r1 with AdHoc,SysProc,DefaultProc,DefaultProcRead;", new TestRole("r1", true, true, true, true, true, true));
goodRoleDDL("create role r1 with AdHoc,Admin,DefaultProc,DefaultProcRead;", new TestRole("r1", true, true, true, true, true, true)); |
<<<<<<<
import javax.security.auth.Subject;
=======
import com.google_voltpatches.common.collect.ImmutableList;
>>>>>>>
import javax.security.auth.Subject;
import com.google_voltpatches.common.collect.ImmutableList; |
<<<<<<<
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
=======
import java.util.concurrent.ExecutionException;
>>>>>>>
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
<<<<<<<
setRejoinComplete(siteConnection);
=======
siteConnection.setRejoinComplete(m_replayCompleteAction, event.exportSequenceNumbers);
>>>>>>>
setRejoinComplete(siteConnection, event.exportSequenceNumbers);
<<<<<<<
setRejoinComplete(siteConnection);
=======
siteConnection.setRejoinComplete(m_replayCompleteAction, event.exportSequenceNumbers);
>>>>>>>
// unreachable;
return null;
}
/*
* m_handler is called when a SnapshotUtil.requestSnapshot response occurs.
* This callback runs on the snapshot daemon thread.
*/
SnapshotResponseHandler m_handler = new SnapshotResponseHandler() {
@Override
public void handleResponse(ClientResponse resp)
{
if (resp == null) {
VoltDB.crashLocalVoltDB("Failed to initiate rejoin snapshot",
false, null);
} else if (resp.getStatus() != ClientResponseImpl.SUCCESS) {
VoltDB.crashLocalVoltDB("Failed to initiate rejoin snapshot: "
+ resp.getStatusString(), false, null);
}
VoltTable[] results = resp.getResults();
if (SnapshotUtil.didSnapshotRequestSucceed(results)) {
long txnId = -1;
String appStatus = resp.getAppStatusString();
if (appStatus == null) {
VoltDB.crashLocalVoltDB("Rejoin snapshot request failed: "
+ resp.getStatusString(), false, null);
}
try {
JSONObject jsObj = new JSONObject(appStatus);
txnId = jsObj.getLong("txnId");
} catch (JSONException e) {
VoltDB.crashLocalVoltDB(
"Failed to get the rejoin snapshot txnId", true, e);
return;
}
REJOINLOG.debug(m_whoami
+ "received Snapshotresponse handler callback."
+ " Snapshot txnId is: " + txnId);
// Send a RequestResponse message to self to avoid synchronization
RejoinMessage msg = new RejoinMessage(txnId);
m_mailbox.send(m_mailbox.getHSId(), msg);
} else {
VoltDB.crashLocalVoltDB("Snapshot request for rejoin failed",
false, null);
}
}
};
// m_handler sends this message to communicate the snapshot txnid after
// the snapshot has been initiated. Setup the ReplayCompleteAction
// that the Site will need.
void doRequestResponse(RejoinMessage message)
{
REJOINLOG.debug(m_whoami
+ "SnapshotResponse forwarded to RejoinProducer mbox.");
Runnable action = new Runnable() {
@Override
public void run()
{
REJOINLOG.debug(m_whoami + "informing rejoinCoordinator "
+ CoreUtils.hsIdToString(m_rejoinCoordinatorHsId)
+ " of REPLAY_FINISHED");
RejoinMessage replay_complete = new RejoinMessage(
m_rejoinCoordinatorHsId, Type.REPLAY_FINISHED);
m_mailbox.send(m_rejoinCoordinatorHsId, replay_complete);
}
};
m_replayCompleteAction = new ReplayCompletionAction(
message.getSnapshotTxnId(), action);
m_snapshotAdapterAwait.countDown();
}
/**
* SiteTasker run -- load this site!
*
* run() is invoked when the RejoinProducer (this) submits itself to the
* site tasker. RejoinProducer submits itself to the site tasker queue
* when rejoin data is available. Rejoin data is available after the
* snapshot request is fulfilled. The snapshot request is triggered
* by the node-wise snapshot coordinator telling this producer that it's
* its turn to start the rejoin sequence.
*/
@Override
public void run(SiteProcedureConnection siteConnection)
{
throw new RuntimeException(
"Unexpected execution of run method in rejoin producer.");
}
@Override
public void runForRejoin(SiteProcedureConnection siteConnection,
TaskLog m_taskLog) throws IOException
{
if (useLiveRejoin()) {
runForLiveRejoin(siteConnection);
} else {
runForCommunityRejoin(siteConnection);
}
}
/**
* An implementation of run() that does not block the site thread.
* The Site has responsibility for transactions that occur between
* schedulings of this task.
*/
void runForLiveRejoin(SiteProcedureConnection siteConnection)
{
// the first block is a special case.
Pair<Integer, ByteBuffer> rejoinWork = firstWork.get();
if (rejoinWork != null) {
REJOINLOG.debug(m_whoami
+ " executing first snapshot transfer for live rejoin.");
firstWork.set(null);
} else {
rejoinWork = m_rejoinSiteProcessor.poll();
}
if (rejoinWork != null) {
restoreBlock(rejoinWork, siteConnection);
}
if (m_rejoinSiteProcessor.isEOF() == false) {
m_taskQueue.offer(this);
} else {
REJOINLOG.debug(m_whoami + "Rejoin snapshot transfer is finished");
m_rejoinSiteProcessor.close();
// m_rejoinSnapshotBytes = m_rejoinSiteProcessor.bytesTransferred();
// m_rejoinSiteProcessor = null;
// Don't notify the rejoin coordinator yet. The stream snapshot may
// have not finished on all nodes, let the snapshot completion
// monitor tell the rejoin coordinator.
SnapshotCompletionEvent event = null;
// Block until the snapshot interest triggers.
try {
REJOINLOG.debug(m_whoami
+ "waiting on snapshot completion monitor.");
event = m_completionMonitorAwait.get();
REJOINLOG.debug(m_whoami
+ "waiting on snapshot response adapter.");
m_snapshotAdapterAwait.await();
REJOINLOG.debug(m_whoami
+ "snapshot monitor and adapter complete. "
+ "Sending SNAPSHOT_FINISHED and Handing off to site.");
// Send snapshot finished message once both monitor and adapter complete.
RejoinMessage snap_complete = new RejoinMessage(
m_rejoinCoordinatorHsId, Type.SNAPSHOT_FINISHED);
m_mailbox.send(m_rejoinCoordinatorHsId, snap_complete);
} catch (InterruptedException crashme) {
VoltDB.crashLocalVoltDB(
"Interrupted awaiting snapshot completion.", true,
crashme);
} catch (ExecutionException e) {
VoltDB.crashLocalVoltDB(
"Unexpected exception awaiting snapshot completion.",
true, e);
}
setRejoinComplete(siteConnection, event.exportSequenceNumbers);
}
}
/**
* An implementation of run() that blocks the site thread
* until the streaming snapshot queue is emptied.
*/
void runForCommunityRejoin(SiteProcedureConnection siteConnection)
{
Pair<Integer, ByteBuffer> rejoinWork = firstWork.get();
REJOINLOG.debug(m_whoami
+ " executing first snapshot transfer for community rejoin.");
firstWork.set(null);
while (rejoinWork != null) {
restoreBlock(rejoinWork, siteConnection);
try {
rejoinWork = m_rejoinSiteProcessor.take();
} catch (InterruptedException e) {
HOSTLOG.warn("RejoinProducer interrupted at take()");
rejoinWork = null;
}
}
REJOINLOG.debug(m_whoami + "Rejoin snapshot transfer is finished");
m_rejoinSiteProcessor.close();
// m_rejoinSnapshotBytes = m_rejoinSiteProcessor.bytesTransferred();
// m_rejoinSiteProcessor = null;
/*
* Don't notify the rejoin coordinator yet. The stream snapshot may
* have not finished on all nodes, let the snapshot completion
* monitor tell the rejoin coordinator.
*/
// Block until the snapshot interest triggers.
// -- rtb: not sure this race can happen in the live rejoin case?
// Maybe with tiny data sets? I'm going to accept
// the simple and correct action of blocking until there
// is an indication that a non-blocking wait is necesary.
SnapshotCompletionEvent event = null;
try {
REJOINLOG.debug(m_whoami
+ "waiting on snapshot completion monitor.");
event = m_completionMonitorAwait.get();
REJOINLOG.debug(m_whoami + "waiting on snapshot response adapter.");
m_snapshotAdapterAwait.await();
REJOINLOG
.debug(m_whoami
+ "snapshot monitor and adapter complete. Handing off to site.");
// Send snapshot finished message once both monitor and adapter complete.
RejoinMessage snap_complete = new RejoinMessage(
m_rejoinCoordinatorHsId, Type.SNAPSHOT_FINISHED);
m_mailbox.send(m_rejoinCoordinatorHsId, snap_complete);
} catch (InterruptedException crashme) {
VoltDB.crashLocalVoltDB(
"Interrupted awaiting snapshot completion.", true, crashme);
} catch (ExecutionException e) {
VoltDB.crashLocalVoltDB(
"Unexpected exception awaiting snapshot completion.", true,
e);
}
setRejoinComplete(siteConnection, event.exportSequenceNumbers); |
<<<<<<<
return activate(context, Long.MAX_VALUE, predicates);
=======
activate(context, false, predicates);
>>>>>>>
return activate(context, false, predicates);
<<<<<<<
public boolean activate(SystemProcedureExecutionContext context, long undoToken, byte[] predicates)
=======
public void activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates)
>>>>>>>
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates) |
<<<<<<<
=======
import org.json_voltpatches.JSONObject;
>>>>>>>
<<<<<<<
=======
>>>>>>>
import org.voltdb.ProcedureRunnerFactory;
import org.voltdb.iv2.Site;
<<<<<<<
import org.voltdb.iv2.Site;
=======
import org.voltdb.VoltDB;
>>>>>>>
import org.voltdb.iv2.Site;
import org.voltdb.LoadedProcedureSet; |
<<<<<<<
/** java.util.logging logger. */
private static final VoltLogger LOG = new VoltLogger("HOST");
private static final boolean HOST_TRACE_ENABLED;
=======
>>>>>>>
/** java.util.logging logger. */
private static final VoltLogger LOG = new VoltLogger("HOST");
private static final boolean HOST_TRACE_ENABLED; |
<<<<<<<
public void log(Iv2InitiateTaskMessage message, long spHandle) {}
@Override
public void logIv2Fault(long writerHSId, Set<Long> survivorHSId,
int partitionId, long spHandle) {
}
@Override
public void logIv2MPFault(long txnId) {}
=======
public boolean log(
Iv2InitiateTaskMessage message,
long spHandle,
DurabilityListener l,
Object handle) {
return false;
}
>>>>>>>
public boolean log(
Iv2InitiateTaskMessage message,
long spHandle,
DurabilityListener l,
Object handle) {
return false;
}
@Override
public void logIv2Fault(long writerHSId, Set<Long> survivorHSId,
int partitionId, long spHandle) {
}
@Override
public void logIv2MPFault(long txnId) {} |
<<<<<<<
for (Integer partition : partitions) {
m_iv2InitiatorStartingTxnIds.put(partition, TxnEgo.makeZero(partition).getTxnId());
=======
// persist the merged settings
m_config.m_recoveredPartitions = Joiner.on(",").join(partitions);
clusterSettings = ClusterSettings.create(
m_config.asClusterSettingsMap(), fromPropertyFile.asMap(), fromDeploymentFile);
clusterSettings.store();
hostLog.info("Partitions on this host:" + m_config.m_recoveredPartitions);
for (int ii = 0; ii < partitions.size(); ii++) {
Integer partition = partitions.get(ii);
m_iv2InitiatorStartingTxnIds.put( partition, TxnEgo.makeZero(partition).getTxnId());
>>>>>>>
// persist the merged settings
m_config.m_recoveredPartitions = Joiner.on(",").join(partitions);
clusterSettings = ClusterSettings.create(
m_config.asClusterSettingsMap(), fromPropertyFile.asMap(), fromDeploymentFile);
clusterSettings.store();
hostLog.info("Partitions on this host:" + m_config.m_recoveredPartitions);
for (Integer partition : partitions) {
m_iv2InitiatorStartingTxnIds.put(partition, TxnEgo.makeZero(partition).getTxnId()); |
<<<<<<<
import org.voltdb.messaging.Iv2InitiateTaskMessage;
=======
import org.voltdb.MemoryStats;
>>>>>>>
import org.voltdb.messaging.Iv2InitiateTaskMessage;
import org.voltdb.MemoryStats;
<<<<<<<
import org.voltdb.utils.MiscUtils;
=======
import org.voltdb.TableStats;
>>>>>>>
import org.voltdb.utils.MiscUtils;
import org.voltdb.TableStats; |
<<<<<<<
=======
public void clearOverridesForModes() {
m_modeOverrides = null;
if (m_cmdLines != null) {
for (CommandLine commandLine : m_cmdLines) {
commandLine.m_modeOverrideForTest = null;
}
}
}
public void setOverridesForSitesperhost(Map<Integer, Integer> sphMap) {
assert(sphMap != null);
assert(!sphMap.isEmpty());
m_sitesperhostOverrides = sphMap;
}
>>>>>>>
public void clearOverridesForModes() {
m_modeOverrides = null;
if (m_cmdLines != null) {
for (CommandLine commandLine : m_cmdLines) {
commandLine.m_modeOverrideForTest = null;
}
}
} |
<<<<<<<
public void testMaterializedViewMinMax() throws IOException, ProcCallException, Exception {
System.out.println("Test Min and Max...");
if (isHSQL()) {
return;
}
Client client = getClient();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS");
client.callProcedure("R2.insert", 1, 10, 1 , "2013-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 2, 20, -1 , "2012-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 3, 30, 1 , "2011-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 4, 20, -1 , "2012-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 5, 10, 1 , "2013-06-11 02:00:00.123456");
VoltTable table;
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(5, table.getLong(1));
assertEquals(60, table.getLong(2));
long expectedTM = dateFormat.parse("2011-06-11 02:00:00.123456").getTime();
long realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.delete", 3);
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(4, table.getLong(1));
assertEquals(40, table.getLong(2));
expectedTM = dateFormat.parse("2012-06-11 02:00:00.123456").getTime();
realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.delete", 2);
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(3, table.getLong(1));
assertEquals(40, table.getLong(2));
expectedTM = dateFormat.parse("2012-06-11 02:00:00.123456").getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.insert", 6, 30, 1 , "2011-06-11 02:00:00.123456");
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(4, table.getLong(1));
assertEquals(60, table.getLong(2));
expectedTM = dateFormat.parse("2011-06-11 02:00:00.123456").getTime();
realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
}
=======
public void testMaterializedViewUpdateR4() throws IOException, ProcCallException {
System.out.println("Test R4 update...");
ClientResponse result;
Client client = this.getClient();
String insert = "R4.insert";
// ID, wage, dept, age, rent
client.callProcedure(insert, 1, 10, -1, 21, 5);
client.callProcedure(insert, 2, 20, 1, 22, 6);
client.callProcedure(insert, 3, 30, 1, 23, 7 );
client.callProcedure(insert, 4, 40, 2, 24, 8);
client.callProcedure(insert, 5, 50, 2, 25, 9);
String mvTable = "V2_R4";
String orderbyStmt = mvTable+"_G1";
// SELECT dept*dept, dept+dept, count(*), SUM(wage) FROM R4 GROUP BY dept*dept, dept+dept
// Check the current contents in MVs
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 1, 10}, {1, 2, 2, 50}, {4, 4, 2, 90}}, orderbyStmt);
// Test update(id, wage, dept, age, rent, oldid)
result = client.callProcedure("R4.update", 2, 19, 1, 22, 6, 2);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 1, 10}, {1, 2, 2, 49}, {4, 4, 2, 90}}, orderbyStmt);
result = client.callProcedure("R4.update", 4, 41, -1, 24, 8, 4);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 2, 51}, {1, 2, 2, 49}, {4, 4, 1, 50}}, orderbyStmt);
result = client.callProcedure("R4.update", 5, 55, 1, 25, 9, 5);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 2, 51}, {1, 2, 3, 104}}, orderbyStmt);
result = client.callProcedure("@AdHoc","Delete from R4");
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(5, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, null, orderbyStmt);
}
>>>>>>>
public void testMaterializedViewMinMax() throws IOException, ProcCallException, Exception {
System.out.println("Test Min and Max...");
if (isHSQL()) {
return;
}
Client client = getClient();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS");
client.callProcedure("R2.insert", 1, 10, 1 , "2013-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 2, 20, -1 , "2012-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 3, 30, 1 , "2011-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 4, 20, -1 , "2012-06-11 02:00:00.123456");
client.callProcedure("R2.insert", 5, 10, 1 , "2013-06-11 02:00:00.123456");
VoltTable table;
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(5, table.getLong(1));
assertEquals(60, table.getLong(2));
long expectedTM = dateFormat.parse("2011-06-11 02:00:00.123456").getTime();
long realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.delete", 3);
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(4, table.getLong(1));
assertEquals(40, table.getLong(2));
expectedTM = dateFormat.parse("2012-06-11 02:00:00.123456").getTime();
realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.delete", 2);
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(3, table.getLong(1));
assertEquals(40, table.getLong(2));
expectedTM = dateFormat.parse("2012-06-11 02:00:00.123456").getTime();
assertEquals(expectedTM, realTM);
client.callProcedure("R2.insert", 6, 30, 1 , "2011-06-11 02:00:00.123456");
table = client.callProcedure("@AdHoc", "SELECT * FROM V_R2_MIN_MAX").getResults()[0];
assertEquals(1, table.getRowCount());
System.out.println(table.toString());
table.advanceRow();
assertEquals(1, table.getLong(0));
assertEquals(4, table.getLong(1));
assertEquals(60, table.getLong(2));
expectedTM = dateFormat.parse("2011-06-11 02:00:00.123456").getTime();
realTM = dateFormat.parse(table.getTimestampAsTimestamp(3).toString()).getTime();
assertEquals(expectedTM, realTM);
}
public void testMaterializedViewUpdateR4() throws IOException, ProcCallException {
System.out.println("Test R4 update...");
ClientResponse result;
Client client = this.getClient();
String insert = "R4.insert";
// ID, wage, dept, age, rent
client.callProcedure(insert, 1, 10, -1, 21, 5);
client.callProcedure(insert, 2, 20, 1, 22, 6);
client.callProcedure(insert, 3, 30, 1, 23, 7 );
client.callProcedure(insert, 4, 40, 2, 24, 8);
client.callProcedure(insert, 5, 50, 2, 25, 9);
String mvTable = "V2_R4";
String orderbyStmt = mvTable+"_G1";
// SELECT dept*dept, dept+dept, count(*), SUM(wage) FROM R4 GROUP BY dept*dept, dept+dept
// Check the current contents in MVs
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 1, 10}, {1, 2, 2, 50}, {4, 4, 2, 90}}, orderbyStmt);
// Test update(id, wage, dept, age, rent, oldid)
result = client.callProcedure("R4.update", 2, 19, 1, 22, 6, 2);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 1, 10}, {1, 2, 2, 49}, {4, 4, 2, 90}}, orderbyStmt);
result = client.callProcedure("R4.update", 4, 41, -1, 24, 8, 4);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 2, 51}, {1, 2, 2, 49}, {4, 4, 1, 50}}, orderbyStmt);
result = client.callProcedure("R4.update", 5, 55, 1, 25, 9, 5);
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(1, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, new long [][]{{1, -2, 2, 51}, {1, 2, 3, 104}}, orderbyStmt);
result = client.callProcedure("@AdHoc","Delete from R4");
assertEquals(ClientResponse.SUCCESS, result.getStatus());
assertEquals(5, result.getResults()[0].asScalarLong());
compareMVcontentsOfLongs(client, mvTable, null, orderbyStmt);
} |
<<<<<<<
=======
import com.google_voltpatches.common.collect.Maps;
import com.google_voltpatches.common.collect.Sets;
import org.json_voltpatches.JSONException;
import org.json_voltpatches.JSONObject;
>>>>>>>
import com.google_voltpatches.common.collect.Maps;
import com.google_voltpatches.common.collect.Sets;
import org.json_voltpatches.JSONException;
import org.json_voltpatches.JSONObject; |
<<<<<<<
=======
ADMIN, // aliased by SYSPROC
>>>>>>>
ADMIN, // aliased by SYSPROC
<<<<<<<
EnumSet<Permission> perms = EnumSet.noneOf(Permission.class);
if (catGroup.getSql()) perms.add(Permission.SQL);
if (catGroup.getSqlread()) perms.add(Permission.SQLREAD);
if (catGroup.getSysproc()) perms.add(Permission.SYSPROC);
if (catGroup.getDefaultproc()) perms.add(Permission.DEFAULTPROC);
if (catGroup.getDefaultprocread()) perms.add(Permission.DEFAULTPROCREAD);
=======
EnumSet<Permission> perms;
if (catGroup.getAdmin()) {
perms = EnumSet.allOf(Permission.class);
} else {
perms = EnumSet.noneOf(Permission.class);
if (catGroup.getAdhoc()) perms.add(Permission.ADHOC);
if (catGroup.getDefaultproc()) perms.add(Permission.DEFAULTPROC);
if (catGroup.getDefaultprocread()) perms.add(Permission.DEFAULTPROCREAD);
}
>>>>>>>
EnumSet<Permission> perms;
if (catGroup.getAdmin()) {
perms = EnumSet.allOf(Permission.class);
} else {
perms = EnumSet.noneOf(Permission.class);
if (catGroup.getSql()) perms.add(Permission.SQL);
if (catGroup.getSqlread()) perms.add(Permission.SQLREAD);
if (catGroup.getDefaultproc()) perms.add(Permission.DEFAULTPROC);
if (catGroup.getDefaultprocread()) perms.add(Permission.DEFAULTPROCREAD);
} |
<<<<<<<
=======
* Encapsulates all knowledge of how to compress/uncompress hash tokens.
*/
public static class TokenCompressor {
final static long TOKEN_MASK = 0xFFFFFFFF00000000L;
final static int COMPRESSED_SIZE = 4;
/**
* Drop the lower-order bits of the token.
* @return cleaned up token
*/
public static long prepare(long token) {
return token & TOKEN_MASK;
}
/**
* Compress token.
* @return compressed token
*/
public static int compress(long token) {
return (int)(token >>> 32);
}
/**
* Uncompress token.
* @return uncompressed token
*/
public static long uncompress(int token) {
return (long)token << 32;
}
}
/**
>>>>>>> |
<<<<<<<
/** set to true to run with iv2 initiation. Good Luck! */
public boolean m_enableIV2 = false;
public Configuration() {
// MASSIVE HACK TO GLOBALLY OVERRIDE ENABLEIV2 ANYWHERE WE MIGHT CARE
String iv2 = System.getenv().get("VOLT_ENABLEIV2");
System.out.println("CONFIGURATION ENABLE IV2: " + iv2);
if (iv2 != null && iv2.equals("true"))
{
m_enableIV2 = true;
}
}
=======
public int getZKPort() {
return MiscUtils.getPortFromHostnameColonPort(m_zkInterface, VoltDB.DEFAULT_ZK_PORT);
}
public Configuration() { }
>>>>>>>
/** set to true to run with iv2 initiation. Good Luck! */
public boolean m_enableIV2 = false;
public Configuration() {
// MASSIVE HACK TO GLOBALLY OVERRIDE ENABLEIV2 ANYWHERE WE MIGHT CARE
String iv2 = System.getenv().get("VOLT_ENABLEIV2");
System.out.println("CONFIGURATION ENABLE IV2: " + iv2);
if (iv2 != null && iv2.equals("true"))
{
m_enableIV2 = true;
}
}
public int getZKPort() {
return MiscUtils.getPortFromHostnameColonPort(m_zkInterface, VoltDB.DEFAULT_ZK_PORT);
} |
<<<<<<<
// LIMIT/OFFSET is tricky,
// a lot of PUSH DOWN can happen: ORDER BY/LIMIT, DISTINCT
=======
// Having
sql1 = "SELECT distinct B3, SUM(C3), COUNT(*) from T3 group by A3, B3 Having SUM(C3) > 3";
sql2 = "SELECT B3, SUM(C3), COUNT(*) from T3 group by A3, B3 Having SUM(C3) > 3";
checkDistinctWithGroupbyPlans(sql1, sql2);
// LIMIT/OFFSET is tricky, we can not push down ORDER BY/LIMIT with DISTINCT for most cases
// Except for cases like: group by PK order by PK limit XX
>>>>>>>
// Having
sql1 = "SELECT distinct B3, SUM(C3), COUNT(*) from T3 group by A3, B3 Having SUM(C3) > 3";
sql2 = "SELECT B3, SUM(C3), COUNT(*) from T3 group by A3, B3 Having SUM(C3) > 3";
checkDistinctWithGroupbyPlans(sql1, sql2);
// LIMIT/OFFSET is tricky,
// a lot of PUSH DOWN can happen: ORDER BY/LIMIT, DISTINCT
<<<<<<<
// Distributed DISTINCT GROUP BY
if (pns1.size() > 1) {
assertEquals(pns1.get(1).toExplainPlanString(), pns2.get(1).toExplainPlanString());
}
=======
>>>>>>> |
<<<<<<<
private void setUp(int siteCount, int partitionCount, int kFactor) throws Exception {
=======
private void start(int siteCount, int partitionCount, int kFactor) {
>>>>>>>
private void start(int siteCount, int partitionCount, int kFactor) throws Exception {
<<<<<<<
@Override
protected void setUp() throws Exception
{
if (m_voltdb != null) {
tearDown();
}
super.setUp();
setUp( SITE_COUNT, PARTITION_COUNT, K_FACTOR);
}
=======
>>>>>>>
<<<<<<<
System.out.println("Doing shutdown");
super.tearDown();
m_sites.clear();
m_mboxes.clear();
m_voltdb.shutdown(null);
=======
for (int i=0; i < m_sites.length; ++i) {
m_sites[i] = null;
m_mboxes[i] = null;
}
if (m_voltdb != null) {
m_voltdb.getFaultDistributor().shutDown();
m_voltdb.m_snapshotCompletionMonitor.shutdown();
m_voltdb.getZK().close();
m_voltdb.m_agreementSite.shutdown();
}
>>>>>>>
System.out.println("Doing shutdown");
super.tearDown();
m_sites.clear();
m_mboxes.clear();
if (m_voltdb != null) {
m_voltdb.shutdown(null);
<<<<<<<
for (RussianRouletteMailbox m : m_mboxes.values()) {
m.setFailureLikelihood(0);
=======
start(SITE_COUNT, PARTITION_COUNT, K_FACTOR);
for (int i=0; i < SITE_COUNT; ++i) {
m_mboxes[i].setFailureLikelihood(0);
>>>>>>>
start(SITE_COUNT, PARTITION_COUNT, K_FACTOR);
for (RussianRouletteMailbox m : m_mboxes.values()) {
m.setFailureLikelihood(0); |
<<<<<<<
/* ownCloud Android client application
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2012-2013 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
import android.net.Uri;
import android.provider.BaseColumns;
import com.owncloud.android.MainApp;
/**
* Meta-Class that holds various static field information
*
* @author Bartek Przybylski
*
*/
public class ProviderMeta {
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 8;
private ProviderMeta() {
}
static public class ProviderTableMeta implements BaseColumns {
public static final String FILE_TABLE_NAME = "filelist";
public static final String OCSHARES_TABLE_NAME = "ocshares";
public static final Uri CONTENT_URI = Uri.parse("content://"
+ MainApp.getAuthority() + "/");
public static final Uri CONTENT_URI_FILE = Uri.parse("content://"
+ MainApp.getAuthority() + "/file");
public static final Uri CONTENT_URI_DIR = Uri.parse("content://"
+ MainApp.getAuthority() + "/dir");
public static final Uri CONTENT_URI_SHARE = Uri.parse("content://"
+ MainApp.getAuthority() + "/shares");
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.owncloud.file";
public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.owncloud.file";
// Columns of filelist table
public static final String FILE_PARENT = "parent";
public static final String FILE_NAME = "filename";
public static final String FILE_CREATION = "created";
public static final String FILE_MODIFIED = "modified";
public static final String FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA = "modified_at_last_sync_for_data";
public static final String FILE_CONTENT_LENGTH = "content_length";
public static final String FILE_CONTENT_TYPE = "content_type";
public static final String FILE_STORAGE_PATH = "media_path";
public static final String FILE_PATH = "path";
public static final String FILE_ACCOUNT_OWNER = "file_owner";
public static final String FILE_LAST_SYNC_DATE = "last_sync_date"; // _for_properties, but let's keep it as it is
public static final String FILE_LAST_SYNC_DATE_FOR_DATA = "last_sync_date_for_data";
public static final String FILE_KEEP_IN_SYNC = "keep_in_sync";
public static final String FILE_ETAG = "etag";
public static final String FILE_SHARE_BY_LINK = "share_by_link";
public static final String FILE_PUBLIC_LINK = "public_link";
public static final String FILE_PERMISSIONS = "permissions";
public static final String FILE_REMOTE_ID = "remote_id";
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME
+ " collate nocase asc";
// Columns of ocshares table
public static final String OCSHARES_FILE_SOURCE = "file_source";
public static final String OCSHARES_ITEM_SOURCE = "item_source";
public static final String OCSHARES_SHARE_TYPE = "share_type";
public static final String OCSHARES_SHARE_WITH = "shate_with";
public static final String OCSHARES_PATH = "path";
public static final String OCSHARES_PERMISSIONS = "permissions";
public static final String OCSHARES_SHARED_DATE = "shared_date";
public static final String OCSHARES_EXPIRATION_DATE = "expiration_date";
public static final String OCSHARES_TOKEN = "token";
public static final String OCSHARES_SHARE_WITH_DISPLAY_NAME = "shared_with_display_name";
public static final String OCSHARES_IS_DIRECTORY = "is_directory";
public static final String OCSHARES_USER_ID = "user_id";
public static final String OCSHARES_ID_REMOTE_SHARED = "id_remote_shared";
public static final String OCSHARES_ACCOUNT_OWNER = "owner_share";
public static final String OCSHARES_DEFAULT_SORT_ORDER = OCSHARES_FILE_SOURCE
+ " collate nocase asc";
}
}
=======
/**
* ownCloud Android client application
*
* @author Bartek Przybylski
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
import android.net.Uri;
import android.provider.BaseColumns;
import com.owncloud.android.MainApp;
/**
* Meta-Class that holds various static field information
*/
public class ProviderMeta {
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 10;
private ProviderMeta() {
}
static public class ProviderTableMeta implements BaseColumns {
public static final String FILE_TABLE_NAME = "filelist";
public static final String OCSHARES_TABLE_NAME = "ocshares";
public static final Uri CONTENT_URI = Uri.parse("content://"
+ MainApp.getAuthority() + "/");
public static final Uri CONTENT_URI_FILE = Uri.parse("content://"
+ MainApp.getAuthority() + "/file");
public static final Uri CONTENT_URI_DIR = Uri.parse("content://"
+ MainApp.getAuthority() + "/dir");
public static final Uri CONTENT_URI_SHARE = Uri.parse("content://"
+ MainApp.getAuthority() + "/shares");
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.owncloud.file";
public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.owncloud.file";
// Columns of filelist table
public static final String FILE_PARENT = "parent";
public static final String FILE_NAME = "filename";
public static final String FILE_CREATION = "created";
public static final String FILE_MODIFIED = "modified";
public static final String FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA = "modified_at_last_sync_for_data";
public static final String FILE_CONTENT_LENGTH = "content_length";
public static final String FILE_CONTENT_TYPE = "content_type";
public static final String FILE_STORAGE_PATH = "media_path";
public static final String FILE_PATH = "path";
public static final String FILE_ACCOUNT_OWNER = "file_owner";
public static final String FILE_LAST_SYNC_DATE = "last_sync_date"; // _for_properties, but let's keep it as it is
public static final String FILE_LAST_SYNC_DATE_FOR_DATA = "last_sync_date_for_data";
public static final String FILE_KEEP_IN_SYNC = "keep_in_sync";
public static final String FILE_ETAG = "etag";
public static final String FILE_SHARE_BY_LINK = "share_by_link";
public static final String FILE_PUBLIC_LINK = "public_link";
public static final String FILE_PERMISSIONS = "permissions";
public static final String FILE_REMOTE_ID = "remote_id";
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
public static final String FILE_IS_DOWNLOADING= "is_downloading";
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME
+ " collate nocase asc";
// Columns of ocshares table
public static final String OCSHARES_FILE_SOURCE = "file_source";
public static final String OCSHARES_ITEM_SOURCE = "item_source";
public static final String OCSHARES_SHARE_TYPE = "share_type";
public static final String OCSHARES_SHARE_WITH = "shate_with";
public static final String OCSHARES_PATH = "path";
public static final String OCSHARES_PERMISSIONS = "permissions";
public static final String OCSHARES_SHARED_DATE = "shared_date";
public static final String OCSHARES_EXPIRATION_DATE = "expiration_date";
public static final String OCSHARES_TOKEN = "token";
public static final String OCSHARES_SHARE_WITH_DISPLAY_NAME = "shared_with_display_name";
public static final String OCSHARES_IS_DIRECTORY = "is_directory";
public static final String OCSHARES_USER_ID = "user_id";
public static final String OCSHARES_ID_REMOTE_SHARED = "id_remote_shared";
public static final String OCSHARES_ACCOUNT_OWNER = "owner_share";
public static final String OCSHARES_DEFAULT_SORT_ORDER = OCSHARES_FILE_SOURCE
+ " collate nocase asc";
}
}
>>>>>>>
/**
* ownCloud Android client application
*
* @author Bartek Przybylski
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.db;
import android.net.Uri;
import android.provider.BaseColumns;
import com.owncloud.android.MainApp;
/**
* Meta-Class that holds various static field information
*/
public class ProviderMeta {
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 10;
private ProviderMeta() {
}
static public class ProviderTableMeta implements BaseColumns {
public static final String FILE_TABLE_NAME = "filelist";
public static final String OCSHARES_TABLE_NAME = "ocshares";
public static final Uri CONTENT_URI = Uri.parse("content://"
+ MainApp.getAuthority() + "/");
public static final Uri CONTENT_URI_FILE = Uri.parse("content://"
+ MainApp.getAuthority() + "/file");
public static final Uri CONTENT_URI_DIR = Uri.parse("content://"
+ MainApp.getAuthority() + "/dir");
public static final Uri CONTENT_URI_SHARE = Uri.parse("content://"
+ MainApp.getAuthority() + "/shares");
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.owncloud.file";
public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.owncloud.file";
// Columns of filelist table
public static final String FILE_PARENT = "parent";
public static final String FILE_NAME = "filename";
public static final String FILE_CREATION = "created";
public static final String FILE_MODIFIED = "modified";
public static final String FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA =
"modified_at_last_sync_for_data";
public static final String FILE_CONTENT_LENGTH = "content_length";
public static final String FILE_CONTENT_TYPE = "content_type";
public static final String FILE_STORAGE_PATH = "media_path";
public static final String FILE_PATH = "path";
public static final String FILE_ACCOUNT_OWNER = "file_owner";
public static final String FILE_LAST_SYNC_DATE = "last_sync_date"; // _for_properties,
// but let's keep it as it is
public static final String FILE_LAST_SYNC_DATE_FOR_DATA = "last_sync_date_for_data";
public static final String FILE_KEEP_IN_SYNC = "keep_in_sync";
public static final String FILE_ETAG = "etag";
public static final String FILE_SHARE_BY_LINK = "share_by_link";
public static final String FILE_PUBLIC_LINK = "public_link";
public static final String FILE_PERMISSIONS = "permissions";
public static final String FILE_REMOTE_ID = "remote_id";
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";
public static final String FILE_IS_DOWNLOADING= "is_downloading";
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME
+ " collate nocase asc";
// Columns of ocshares table
public static final String OCSHARES_FILE_SOURCE = "file_source";
public static final String OCSHARES_ITEM_SOURCE = "item_source";
public static final String OCSHARES_SHARE_TYPE = "share_type";
public static final String OCSHARES_SHARE_WITH = "shate_with";
public static final String OCSHARES_PATH = "path";
public static final String OCSHARES_PERMISSIONS = "permissions";
public static final String OCSHARES_SHARED_DATE = "shared_date";
public static final String OCSHARES_EXPIRATION_DATE = "expiration_date";
public static final String OCSHARES_TOKEN = "token";
public static final String OCSHARES_SHARE_WITH_DISPLAY_NAME = "shared_with_display_name";
public static final String OCSHARES_IS_DIRECTORY = "is_directory";
public static final String OCSHARES_USER_ID = "user_id";
public static final String OCSHARES_ID_REMOTE_SHARED = "id_remote_shared";
public static final String OCSHARES_ACCOUNT_OWNER = "owner_share";
public static final String OCSHARES_DEFAULT_SORT_ORDER = OCSHARES_FILE_SOURCE
+ " collate nocase asc";
}
} |
<<<<<<<
m_wherePredicate = clonePredicate(predicate);
}
/**
* @param predicate the join predicate to set
*/
public void setPreJoinPredicate(AbstractExpression predicate)
{
m_preJoinPredicate = clonePredicate(predicate);
}
/**
* @param predicate the join predicate to set
*/
public void setJoinPredicate(AbstractExpression predicate)
{
m_joinPredicate = clonePredicate(predicate);
=======
if (predicate != null)
{
// PlanNodes all need private deep copies of expressions
// so that the resolveColumnIndexes results
// don't get bashed by other nodes or subsequent planner runs
m_predicate = (AbstractExpression) predicate.clone();
}
>>>>>>>
if (predicate != null) {
m_wherePredicate = clonePredicate(predicate);
}
}
/**
* @param predicate the join predicate to set
*/
public void setPreJoinPredicate(AbstractExpression predicate)
{
if (predicate != null) {
m_preJoinPredicate = clonePredicate(predicate);
}
}
/**
* @param predicate the join predicate to set
*/
public void setJoinPredicate(AbstractExpression predicate)
{
if (predicate != null) {
m_joinPredicate = clonePredicate(predicate);
} |
<<<<<<<
import java.util.Arrays;
=======
import java.util.Collection;
>>>>>>>
import java.util.Arrays;
import java.util.Collection; |
<<<<<<<
if (mAccount != null) {
OCFile file = mContainerActivity.getStorageManager().
getFileByPath(getFile().getRemotePath());
if (file != null) {
setFile(file);
}
}
=======
// TODO: Remove this code. (Updated no needed)
// if (mAccount != null) {
// OCFile file = ((FileActivity)getActivity()).getStorageManager().
// getFileByPath(getFile().getRemotePath());
// if (file != null) {
// setFile(file);
// }
// }
>>>>>>>
// TODO: Remove this code. (Updated no needed)
// if (mAccount != null) {
// OCFile file = mContainerActivity.getStorageManager().
// getFileByPath(getFile().getRemotePath());
// if (file != null) {
// setFile(file);
// }
// } |
<<<<<<<
public boolean validateConfiguration(Catalog catalog, DeploymentType deployment,
InMemoryJarfile catalogJar, Catalog curCatalog, CatalogChangeResult ccr) {
=======
public boolean validateConfiguration(Catalog catalog, Function<String, Procedure> procedureMapper,
DeploymentType deployment, InMemoryJarfile catalogJar, CatalogChangeResult ccr) {
>>>>>>>
public boolean validateConfiguration(Catalog catalog, Function<String, Procedure> procedureMapper,
DeploymentType deployment, InMemoryJarfile catalogJar, Catalog curCatalog, CatalogChangeResult ccr) { |
<<<<<<<
import com.owncloud.android.authentication.PinCheck;
=======
import com.owncloud.android.datamodel.FileDataStorageManager;
>>>>>>>
import com.owncloud.android.authentication.PinCheck;
import com.owncloud.android.datamodel.FileDataStorageManager; |
<<<<<<<
=======
@Override
public void setSendHeartbeats(boolean val)
{
// Iv2 does not require heartbeating.
}
@Override
public void sendHeartbeat(long txnId)
{
// Iv2 does not require heartbeating.
}
@Override
public boolean isOnBackPressure()
{
return false;
}
@Override
public void bindAdapter(Connection adapter) {
m_ci.bindAdapter(adapter);
}
>>>>>>>
@Override
public void bindAdapter(Connection adapter) {
m_ci.bindAdapter(adapter);
} |
<<<<<<<
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.lang.String;
=======
>>>>>>>
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.lang.String;
<<<<<<<
private static String insertProcedure = "";
=======
private static String inserProcedure = "";
>>>>>>>
private static String insertProcedure = "";
<<<<<<<
if(!config.tablename.equals("")) {
insertProcedure = config.tablename + ".insert";
} else {
insertProcedure = config.procedurename;
}
=======
if (!config.tablename.equals("")) {
inserProcedure = config.tablename + ".insert";
} else {
inserProcedure = config.procedurename;
}
>>>>>>>
if(!config.tablename.equals("")) {
insertProcedure = config.tablename + ".insert";
} else {
insertProcedure = config.procedurename;
} |
<<<<<<<
import org.voltdb.messaging.BorrowTaskMessage;
import org.voltdb.messaging.InitiateResponseMessage;
=======
import org.voltcore.utils.Pair;
>>>>>>>
import org.voltcore.utils.Pair;
import org.voltdb.messaging.BorrowTaskMessage;
import org.voltdb.messaging.InitiateResponseMessage; |
<<<<<<<
assert(tableList.size() == 1);
table = tableList.get(0);
}
@Override
public String toString() {
String retval = super.toString() + "\n";
retval = retval.trim();
return retval;
}
=======
String tableName = stmtNode.attributes.get("table");
assert(tableName != null);
tableName = tableName.trim();
Table table = getTableFromDB(tableName);
tableList.add(table);
for (VoltXMLElement child : stmtNode.children) {
if (child.name.equalsIgnoreCase("condition"))
parseCondition(child);
}
}
>>>>>>>
assert(tableList.size() == 1);
} |
<<<<<<<
public ListenableFuture<?> write(final Callable<BBContainer> tupleData, SnapshotTableTask context) {
final SettableFuture<Object> retval = SettableFuture.create();
=======
public ListenableFuture<?> write(final Callable<BBContainer> tupleData) {
>>>>>>>
public ListenableFuture<?> write(final Callable<BBContainer> tupleData, SnapshotTableTask context) {
<<<<<<<
@Override
public SnapshotFormat getFormat() {
return SnapshotFormat.CSV;
}
=======
@Override
public String toString() {
return m_file.toString();
}
>>>>>>>
@Override
public SnapshotFormat getFormat() {
return SnapshotFormat.CSV;
}
@Override
public String toString() {
return m_file.toString();
} |
<<<<<<<
cl.m_datasourceClusterId = m_datasourceClusterId;
cl.m_placementGroup = m_placementGroup;
=======
>>>>>>>
cl.m_placementGroup = m_placementGroup;
<<<<<<<
if (m_datasourceClusterId != -1)
{
cmdline.add("datasourcecluster"); cmdline.add(Byte.toString(m_datasourceClusterId));
}
if (m_placementGroup != null) {
cmdline.add("placementgroup"); cmdline.add(m_placementGroup);
}
=======
>>>>>>>
if (m_placementGroup != null) {
cmdline.add("placementgroup"); cmdline.add(m_placementGroup);
} |
<<<<<<<
private final boolean m_serializingToEE;
private final LinkedList<byte[]> m_encodedStrings = new LinkedList<byte[]>();
private final LinkedList<byte[][]> m_encodedStringArrays = new LinkedList<byte[][]>();
public ParameterSet() {
m_serializingToEE = false;
}
public ParameterSet(boolean serializingToEE) {
m_serializingToEE = serializingToEE;
}
=======
>>>>>>>
private final LinkedList<byte[]> m_encodedStrings = new LinkedList<byte[]>();
private final LinkedList<byte[][]> m_encodedStringArrays = new LinkedList<byte[][]>();
public ParameterSet() {
} |
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN;
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN;
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN;
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN;
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN;
<<<<<<<
config.m_enableIV2 = true;
config.m_startAction = START_ACTION.REJOIN;
=======
config.m_enableIV2 = m_useIv2;
config.m_startAction = StartAction.REJOIN;
>>>>>>>
config.m_enableIV2 = true;
config.m_startAction = StartAction.REJOIN; |
<<<<<<<
String topic, String groupId, String procedure, int soTimeout, int fetchSize, Formatter<String> formatter)
=======
final String topic, String groupId, String procedure, int soTimeout, int fetchSize)
>>>>>>>
final String topic, String groupId, String procedure, int soTimeout, int fetchSize, Formatter<String> formatter)
<<<<<<<
Broker leader = part.leader();
KafkaStreamImporterConfig config = new KafkaStreamImporterConfig(uri, brokerList, topic,
part.partitionId(), new HostAndPort(leader.host(), leader.port()),
groupId, fetchSize, soTimeout, procedure, formatter);
configs.put(uri, config);
=======
>>>>>>> |
<<<<<<<
import java.io.ByteArrayInputStream;
=======
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
>>>>>>>
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.File;
<<<<<<<
=======
import java.io.FileOutputStream;
import java.io.FileWriter;
>>>>>>>
import java.io.FileWriter;
<<<<<<<
=======
private static final VoltLogger recoveryLog = new VoltLogger("RECOVERY");
/** Default deployment file contents if path to deployment is null */
private static final String[] defaultDeploymentXML = {
"<?xml version=\"1.0\"?>",
"<deployment>",
" <cluster hostcount=\"1\" sitesperhost=\"2\" />",
" <httpd enabled=\"true\">",
" <jsonapi enabled=\"true\" />",
" </httpd>",
"</deployment>"
};
static class RejoinCallback implements ProcedureCallback {
ClientResponse response;
@Override
public synchronized void clientCallback(ClientResponse clientResponse)
throws Exception {
response = clientResponse;
if (response.getStatus() != ClientResponse.SUCCESS) {
hostLog.fatal(response.getStatusString());
VoltDB.crashLocalVoltDB(response.getStatusString(), false, null);
}
VoltTable results[] = clientResponse.getResults();
if (results.length > 0) {
VoltTable errors = results[0];
while (errors.advanceRow()) {
hostLog.fatal("Host " + errors.getLong(0) + " error: " + errors.getString(1));
}
VoltDB.crashLocalVoltDB("No additional info.", false, null);
}
this.notify();
}
public synchronized ClientResponse waitForResponse(int timeout) throws InterruptedException {
final long start = System.currentTimeMillis();
while (response == null) {
this.wait(timeout);
long finish = System.currentTimeMillis();
if (finish - start >= timeout) {
return null;
}
}
return response;
}
}
>>>>>>>
/** Default deployment file contents if path to deployment is null */
private static final String[] defaultDeploymentXML = {
"<?xml version=\"1.0\"?>",
"<deployment>",
" <cluster hostcount=\"1\" sitesperhost=\"2\" />",
" <httpd enabled=\"true\">",
" <jsonapi enabled=\"true\" />",
" </httpd>",
"</deployment>"
};
<<<<<<<
// set the mode first thing
m_mode = OperationMode.INITIALIZING;
=======
// If there's no deployment provide a default and put it under voltdbroot.
if (config.m_pathToDeployment == null) {
try {
config.m_pathToDeployment = setupDefaultDeployment();
} catch (IOException e) {
hostLog.fatal("Failed to write default deployment.", e);
}
}
>>>>>>>
// If there's no deployment provide a default and put it under voltdbroot.
if (config.m_pathToDeployment == null) {
try {
config.m_pathToDeployment = setupDefaultDeployment();
} catch (IOException e) {
hostLog.fatal("Failed to write default deployment.", e);
}
}
// set the mode first thing
m_mode = OperationMode.INITIALIZING;
<<<<<<<
@Override
public void handleMailboxUpdate(Map<MailboxType, List<MailboxNodeContent>> mailboxes) {
SiteTracker oldTracker = m_siteTracker;
m_siteTracker = new SiteTracker(m_myHostId, mailboxes, oldTracker != null ? oldTracker.m_version + 1 : 0);
if (m_validateConfiguredNumberOfPartitionsOnMailboxUpdate) {
if (m_siteTracker.m_numberOfPartitions != m_configuredNumberOfPartitions) {
VoltDB.crashGlobalVoltDB(
"Configured number of partitions " + m_configuredNumberOfPartitions +
" is not the same as the number of partitions present " + m_siteTracker.m_numberOfPartitions,
true, null);
}
if (m_siteTracker.m_numberOfPartitions != oldTracker.m_numberOfPartitions) {
VoltDB.crashGlobalVoltDB(
"Configured number of partitions in new tracker" + m_siteTracker.m_numberOfPartitions +
" is not the same as the number of partitions present " + oldTracker.m_numberOfPartitions,
true, null);
}
}
/*
* Check for sites being removed,
* added
*/
if (oldTracker != null) {
HashSet<Long> deltaRemoved = new HashSet<Long>(oldTracker.m_allSitesImmutable);
deltaRemoved.removeAll(m_siteTracker.m_allSitesImmutable);
if (!deltaRemoved.isEmpty()) {
m_faultManager.reportFault(new SiteFailureFault(new ArrayList<Long>(deltaRemoved)));
/*
* Let fault detection handle the sites being added if any
*/
return;
}
HashSet<Long> deltaAdded = new HashSet<Long>(m_siteTracker.m_allSitesImmutable);
deltaAdded.removeAll(oldTracker.m_allSitesImmutable);
if (!deltaAdded.isEmpty()) {
for (SimpleDtxnInitiator dtxn : m_dtxns)
{
Set<Long> copy = new HashSet<Long>(m_siteTracker.m_allExecutionSitesImmutable);
copy.retainAll(deltaAdded);
dtxn.notifyExecutionSiteRejoin(new ArrayList<Long>(copy));
}
for (ExecutionSite es : getLocalSites().values()) {
es.notifySitesAdded(m_siteTracker);
}
}
}
}
@Override
public SiteTracker getSiteTracker() {
return m_siteTracker;
}
@Override
public MailboxPublisher getMailboxPublisher() {
return m_mailboxPublisher;
}
=======
/**
* Create default deployment.xml file in voltdbroot if the deployment path is null.
*
* @return path to default deployment file
* @throws IOException
*/
private static String setupDefaultDeployment() throws IOException {
// Since there's apparently no deployment to override the path to voltdbroot it should be
// safe to assume it's under the working directory.
// CatalogUtil.getVoltDbRoot() creates the voltdbroot directory as needed.
File voltDbRoot = CatalogUtil.getVoltDbRoot(null);
String pathToDeployment = voltDbRoot.getPath() + File.separator + "deployment.xml";
File deploymentXMLFile = new File(pathToDeployment);
// Only create the file if it doesn't exist, otherwise reuse it.
if (!deploymentXMLFile.exists()) {
hostLog.warn("Generating default deployment file \"" + deploymentXMLFile.getAbsolutePath() + "\"");
BufferedWriter bw = new BufferedWriter(new FileWriter(deploymentXMLFile));
for (String line : defaultDeploymentXML) {
bw.write(line);
bw.newLine();
}
bw.flush();
bw.close();
} else {
hostLog.warn("Using default deployment file \"" + deploymentXMLFile.getAbsolutePath() + "\"");
}
return deploymentXMLFile.getAbsolutePath();
}
>>>>>>>
@Override
public void handleMailboxUpdate(Map<MailboxType, List<MailboxNodeContent>> mailboxes) {
SiteTracker oldTracker = m_siteTracker;
m_siteTracker = new SiteTracker(m_myHostId, mailboxes, oldTracker != null ? oldTracker.m_version + 1 : 0);
if (m_validateConfiguredNumberOfPartitionsOnMailboxUpdate) {
if (m_siteTracker.m_numberOfPartitions != m_configuredNumberOfPartitions) {
VoltDB.crashGlobalVoltDB(
"Configured number of partitions " + m_configuredNumberOfPartitions +
" is not the same as the number of partitions present " + m_siteTracker.m_numberOfPartitions,
true, null);
}
if (m_siteTracker.m_numberOfPartitions != oldTracker.m_numberOfPartitions) {
VoltDB.crashGlobalVoltDB(
"Configured number of partitions in new tracker" + m_siteTracker.m_numberOfPartitions +
" is not the same as the number of partitions present " + oldTracker.m_numberOfPartitions,
true, null);
}
}
/*
* Check for sites being removed,
* added
*/
if (oldTracker != null) {
HashSet<Long> deltaRemoved = new HashSet<Long>(oldTracker.m_allSitesImmutable);
deltaRemoved.removeAll(m_siteTracker.m_allSitesImmutable);
if (!deltaRemoved.isEmpty()) {
m_faultManager.reportFault(new SiteFailureFault(new ArrayList<Long>(deltaRemoved)));
/*
* Let fault detection handle the sites being added if any
*/
return;
}
HashSet<Long> deltaAdded = new HashSet<Long>(m_siteTracker.m_allSitesImmutable);
deltaAdded.removeAll(oldTracker.m_allSitesImmutable);
if (!deltaAdded.isEmpty()) {
for (SimpleDtxnInitiator dtxn : m_dtxns)
{
Set<Long> copy = new HashSet<Long>(m_siteTracker.m_allExecutionSitesImmutable);
copy.retainAll(deltaAdded);
dtxn.notifyExecutionSiteRejoin(new ArrayList<Long>(copy));
}
for (ExecutionSite es : getLocalSites().values()) {
es.notifySitesAdded(m_siteTracker);
}
}
}
}
@Override
public SiteTracker getSiteTracker() {
return m_siteTracker;
}
@Override
public MailboxPublisher getMailboxPublisher() {
return m_mailboxPublisher;
}
/**
* Create default deployment.xml file in voltdbroot if the deployment path is null.
*
* @return path to default deployment file
* @throws IOException
*/
private static String setupDefaultDeployment() throws IOException {
// Since there's apparently no deployment to override the path to voltdbroot it should be
// safe to assume it's under the working directory.
// CatalogUtil.getVoltDbRoot() creates the voltdbroot directory as needed.
File voltDbRoot = CatalogUtil.getVoltDbRoot(null);
String pathToDeployment = voltDbRoot.getPath() + File.separator + "deployment.xml";
File deploymentXMLFile = new File(pathToDeployment);
// Only create the file if it doesn't exist, otherwise reuse it.
if (!deploymentXMLFile.exists()) {
hostLog.warn("Generating default deployment file \"" + deploymentXMLFile.getAbsolutePath() + "\"");
BufferedWriter bw = new BufferedWriter(new FileWriter(deploymentXMLFile));
for (String line : defaultDeploymentXML) {
bw.write(line);
bw.newLine();
}
bw.flush();
bw.close();
} else {
hostLog.warn("Using default deployment file \"" + deploymentXMLFile.getAbsolutePath() + "\"");
}
return deploymentXMLFile.getAbsolutePath();
} |
<<<<<<<
import org.voltdb.compiler.VoltCompiler.VoltCompilerException;
=======
import org.voltdb.catalog.Catalog;
>>>>>>>
import org.voltdb.catalog.Catalog;
import org.voltdb.compiler.VoltCompiler.VoltCompilerException; |
<<<<<<<
private static void fragmentize(CompiledPlan plan) {
List<AbstractPlanNode> receives = plan.rootPlanGraph.findAllNodesOfType(PlanNodeType.RECEIVE);
if (receives.isEmpty()) return;
assert (receives.size() == 1);
ReceivePlanNode recvNode = (ReceivePlanNode) receives.get(0);
assert(recvNode.getChildCount() == 1);
AbstractPlanNode childNode = recvNode.getChild(0);
assert(childNode instanceof SendPlanNode);
SendPlanNode sendNode = (SendPlanNode) childNode;
=======
private void checkPlanColumnLeakage(CompiledPlan plan, ParsedSelectStmt stmt) {
NodeSchema output_schema = plan.rootPlanGraph.getOutputSchema();
// Sanity-check the output NodeSchema columns against the display columns
if (stmt.displayColumns.size() != output_schema.size())
{
throw new PlanningErrorException("Mismatched plan output cols " +
"to parsed display columns");
}
for (ParsedColInfo display_col : stmt.displayColumns)
{
SchemaColumn col = output_schema.find(display_col.tableName,
display_col.tableAlias,
display_col.columnName,
display_col.alias);
if (col == null)
{
throw new PlanningErrorException("Mismatched plan output cols " +
"to parsed display columns");
}
}
}
>>>>>>>
private void checkPlanColumnLeakage(CompiledPlan plan, ParsedSelectStmt stmt) {
NodeSchema output_schema = plan.rootPlanGraph.getOutputSchema();
// Sanity-check the output NodeSchema columns against the display columns
if (stmt.displayColumns.size() != output_schema.size())
{
throw new PlanningErrorException("Mismatched plan output cols " +
"to parsed display columns");
}
for (ParsedColInfo display_col : stmt.displayColumns)
{
SchemaColumn col = output_schema.find(display_col.tableName,
display_col.tableAlias,
display_col.columnName,
display_col.alias);
if (col == null)
{
throw new PlanningErrorException("Mismatched plan output cols " +
"to parsed display columns");
}
}
}
private static void fragmentize(CompiledPlan plan) {
List<AbstractPlanNode> receives = plan.rootPlanGraph.findAllNodesOfType(PlanNodeType.RECEIVE);
if (receives.isEmpty()) return;
assert (receives.size() == 1);
ReceivePlanNode recvNode = (ReceivePlanNode) receives.get(0);
assert(recvNode.getChildCount() == 1);
AbstractPlanNode childNode = recvNode.getChild(0);
assert(childNode instanceof SendPlanNode);
SendPlanNode sendNode = (SendPlanNode) childNode; |
<<<<<<<
import org.voltdb.messaging.BorrowTaskMessage;
import org.voltdb.messaging.InitiateResponseMessage;
=======
import org.voltcore.utils.CoreUtils;
>>>>>>>
import org.voltdb.messaging.BorrowTaskMessage;
import org.voltdb.messaging.InitiateResponseMessage;
import org.voltcore.utils.CoreUtils;
<<<<<<<
new SpProcedureTask(m_mailbox, procedureName, m_pendingTasks, msg, m_drGateway);
m_pendingTasks.offer(task);
=======
new SpProcedureTask(m_mailbox, procedureName, m_pendingTasks, msg);
if (!msg.isReadOnly()) {
if (!m_cl.log(msg, newSpHandle, m_durabilityListener, task)) {
m_pendingTasks.offer(task);
}
} else {
m_pendingTasks.offer(task);
}
>>>>>>>
new SpProcedureTask(m_mailbox, procedureName, m_pendingTasks, msg, m_drGateway);
if (!msg.isReadOnly()) {
if (!m_cl.log(msg, newSpHandle, m_durabilityListener, task)) {
m_pendingTasks.offer(task);
}
} else {
m_pendingTasks.offer(task);
} |
<<<<<<<
assert(tableList.size() == 1);
table = tableList.get(0);
=======
String tableName = stmtNode.attributes.get("table");
assert(tableName != null);
tableName = tableName.trim();
Table table = getTableFromDB(tableName);
tableList.add(table);
>>>>>>>
assert(tableList.size() == 1);
Table table = tableList.get(0);
<<<<<<<
if (child.name.equalsIgnoreCase("columns"))
parseColumns(child);
}
}
void parseColumns(VoltXMLElement columnsNode) {
for (VoltXMLElement child : columnsNode.children) {
assert(child.name.equals("column"));
Column col = null;
String tableName = child.attributes.get("table");
assert(tableName != null);
assert(tableName.equalsIgnoreCase(table.getTypeName()));
String name = child.attributes.get("name");
assert(name != null);
col = table.getColumns().getIgnoreCase(name.trim());
AbstractExpression expr = null;
assert(child.children.size() == 1);
VoltXMLElement subChild = child.children.get(0);
expr = parseExpressionTree(subChild);
assert(expr != null);
expr.refineValueType(VoltType.get((byte)col.getType()));
ExpressionUtil.finalizeValueTypes(expr);
columns.put(col, expr);
=======
if (child.name.equalsIgnoreCase("columns")) {
parseTargetColumns(child, table, columns);
} else if (child.name.equalsIgnoreCase("condition")) {
parseCondition(child);
}
>>>>>>>
if (child.name.equalsIgnoreCase("columns")) {
parseTargetColumns(child, table, columns);
} |
<<<<<<<
private final AtomicLong m_txnId = new AtomicLong(0);
private CommandLog m_cl;
=======
>>>>>>>
private CommandLog m_cl;
<<<<<<<
message.getConnectionId(),
message.isForReplay());
/*
* If this is CL replay use the txnid from the CL and also
* update the txnid to match the one from the CL
*/
if (message.isForReplay()) {
newSpHandle = message.getTxnId();
m_txnId.set(newSpHandle);
} else {
newSpHandle = m_txnId.incrementAndGet();
}
=======
message.getConnectionId());
advanceTxnEgo();
newSpHandle = currentTxnEgoSequence();
>>>>>>>
message.getConnectionId(),
message.isForReplay());
/*
* If this is CL replay use the txnid from the CL and also
* update the txnid to match the one from the CL
*/
if (message.isForReplay()) {
newSpHandle = message.getTxnId();
setMaxSeenTxnId(newSpHandle);
} else {
advanceTxnEgo();
newSpHandle = currentTxnEgoSequence();
}
// advanceTxnEgo();
// newSpHandle = currentTxnEgoSequence();
<<<<<<<
@Override
public void setMaxSeenTxnId(long maxSeenTxnId) {
assert(maxSeenTxnId < (1l << 40));
}
@Override
public void setCommandLog(CommandLog cl) {
m_cl = cl;
}
=======
>>>>>>>
@Override
public void setCommandLog(CommandLog cl) {
m_cl = cl;
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
/*
* If this is CL replay, use the txnid from the CL and use it to update the current txnid
*/
long mpTxnId;
if (message.isForReplay()) {
mpTxnId = message.getTxnId();
m_txnId.incrementAndGet();
} else {
mpTxnId = m_txnId.incrementAndGet();
}
=======
advanceTxnEgo();
final long mpTxnId = currentTxnEgoSequence();
>>>>>>>
/*
* If this is CL replay, use the txnid from the CL and use it to update the current txnid
*/
long mpTxnId;
if (message.isForReplay()) {
mpTxnId = message.getTxnId();
setMaxSeenTxnId(mpTxnId);
} else {
advanceTxnEgo();
mpTxnId = currentTxnEgoSequence();
}
// advanceTxnEgo();
// final long mpTxnId = currentTxnEgoSequence();
<<<<<<<
@Override
public void setMaxSeenTxnId(long maxSeenTxnId) {
if (maxSeenTxnId == 0) {
maxSeenTxnId = (1l << 40);
}
assert(maxSeenTxnId >= (1l << 40));
m_txnId.set(maxSeenTxnId);
}
@Override
public void setCommandLog(CommandLog cl) {
m_cl = cl;
}
=======
>>>>>>>
@Override
public void setCommandLog(CommandLog cl) {
m_cl = cl;
} |
<<<<<<<
protected void parseParameters(VoltXMLElement root) {
VoltXMLElement paramsNode = null;
for (VoltXMLElement node : root.children) {
if (node.name.equalsIgnoreCase("parameters")) {
paramsNode = node;
break;
}
}
if (paramsNode == null) {
return;
}
=======
private void parseParameters(VoltXMLElement paramsNode) {
long max_parameter_id = -1;
>>>>>>>
protected void parseParameters(VoltXMLElement root) {
VoltXMLElement paramsNode = null;
for (VoltXMLElement node : root.children) {
if (node.name.equalsIgnoreCase("parameters")) {
paramsNode = node;
break;
}
}
if (paramsNode == null) {
return;
}
long max_parameter_id = -1;
<<<<<<<
protected AbstractExpression getParameterOrConstantAsExpression(long id, long value) {
// The id was previously passed to parameterCountIndexById, so if not -1,
// it has already been asserted to be a valid id for a parameter, and the
// parameter's type has been refined to INTEGER.
if (id != -1) {
return m_paramsById.get(id);
}
// The limit/offset is a non-parameterized literal value that needs to be wrapped in a
// BIGINT constant so it can be used in the addition expression for the pushed-down limit.
ConstantValueExpression constant = new ConstantValueExpression();
constant.setValue(Long.toString(value));
constant.refineValueType(VoltType.BIGINT, VoltType.BIGINT.getLengthInBytesForFixedTypes());
return constant;
}
=======
/*
* Extract FROM(SELECT...) sub-queries from this statement
*/
public List<StmtSubqueryScan> findAllFromSubqueries() {
List<StmtSubqueryScan> subqueries = new ArrayList<StmtSubqueryScan>();
if (m_joinTree != null) {
m_joinTree.extractSubQueries(subqueries);
}
return subqueries;
}
/*
* Extract all subexpressions of a given type from this statement
*/
public List<AbstractExpression> findAllSubexpressionsOfType(ExpressionType exprType) {
List<AbstractExpression> exprs = new ArrayList<AbstractExpression>();
if (m_joinTree != null) {
AbstractExpression treeExpr = m_joinTree.getAllFilters();
if (treeExpr != null) {
exprs.addAll(treeExpr.findAllSubexpressionsOfType(exprType));
}
}
return exprs;
}
>>>>>>>
protected AbstractExpression getParameterOrConstantAsExpression(long id, long value) {
// The id was previously passed to parameterCountIndexById, so if not -1,
// it has already been asserted to be a valid id for a parameter, and the
// parameter's type has been refined to INTEGER.
if (id != -1) {
return m_paramsById.get(id);
}
// The limit/offset is a non-parameterized literal value that needs to be wrapped in a
// BIGINT constant so it can be used in the addition expression for the pushed-down limit.
ConstantValueExpression constant = new ConstantValueExpression();
constant.setValue(Long.toString(value));
constant.refineValueType(VoltType.BIGINT, VoltType.BIGINT.getLengthInBytesForFixedTypes());
return constant;
}
/*
* Extract FROM(SELECT...) sub-queries from this statement
*/
public List<StmtSubqueryScan> findAllFromSubqueries() {
List<StmtSubqueryScan> subqueries = new ArrayList<StmtSubqueryScan>();
if (m_joinTree != null) {
m_joinTree.extractSubQueries(subqueries);
}
return subqueries;
}
/*
* Extract all subexpressions of a given type from this statement
*/
public List<AbstractExpression> findAllSubexpressionsOfType(ExpressionType exprType) {
List<AbstractExpression> exprs = new ArrayList<AbstractExpression>();
if (m_joinTree != null) {
AbstractExpression treeExpr = m_joinTree.getAllFilters();
if (treeExpr != null) {
exprs.addAll(treeExpr.findAllSubexpressionsOfType(exprType));
}
}
return exprs;
} |
<<<<<<<
import java.util.ArrayList;
import java.util.List;
=======
>>>>>>>
import java.util.ArrayList;
import java.util.List;
<<<<<<<
import org.apache.commons.lang3.StringUtils;
import org.voltcore.logging.VoltLogger;
=======
import org.voltcore.logging.VoltLogger;
>>>>>>>
import org.apache.commons.lang3.StringUtils;
import org.voltcore.logging.VoltLogger;
<<<<<<<
AdHocPlannedStmtBatch plannedStmtBatch =
new AdHocPlannedStmtBatch(work.sqlBatchText,
work.partitionParam,
context.catalogVersion,
work.clientHandle,
work.connectionId,
work.hostname,
work.adminConnection,
work.clientData);
List<String> errorMsgs = new ArrayList<String>();
assert(work.sqlStatements != null);
for (final String sqlStatement : work.sqlStatements) {
try {
PlannerTool.Result result = m_ptool.planSql(sqlStatement, work.partitionParam != null);
plannedStmtBatch.addStatement(sqlStatement,
result.onePlan,
result.allPlan,
result.replicatedDML);
}
catch (Exception e) {
errorMsgs.add("Unexpected Ad Hoc Planning Error: " + e.getMessage());
}
=======
try {
PlannerTool.Result result = m_ptool.planSql(work.sql, work.partitionParam);
plannedStmt.aggregatorFragment = result.onePlan;
plannedStmt.collectorFragment = result.allPlan;
plannedStmt.isReplicatedTableDML = result.replicatedDML;
plannedStmt.sql = work.sql;
plannedStmt.partitionParam = result.partitionParam;
>>>>>>>
AdHocPlannedStmtBatch plannedStmtBatch =
new AdHocPlannedStmtBatch(work.sqlBatchText,
work.partitionParam,
context.catalogVersion,
work.clientHandle,
work.connectionId,
work.hostname,
work.adminConnection,
work.clientData);
List<String> errorMsgs = new ArrayList<String>();
assert(work.sqlStatements != null);
// Take advantage of the planner optimization for inferring single partition work
// when the batch has one statement.
if (work.sqlStatements.length == 1) {
// Single statement batch.
try {
String sqlStatement = work.sqlStatements[0];
PlannerTool.Result result = m_ptool.planSql(sqlStatement, work.partitionParam,
true);
// The planning tool may have optimized for the single partition case
// and generated a partition parameter.
plannedStmtBatch.partitionParam = result.partitionParam;
plannedStmtBatch.addStatement(sqlStatement,
result.onePlan,
result.allPlan,
result.replicatedDML);
}
catch (Exception e) {
errorMsgs.add("Unexpected Ad Hoc Planning Error: " + e.getMessage());
}
}
else {
// Multi-statement batch.
for (final String sqlStatement : work.sqlStatements) {
try {
PlannerTool.Result result = m_ptool.planSql(sqlStatement, work.partitionParam,
false);
plannedStmtBatch.addStatement(sqlStatement,
result.onePlan,
result.allPlan,
result.replicatedDML);
}
catch (Exception e) {
errorMsgs.add("Unexpected Ad Hoc Planning Error: " + e.getMessage());
}
} |
<<<<<<<
private static final List<String> StatisticsComponents = Arrays.asList("INDEX","INITIATOR","IOSTATS","MANAGEMENT","MEMORY","PROCEDURE","TABLE","PARTITIONCOUNT","STARVATION","LIVECLIENTS", "WAN");
=======
private static final List<String> Types = Arrays.asList("tinyint","smallint","integer","bigint","float","decimal","varchar","timestamp","varbinary");
private static final List<String> StatisticsComponents = Arrays.asList("INDEX","INITIATOR","IOSTATS","MANAGEMENT","MEMORY","PROCEDURE","TABLE","PARTITIONCOUNT","STARVATION","LIVECLIENTS", "DR");
>>>>>>>
private static final List<String> StatisticsComponents = Arrays.asList("INDEX","INITIATOR","IOSTATS","MANAGEMENT","MEMORY","PROCEDURE","TABLE","PARTITIONCOUNT","STARVATION","LIVECLIENTS", "DR"); |
<<<<<<<
=======
import org.voltdb.logging.VoltLogger;
import org.voltdb.messaging.BinaryPayloadMessage;
import org.voltdb.messaging.HostMessenger;
import org.voltdb.messaging.LocalMailbox;
import org.voltdb.messaging.LocalObjectMessage;
import org.voltdb.messaging.Mailbox;
import org.voltdb.messaging.MessagingException;
import org.voltdb.messaging.Subject;
import org.voltdb.messaging.VoltMessage;
import org.voltdb.network.Connection;
>>>>>>>
<<<<<<<
public void getMailbox(final HostMessenger hostMessenger, final long hsId) {
m_mailbox = new Mailbox() {
@Override
public void send(long destinationHSId, VoltMessage message)
throws MessagingException {
assert(message != null);
message.m_sourceHSId = hsId;
hostMessenger.send(destinationHSId, message);
}
@Override
public void send(long[] desinationHSIds, VoltMessage message)
throws MessagingException {
assert(message != null);
assert(desinationHSIds != null);
message.m_sourceHSId = hsId;
hostMessenger.send(desinationHSIds, message);
}
=======
public Mailbox getMailbox(final HostMessenger hostMessenger, final int siteId) {
m_mailbox = new LocalMailbox(hostMessenger, siteId) {
>>>>>>>
public void getMailbox(final HostMessenger hostMessenger, final long hsId) {
m_mailbox = new LocalMailbox(hostMessenger, hsId) {
<<<<<<<
@Override
public void deliverFront(VoltMessage message) {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recv() {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recvBlocking() {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recvBlocking(long timeout) {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recv(Subject[] s) {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recvBlocking(Subject[] s) {
throw new UnsupportedOperationException();
}
@Override
public VoltMessage recvBlocking(Subject[] s, long timeout) {
throw new UnsupportedOperationException();
}
@Override
public long getHSId() {
return hsId;
}
@Override
public void setHSId(long hsId) {
throw new UnsupportedOperationException();
}
=======
>>>>>>> |
<<<<<<<
import org.voltdb.VoltTable;
=======
import org.voltdb.messaging.FastSerializer;
>>>>>>>
<<<<<<<
=======
import org.voltdb.utils.DBBPool.BBContainer;
import org.voltdb.utils.MiscUtils;
>>>>>>>
import org.voltdb.utils.MiscUtils;
<<<<<<<
callbackToReturnPermit,
=======
callback,
expectedSerializedSize,
>>>>>>>
callback,
<<<<<<<
callbackToReturnPermit,
=======
callback,
expectedSerializedSize,
>>>>>>>
callback,
<<<<<<<
public VoltTable getIOStats() {
try {
return m_distributer.getConnectionStats(false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public VoltTable getIOStatsInterval() {
try {
return m_distributer.getConnectionStats(true);
} catch (Exception e) {
throw new RuntimeException(e);
}
=======
public ClientStatsContext createStatsContext() {
return m_distributer.createStatsContext();
>>>>>>>
public ClientStatsContext createStatsContext() {
return m_distributer.createStatsContext(); |
<<<<<<<
public int getQuestionMarkParameterCount() {
return m_questionMarkParameterCount;
}
=======
public boolean wasPlannedAgainstHash(byte[] catalogHash) {
return Arrays.equals(catalogHash, this.catalogHash);
}
>>>>>>>
public boolean wasPlannedAgainstHash(byte[] catalogHash) {
return Arrays.equals(catalogHash, this.catalogHash);
}
public int getQuestionMarkParameterCount() {
return m_questionMarkParameterCount;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.