require 'include/phpcassa/columnfamily.php'; require 'include/phpcassa/sysmanager.php'; require 'include/lang/english.php'; require 'helper/ClusterHelper.php'; require 'helper/ColumnFamilyHelper.php'; require 'helper/MX4J.php'; require 'conf.inc.php'; define('MINIMUM_THRIFT_API_VERSION_FOR_COUNTERS', '19.10.0'); $cluster_helper = new ClusterHelper($CASSANDRA_CLUSTERS); session_start(); // Make sure the cluster index in the session still exists in the config array if ($cluster_helper->getClusterIndex() > $cluster_helper->getClustersCount() - 1) { $_SESSION['cluster_index'] = 0; } try { $random_server = $cluster_helper->getRandomNodeForCurrentCluster(); $sys_manager = new SystemManager($random_server, $cluster_helper->getCredentialsForCurrentCluster(), 1500, 1500); } catch (TException $e) { die(getHTML('header.php') . getHTML('server_error.php', array('error_message' => displayErrorMessage('cassandra_server_error', array('error_message' => $e->getMessage())))) . getHTML('footer.php')); } /* Get the specified view and replace the php variables */ function getHTML($filename, $php_params = array()) { if (!file_exists('views/' . $filename)) { die('The view ' . $filename . ' doesn\'t exist'); } // If we got some params to be treated in php extract($php_params); ob_start();
require 'include/lang/english.php'; require 'helper/ClusterHelper.php'; require 'helper/ColumnFamilyHelper.php'; require 'helper/MX4J.php'; require 'conf.inc.php'; error_reporting(E_ALL); define('MINIMUM_THRIFT_API_VERSION_FOR_COUNTERS', '19.10.0'); define('THRIFT_API_VERSION_FOR_CASSANDRA_1_0', '19.20.0'); $cluster_helper = new ClusterHelper($CASSANDRA_CLUSTERS); session_start(); // Make sure the cluster index in the session still exists in the config array if ($cluster_helper->getClusterIndex() > $cluster_helper->getClustersCount() - 1) { $_SESSION['cluster_index'] = 0; } try { $sys_manager = new SystemManager($cluster_helper->getRandomNodeForCurrentCluster(), $cluster_helper->getCredentialsForCurrentCluster(), 1500, 1500); } catch (TException $e) { die(getHTML('header.php') . getHTML('server_error.php', array('error_message' => displayErrorMessage('cassandra_server_error', array('error_message' => $e->getMessage())))) . getHTML('footer.php')); } /* Get the specified view and replace the php variables */ function getHTML($filename, $php_params = array()) { if (!file_exists('views/' . $filename)) { die('The view ' . $filename . ' doesn\'t exist'); } // If we got some params to be treated in php extract($php_params); ob_start(); include 'views/' . $filename;