You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 11:05:55 UTC
svn commit: r1132240 - in /incubator/mesos/trunk:
configure.template.centos-5.4-64 src/event_history/event_logger.cpp
Author: benh
Date: Sun Jun 5 09:05:55 2011
New Revision: 1132240
URL: http://svn.apache.org/viewvc?rev=1132240&view=rev
Log:
mesos-master flag "--event_history_sqlite" shouldn't show as an option
in mesos-master help output if configure wasn't run with
--with-included-sqlite flag.
Also, adding --with-included-sqlite flag to centos configure template.
Modified:
incubator/mesos/trunk/configure.template.centos-5.4-64
incubator/mesos/trunk/src/event_history/event_logger.cpp
Modified: incubator/mesos/trunk/configure.template.centos-5.4-64
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/configure.template.centos-5.4-64?rev=1132240&r1=1132239&r2=1132240&view=diff
==============================================================================
--- incubator/mesos/trunk/configure.template.centos-5.4-64 (original)
+++ incubator/mesos/trunk/configure.template.centos-5.4-64 Sun Jun 5 09:05:55 2011
@@ -6,4 +6,5 @@ $(dirname $0)/configure \
--with-python-headers=/usr/include/python2.6 \
--with-java-home=/usr/java/default \
--with-webui \
+ --with-included-sqlite \
--with-included-zookeeper $@
Modified: incubator/mesos/trunk/src/event_history/event_logger.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/event_history/event_logger.cpp?rev=1132240&r1=1132239&r2=1132240&view=diff
==============================================================================
--- incubator/mesos/trunk/src/event_history/event_logger.cpp (original)
+++ incubator/mesos/trunk/src/event_history/event_logger.cpp Sun Jun 5 09:05:55 2011
@@ -12,7 +12,7 @@
#ifdef WITH_INCLUDED_SQLITE
#include "sqlite_event_writer.hpp"
-#endif
+#endif /* ifdef WITH_INCLUDED_SQLITE */
using namespace mesos::internal::eventhistory;
@@ -20,21 +20,25 @@ using namespace mesos::internal::eventhi
// printed with --help option match up with those that are used as
// default values when accessing the configuration settings.
bool EventLogger::default_ev_hist_file_conf_val = true;
+#ifdef WITH_INCLUDED_SQLITE
bool EventLogger::default_ev_hist_sqlite_conf_val = false;
+#endif /* ifdef WITH_INCLUDED_SQLITE */
void EventLogger::registerOptions(Configurator* conf, bool file_writer_default,
bool sqlite_writer_default)
{
default_ev_hist_file_conf_val = file_writer_default;
- default_ev_hist_sqlite_conf_val = sqlite_writer_default;
-
ostringstream evFileMessage, evSqliteMessage;
evFileMessage << "Enable event history file writer (default: "
<< boolalpha << default_ev_hist_file_conf_val << ")";
+ conf->addOption<bool>("event_history_file", evFileMessage.str());
+
+#ifdef WITH_INCLUDED_SQLITE
+ default_ev_hist_sqlite_conf_val = sqlite_writer_default;
evSqliteMessage << "Enable event history sqlite writer (default: "
<< boolalpha << default_ev_hist_sqlite_conf_val << ")";
- conf->addOption<bool>("event_history_file", evFileMessage.str());
conf->addOption<bool>("event_history_sqlite", evSqliteMessage.str());
+#endif /* ifdef WITH_INCLUDED_SQLITE */
}
@@ -66,18 +70,10 @@ EventLogger::EventLogger(const Params& c
LOG(INFO) << "creating SqliteEventWriter" << endl;
writers.push_front(new SqlLiteEventWriter(conf));
}
-#else
- if (conf.get<bool>("event_history_sqlite",
- default_ev_hist_sqlite_conf_val)) {
- LOG(WARNING) << "Your configuration (either command line or config file) "
- << "has set the event_history_sqlite flag, but you did not run "
- << "./configure with the --use-included-sqlite flag, so "
- << " the SqliteEventWriter cannot be initialized." << endl;
- }
#endif /* ifdef WITH_INCLUDED_SQLITE */
} else {
LOG(INFO) << "No log directory was specified, so not creating "
- << "FileEventWriter or SqliteEventWriter. No event "
+ << "any event writers (e.g. FileEventWriter). No event "
<< "logging will happen!";
// Create and add non file based writers to writers list here.
}