kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [3/4] kudu git commit: Improve error message when trying to switch block managers
Date Wed, 10 May 2017 18:45:15 GMT
Improve error message when trying to switch block managers

Change-Id: I3ce8e03a07ff2e8fe074a77cc73d459e34354914
Reviewed-on: http://gerrit.cloudera.org:8080/6841
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/d3f7b385
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/d3f7b385
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/d3f7b385

Branch: refs/heads/master
Commit: d3f7b385c8041cb03568095f2ffe8f030f73f9bb
Parents: a50ca5d
Author: Todd Lipcon <todd@apache.org>
Authored: Wed May 10 10:12:13 2017 -0700
Committer: Will Berkeley <wdberkeley@gmail.com>
Committed: Wed May 10 17:32:28 2017 +0000

----------------------------------------------------------------------
 src/kudu/fs/block_manager_util.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/d3f7b385/src/kudu/fs/block_manager_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager_util.cc b/src/kudu/fs/block_manager_util.cc
index 8be6cde..6dae6fe 100644
--- a/src/kudu/fs/block_manager_util.cc
+++ b/src/kudu/fs/block_manager_util.cc
@@ -90,7 +90,10 @@ Status PathInstanceMetadataFile::LoadFromDisk() {
   RETURN_NOT_OK(pb_util::ReadPBContainerFromPath(env_, filename_, pb.get()));
 
   if (pb->block_manager_type() != block_manager_type_) {
-    return Status::IOError("Wrong block manager type", pb->block_manager_type());
+    return Status::IOError(Substitute(
+      "existing data was written using the '$0' block manager; cannot restart "
+      "with a different block manager '$1' without reformatting",
+      pb->block_manager_type(), block_manager_type_));
   }
 
   uint64_t block_size;


Mime
View raw message