quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [3/8] incubator-quickstep git commit: Maintained the catalog filename as a constant.
Date Mon, 21 Nov 2016 03:58:29 GMT
Maintained the catalog filename as a constant.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/37a78cb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/37a78cb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/37a78cb1

Branch: refs/heads/get-block-domain
Commit: 37a78cb112da2df57973fcef054dba77bd9d9ee1
Parents: 24367d7
Author: Zuyu Zhang <zuyuz@apache.org>
Authored: Sat Nov 19 11:59:13 2016 -0800
Committer: Zuyu Zhang <zuyuz@apache.org>
Committed: Sun Nov 20 19:27:54 2016 -0800

----------------------------------------------------------------------
 BUILDING.md                  | 8 ++------
 cli/QuickstepCli.cpp         | 7 ++++---
 storage/StorageConstants.hpp | 2 ++
 3 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/37a78cb1/BUILDING.md
----------------------------------------------------------------------
diff --git a/BUILDING.md b/BUILDING.md
index 581fbdd..97552c6 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -190,16 +190,12 @@ number of jobs).
 Running Quickstep
 -----------------
 
-To use quickstep, just run `quickstep_cli_shell` in the build directory.
+To use quickstep, just run `quickstep_cli_shell` in the build directory. For the
+first time user, run once with `-initialize_db=true` to set up an empty catalog.
 Quickstep has number of command-line flags that control its behavior. Run
 `quickstep_cli_shell --help` to see a listing of the options and how to use
 them.
 
-The provided build directory has a skeleton qsstor directory with a fresh
-catalog.pb.bin file which is needed to run `quickstep_cli_shell`. If you want
-to wipe out your database and start fresh, delete all the files in qsstor and
-copy `catalog.pb.bin.orig` to `qsstor/catalog.pb.bin`.
-
 Running Tests
 -------------
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/37a78cb1/cli/QuickstepCli.cpp
----------------------------------------------------------------------
diff --git a/cli/QuickstepCli.cpp b/cli/QuickstepCli.cpp
index f17e18b..0e8468e 100644
--- a/cli/QuickstepCli.cpp
+++ b/cli/QuickstepCli.cpp
@@ -125,6 +125,7 @@ using quickstep::Worker;
 using quickstep::WorkerDirectory;
 using quickstep::WorkerMessage;
 using quickstep::kAdmitRequestMessage;
+using quickstep::kCatalogFilename;
 using quickstep::kPoisonMessage;
 using quickstep::kWorkloadCompletionMessage;
 
@@ -243,7 +244,7 @@ int main(int argc, char* argv[]) {
   quickstep::StorageManager storage_manager(fixed_storage_path);
 
   string catalog_path(fixed_storage_path);
-  catalog_path.append("catalog.pb.bin");
+  catalog_path.append(kCatalogFilename);
   if (quickstep::FLAGS_initialize_db) {  // Initialize the database
     // TODO(jmp): Refactor the code in this file!
     LOG(INFO) << "Initializing the database, creating a new catalog file and storage
directory\n";
@@ -267,14 +268,14 @@ int main(int argc, char* argv[]) {
     // Create the default catalog file.
     std::ofstream catalog_file(catalog_path);
     if (!catalog_file.good()) {
-      LOG(FATAL) << "ERROR: Unable to open catalog.pb.bin for writing.\n";
+      LOG(FATAL) << "ERROR: Unable to open " << kCatalogFilename << " for
writing.\n";
     }
 
     quickstep::Catalog catalog;
     catalog.addDatabase(new quickstep::CatalogDatabase(nullptr, "default"));
 
     if (!catalog.getProto().SerializeToOstream(&catalog_file)) {
-      LOG(FATAL) << "ERROR: Unable to serialize catalog proto to file catalog.pb.bin\n";
+      LOG(FATAL) << "ERROR: Unable to serialize catalog proto to file " << kCatalogFilename;
       return 1;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/37a78cb1/storage/StorageConstants.hpp
----------------------------------------------------------------------
diff --git a/storage/StorageConstants.hpp b/storage/StorageConstants.hpp
index 34a714d..037a8a9 100644
--- a/storage/StorageConstants.hpp
+++ b/storage/StorageConstants.hpp
@@ -39,6 +39,8 @@ constexpr char kPathSeparator = '/';
 constexpr char kDefaultStoragePath[] = "qsstor/";
 #endif
 
+constexpr char kCatalogFilename[] = "catalog.pb.bin";
+
 // Size of a memory slot managed by the StorageManager. This is the smallest
 // quantum of allocation for StorageBlocks and StorageBlobs. 2 MB is the large
 // page size on x86.


Mime
View raw message